I m trying to send a udp message to AllThingsTalk. I read how is the format of udp message (https://docs.allthingstalk.com/developers/api/udp-messaging/) and i test it sending a udp through a tester program.
When i try to send from SodaqSara something like this : "AT+USOST=0,“40.68.172.187”,8891,101,“LT6Dp0kWzuY1mCAslgNEtFHw\nmaker:4RniU1Bo1x8vW1VeVsGHQpWhHA1rkzBJapQsMLP\n{“Temperature”:{“value”:35}}”"
the response is : AT+USOST=0,“40.68.172.187”,8891,100,"LT6Dp0kWzuY1mCAslgNEtFHw maker:4RniU1Bo1x8vW1VeVsGHQpWhHA1rkzBJapQsMLP {“Temperature”:{"val
Does anyone knows why happens that? the lenght of the message is right. Is there any occasion that happens that cause the new line characters(\n)?
I just tried. But with this library ( <Sodaq_R4X.h>) it does not even connect…
I get the message "FAILED TO CONNECT TO MODEM"
I have SodaQ Sara-R410M.
I use the “Sodaq_nbIOT.h” library on my occasion.
So i did the same thing as the example you sent me but with the Sodaq_nbIOT.h library and the result is :
Sending message through UDP
Created socket!
Length buffer vs sent:98,0
It doesnt send anything
I alos used the debug mode and i get this : Sending message through UDP [rdResp]: +USOCR: 0 [rdResp]: OK Created socket! [rdResp]: +CME ERROR: Operation not allowed Length buffer vs sent:98,0 [rdResp]: OK
And last thing. When i change the reading to a string without new line characters the message is sending successfully : I send the string reading ="Hello there"
Sending message through UDP
[rdResp]: +USOCR: 0
[rdResp]: OK
Created socket!
[rdResp]: +USOST: 0,11
[rdResp]: OK
Length buffer vs sent:11,11
[rdResp]: OK
[rdResp]: +CGATT: 1
[rdResp]: OK
So i suppose that the new lines characters is the problem