Udp Message with new line character

Hello,

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)?

Thank you

Hi @sakxam,

Did you test with this example:
https://support.sodaq.com/Boards/Sara_AFF/Examples/udp_att_temperature/

Maybe you can compare and check if there are any differences.

Best regards,
Jan

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

Thanks

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

[rdResp]: +CGATT: 1
[rdResp]: OK

Thanks again

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