Creating subscription on container using polling channel [message #1834294] |
Fri, 06 November 2020 10:42  |
Eclipse User |
|
|
|
Hi
I need to rely on polling channels in a specific app because actuator is behind NAT. So I created a simple environment it test polling before applying then to the final project:
In MN-CSE I have:
ADN-AE3 (ri=/mn-cse/CAE961861335; aei=CAE961861335; rr=false)
Actuator_cont (container; ri=/mn-cse/cnt-575593361)
pollingchannel (polling channel; ri=/mn-cse/pch-203328273; m2m:pcu=/mn-cse/pcu-203328273)
Now I am trying to create a subscription on container using the polling channel for long polling. I have just made these attempts:
1)
curl -X POST -H "Content-Type: application/xml;ty=23" -H "X-M2M-Origin: admin:admin" -H "X-M2M-RI: CAE961861335" -d '<m2m:sub xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="SUB_CONTAINER"><nu>/mn-cse/CAE961861335</nu><nct>2</nct><enc><net>3</net></enc></m2m:sub>' http://127.0.0.1:8282/~/mn-cse/mn-name/ADN-AE3/Actuator_cont
Error: OM2M exception caught in Router: AE has no point of access
2)
curl -X POST -H "Content-Type: application/xml;ty=23" -H "X-M2M-Origin: admin:admin" -H "X-M2M-RI: CAE961861335" -d '<m2m:sub xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="SUB_CONTAINER"><nu>/mn-cse/pch-203328273</nu><nct>2</nct><enc><net>3</net></enc></m2m:sub>' http://127.0.0.1:8282/~/mn-cse/mn-name/ADN-AE3/Actuator_cont
Error: AE mn-cse/pch-203328273 does not exists.
3)
curl -X POST -H "Content-Type: application/xml;ty=23" -H "X-M2M-Origin: admin:admin" -H "X-M2M-RI: CAE961861335" -d '<m2m:sub xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="SUB_CONTAINER"><nu>/mn-cse/pcu-203328273</nu><nct>2</nct><enc><net>3</net></enc></m2m:sub>' http://127.0.0.1:8282/~/mn-cse/mn-name/ADN-AE3/Actuator_cont
Error: AE mn-cse/pch-203328273 does not exists.
I have already tested notifications using AE POA and no problem but now with polling channels can not create the subscription.
It seems that subscription creation needs the AE as the <nu> but if I use the AE as nu OM2M expects the POA for notifications.
So, how can I pass polling channel to the subscription in order to get notifications using long polling?
Thanks a lot.
Alex
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.42246 seconds