BG96 and LWM2M Unable to send commands from the leshan server

Hi I am trying to connect my Bg96 as a lwm2m server as a client, I want to transmit and receive data through Lwm2m.

I am following this tutorial to achieve the basic connection between the sever and the client.
http://www.noomio.com.au/wiki/bg96/lwm2m-step-by-step/

I was able to complete all the steps without any issues but the device is not able receive any command from the server as the error message says that the client device is sleeping.

Here are the logs of the debug console of my device.

Net: Net Registered
dss_netapp: DSS_NetApp Registered
atfwd_cli_app: Atfwd_Cli_App Registered
LWM2M_EXT: LWM2M_EXT Registered

Command List:
  Commands:
     1. Help
     2. Exit

  Subgroups:
     3. Net
     4. dss_netapp
     5. atfwd_cli_app
     6. LWM2M_EXT


>
LWM2M: CLI registered
LWM2M: LWM2M_LOG:Carrier type = 0
LWM2M:
LWM2M: REG EP NAME = 4
LWM2M:
LWM2M: BOOTSTRAP EP NAME = 4
LWM2M:

The device is also registered with the server as I can see the Registration ID in the dashboard. How do I go forward with this issue.

Any help would be appreciated.

Thank you
Regards,
Yadunandan AB

Hello,

As you mention. cannot send any command is happened suddenly or after without data transmit for a while ?
if there is no transmit bettwen Leshan server with device, the connection will be disconnect, so you need AT+QLWM2M=“update”,[,<update_mode>] command to sync with server. may this help you.

B R
Linkin WANG

Hi Thank you for replying,

when I query the list of at commands from my device I do not get the command AT+QLWM2M=“update”. whenever I try to send non listed at command I get ERROR message from the device

here are the list of lwm2m at commands I received.

12:50:27.536 -> at+qlwm2m=?

12:50:27.536 -> +QLWM2M: "select"[,(0-3)]
12:50:27.536 -> +QLWM2M: "enable"[,(0,1)]
12:50:27.583 -> +QLWM2M: "bootstrap",(0-4)[,<instance>]
12:50:27.637 -> +QLWM2M: "qcli_en"[,(0,1)]
12:50:27.637 -> +QLWM2M: "psk"[,(0,1)]
12:50:27.683 -> +QLWM2M: "apn"[,<apn_name>]
12:50:27.737 -> +QLWM2M: "endpoint"[,(4,7),(4,7)]
12:50:27.737 -> +QLWM2M: "reset"
12:50:27.784 -> +QLWM2M: "clean"
12:50:27.784 -> 
12:50:27.784 -> OK

Is it because I have not updated the firmware ? or the issue is something else ?

Yes, the fw you are using seems not support this command. could you please let me know which fw
are you using now?
check with command:
ATI
AT+QGMR

B R
Linkin WANG

Currently I am using fw version BG96MAR02A07M1G

14:26:52.012 -> ati

14:26:52.012 -> Quectel
14:26:52.012 -> BG96
14:26:52.012 -> Revision: BG96MAR02A07M1G
14:26:52.053 -> 
14:26:52.053 -> OK
14:28:18.786 -> at+qgmr

14:28:18.786 -> BG96MAR02A07M1G_01.018.01.018
14:28:18.828 -> 
14:28:18.828 -> OK

Do I have to update to the latest fw version ?
If yes can you guide through the steps to update the firware

Here is FW:
https://cnquectel-my.sharepoint.com/:u:/g/personal/linkin_wang_quectel_com/EcWPRk1ncsRJpc3DC6LVOA0Bekwl7osJXvueFfWieBZpTA?e=IxaDnm

Upgrade Tool:
https://cnquectel-my.sharepoint.com/:u:/g/personal/linkin_wang_quectel_com/ETku2rhPcGpMk2OelHb1BV8B5gh99qU4yN--IX0QxGR7vA?e=LQC4fL

Then, click START button

Hi Thanks again for guiding through the steps. One last question, there are number of files in the update folder do I have to load all the files to the qflash tool or any one would be enough.

Load any one which in Update folder.

e.g

Hi again, as you asked me to update the firmware for my device, I followed all the steps as you said the firmware is also updated here are the logs of my at command console:

19:10:02.073 -> ati

19:10:02.073 -> Quectel
19:10:02.073 -> BG96
19:10:02.073 -> Revision: BG96MAR02A11M1G
19:10:02.073 -> 
19:10:02.073 -> OK
19:10:26.582 -> at+qgmr

19:10:30.809 -> BG96MAR02A11M1G_01.016.01.016
19:10:30.809 -> 
19:10:30.809 -> OK

Still my problem is not solved, none of the lwm2m commands are updated. To check that I again queried the list of commands supported. It is still the same as my previous version of firmware. here are the logs of my console:

19:11:08.338 -> at+qlwm2m=?

19:11:08.338 -> +QLWM2M: "select"[,(0-3)]
19:11:08.338 -> +QLWM2M: "enable"[,(0,1)]
19:11:08.338 -> +QLWM2M: "bootstrap",(0-4)[,<instance>]
19:11:08.338 -> +QLWM2M: "qcli_en"[,(0,1)]
19:11:08.338 -> +QLWM2M: "psk"[,(0,1)]
19:11:08.338 -> +QLWM2M: "apn"[,<apn_name>]
19:11:08.338 -> +QLWM2M: "endpoint"[,(4,7),(4,7)]
19:11:08.338 -> +QLWM2M: "reset"
19:11:08.338 -> +QLWM2M: "clean"
19:11:08.338 -> 
19:11:08.338 -> OK

Please provide me the firmware which supports all the commands that are listed in Quectel_BG96_LwM2M_User_Guide_V1.1 document.

Hello,

Are you using Quectel EVB kit borad ?
please try send " lwm2m " via debug console, then send " 5 -a " command.

And actually, i cannot see the " READY " report on your debug console, once ready report the device should be registered.

Hi, I’m not using Quectel EVB kit,I am using LTE IoT 2 Click module. I think there is a problem with the bootstrap configuration files so I’m not able to connect and get STATE READY. Is there any way I can use the Client registration interface instead of the bootstrap interface. If yes can you give the list of at commands

I also used the command you suggested “LWM2M” and send 5 -a on the debug console here is the output.

Net: Net Registered
dss_netapp: DSS_NetApp Registered
atfwd_cli_app: Atfwd_Cli_App Registered
LWM2M_EXT: LWM2M_EXT Registered

Command List:
  Commands:
     1. Help
     2. Exit

  Subgroups:
     3. Net
     4. dss_netapp
     5. atfwd_cli_app
     6. LWM2M_EXT


>
LWM2M: CLI registered
LWM2M: LWM2M_LOG:Carrier type = 1
LWM2M:
LWM2M: REG EP NAME = 4
LWM2M:
LWM2M: BOOTSTRAP EP NAME = 7
LWM2M:
lwm2m

LWM2M> 5 -a

LWM2M>

I think its about the smswakeup.

I would like to go forward with the client initiated interface. So please provide me the firmware which can support all the commands that is listed in Quectel_BG96_LwM2M_User_Guide_V1.1 document.

Yes, we can but as i know, you are using BG96MAR02A11M1G, BG96 MC series module support all commands you listed, i dont know if you have those module. although we can flash MC fw to MA module, but this maybe cause some unexpect issue.

https://cnquectel-my.sharepoint.com/:u:/g/personal/linkin_wang_quectel_com/EWpB_FyDHvtOusv7ARm2KL0B0Vu7GC9NCS_RYS2MDxWTAg?e=J7ilBs

Yes, I do not have Bg96 MC series and I also like the idea of flashing the MC fw to my module.

Is the firmware flashing procedure same as I did before ?

And is this the link of MC series fw that I should use to flash my device ?
https://cnquectel-my.sharepoint.com/:u:/g/personal/linkin_wang_quectel_com/EWpB_FyDHvtOusv7ARm2KL0B0Vu7GC9NCS_RYS2MDxWTAg?e=J7ilBs

Yes, for flashing is the same as before, and the link is the latest fw for MC series fw.

Thank you for your support, I was able to connect to the lwm2m registration server. I have few questions though

  • In a bootstrap.ini file what is the format to add new objects and resources. If it is added in the ini file then should it also be added on the server side?
  • what version of LWm2m is used on bg96. Can it communicate to any version of lwm2m on the server side?
  • The current fw which I’m using is of BG96 MC BG96MAR04A05M1G_01.002.01.002.

Hello,
In a bootstrap.ini file what is the format to add new objects and resources. If it is added in the ini file then should it also be added on the server side?
= No, this file is for initialization, cannot add objects or resources


【what version of LWm2m is used on bg96. Can it communicate to any version of lwm2m on the server side?】
= Yes, cmmunicate with any other servers.

Thank you for information