Error from sample code

Hi,

I tried to use the sample code for GPS. It was working in November, but today when I tried to run it, there is some error occurring, can you please take a look? Thank you very much!

Hello @se171011,

it seems to me that you have updated the “uplink” lib to version 5 but not adjusted your device logic accordingly. The easiest way to get your device logic running again is to downgrade the “uplink” lib to version 4 again.

To do this opening the input screen for managing the libraries used in the current project and click the minus symbol to “decrement version”

Note: The screenshot shows the “expert” mode" of the rapidM2M Studio

Kind regards
Josef

Hi Josef,
thank you!
I decreased the version to Version 4, but there is still an error:

Best regards,
Siyu

Hello @se171011,

if you are using version 4 of the “~uplink” lib you have to define at least one “downward config” (i.e. the config is transferred from the rapidM2M Portal to the device) in the Data Descriptor (main.dde file). Version 4 of the “~uplink” lib need at least one “downward config” to determine if the current system time is valid.

For IoT applications, it is advisable to make at least the transmission interval adjustable via the rapidM2M portal, which requires a “down configuration” anyway. If you really don’t want to transfer a configuration from the rapidM2M portal to the device with your IoT application, you need to create a “dummy” configuration. This can look like this, for example:

#config0  DummyCfg down
DummyByte		u8		

Kind regards
Josef

Thank you very much for your help!
Siyu