This guide will walk you though integrating a Quectel BG96 Develoipment Kit to Azure IoT Hub using an available solution template.
1.1. Follow Quectel's guide to connect to your module's AT terminal.
1.2. Execute the following to perform the initial LWM2M configuration:
AT+QLWM2M="select",0
1.3. Use the QEFS Explorer
to access the alternate filesystem.
1.4. Navigate to the datatx/lwm2m folder.
1.5. Copy lwm2m_cfg
, carrier_apn_cfg
, and bootstrap.ini
files to your PC.
1.6. Update the lwm2m_cfg
with the correct APN as follows:
...
APN=<your SIM's APN>
...
1.7. Update the carrier_apn_cfg
with the correct APN as follows:
APN_NAME=<YOUR APN>
IP_FAMILY=v4
APN_CLASS=2
BS_IF_REG_FAILS=1
SHORT_SERVER_ID1=102
;
1.8. Update the bootstrap.ini with the correct bootstrap information:
{"bn":"/0/1/",
"e":[
{"n":"0","sv":"coaps://<instance>.tartabit.com:5684"},
{"n":"1","bv":true},
{"n":"2","v":0},
{"n":"10","v":102
}]}
{"bn":"/1/1/",
... remaining contents unchanged
1.9. Copy the modified files back to your Quectel module.
1.10. Execute the following AT command:
AT+QLWM2M="bsmode",1
AT+QLWM2M="enable",1
1.11. Reboot your quectel module.
1.12. If you connect to the debug port on your EVB, you should see the following:
LWM2M: CLI registered
LWM2M: LWM2M_LOG:Carrier type = 0
LWM2M:
LWM2M: REG EP NAME = 4
LWM2M:
LWM2M: BOOTSTRAP EP NAME = 4
LWM2M:
LWM2M: LWM2M_LOG: bootstrap_name --> urn:imei:<your imei>
LWM2M:
LWM2M: State: STATE_BOOTSTRAPPING
LWM2M: State: STATE_INITIAL
LWM2M: State: STATE_REGISTER_REQUIRED
LWM2M: State: STATE_REGISTERING
LWM2M: State: STATE_READY
2.1. Login to the Azure Portal.
2.2. Navigate to your Azure IoT Hub.
2.3. Navigate to Shared access policies and select the iothubowner policy.
2.4. Copy the primary or secondary connection string and save the value for later.
3.1. Login to the Tartabit IoT Bridge.
3.2. Navigate to Solution Templates.
3.3. Import the Quectel DevKit to Azure IoT Hub
template.
3.4. Enter the IMEI of your Quectel module.
3.6. Enter the connection string you retrieved in 2.4
.
3.7. Check the box to "Start triggers".
3.8. Click Import
4.1. Restart your Quectel module.
4.2. Verify the IoT Bridge endpoint is connected
4.3. Verify the device is connected in Azure IoT Hub by using either the Azure IoT Hub Explorer or the Azure Portal.