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