Questions and discussions about the server-side Cloud-on-Chip technology used by the TD RF modules.
cynop
 
Posts: 2
Joined: Tue Jun 02, 2015 6:16 pm

UDM frame decoder and invalid frames

by cynop Tue Jun 02, 2015 6:24 pm

Hi,
I was wondering a bit about the UDM frame decoder...It is not exactly clear to me what the frame structure is, and what exactly is the function of the UDM frame decoder in the developer's dashboard. I can't find anything about it in the documentation. :|

Furthermore, I can't understand why
Code: Select all
at$ss=48656c6c6f20576f726c64
is accepted as a command by TD1208 and
Code: Select all
 at&ss=54657374204d657373616765
is not.


Thanks in advance
User avatar
lcheminade
 
Posts: 146
Joined: Mon May 11, 2015 7:47 am

Re: UDM frame decoder and invalid frames

by lcheminade Thu Jun 04, 2015 8:05 am

Hi,

The idea of the UDM frame decoder is to provide information to your web service instead of raw binary data.

Usually any Sigfox application will need:

- to count frames in order to know if some have been lost

- to identify who sent the message when having a network of objects communicating via a gateway

- to send common messages such as battery level, temperature level, event information, position, etc...


The first two bytes of an UDM frame contain a frame counter, a network id and a message identifier. Then the following bytes contains the encoded information plus your custom data.


The AT$SS command only sends binary data. If you send AT$SS=01 02 03 you will receive 01 02 03. It is entirely up to your to understand what it really means. But if you feed the UDM decoder with 01 02 03 it will tries to parse it. If it does not make any sense according to the encoder, the data will be discarded. If you want to send UDM encoded data you need to use functions that will send an information like AT$GSND which will send a position.


To summarize if you send binary data (01 02 03) you will receive binary data. If you send an information (position) you will receive this information.

From an SDK point of view:

TD_SIGFOX_Send("abcd", 4, 2); -> sigfox backend will receive "abcd" -> UDM parser will probably trash the data -> nothing on dev dashboard

TD_SENSOR_SendDataPosition(GPS_DATA_XYZ_SV_HDOP, position , 0, 0); -> sigfox backend will receive a complex hex frame -> dev dasboard will give you the position


So regarding your example your first hex string may be a well encoded UDM frame and not the second. In such case only the first message will trigger an information display on the dev dashboard.

Nevertheless in any case the TD12xx answer to a well formatted AT command should ALWAYS be OK even if the frame is never received by the Sigfox backend (we can't know about it unless using downlink) and even if the frame is not UDM formatted.

In your second example you wrote AT&SS instead of AT$SS. that would indead lead to a KO message and to no frame being transmitted.

Hope it will clarify what's going on!

Regards.

Loïc
cynop
 
Posts: 2
Joined: Tue Jun 02, 2015 6:16 pm

Re: UDM frame decoder and invalid frames

by cynop Thu Jun 04, 2015 11:26 am

Very informative Loïc, thanks for taking the time to respond :)
Return to Cloud-on-Chip

Who is online

Users browsing this forum: No registered users and 11 guests