This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Issues connecting to cloud with NB-IoT

Hello!

I'm currently working on an IoT device that is supposed to send data to the cloud using MQTT with a TLS layer. We got this working in Norway using LTE-M and the sensor is operating as normal. However, we wanted to test this sensor in a different country where LTE-M is not supported, but NB-IoT is. The only difference that we have done is adding these commands in the prj.config:

CONFIG_LTE_NETWORK_MODE_LTE_M=n
CONFIG_LTE_NETWORK_MODE_NBIOT=y

We then created a certificate and private key for the new IoT device. We are currently using AWS to gather and store our data so this is where we would get our certificates from. However, when the sensor is booted up we experience this kind of error:

[00:00:03.295,104] <inf> cloud_mqtt: Cloud CA certificates provisioned
[00:00:03.295,104] <inf> cloud_mqtt: Cloud service sucessfully initialized
[00:00:03.352,264] <inf> cloud_mqtt: Connecting to LTE network (async)...
+CEREG: 2,"0012","0AAEEF01",9,0,0,"11100000","11100000"
+CSCON: 1
[00:00:06.720,642] <dbg> at_monitor.at_monitor_task: AT notif: +CEREG: 2,"0012","0AAEEF01",9,0,0,"11100000",~
[00:00:06.720,642] <dbg> at_monitor.at_monitor_task: Dispatching to 0x31d7b
[00:00:06.725,982] <dbg> at_monitor.at_monitor_task: Dispatching to 0x287a1
[00:00:06.726,379] <inf> cloud_mqtt: LTE cell changed: Cell ID: 179236609, Tracking area: 18
[00:00:06.938,659] <dbg> at_monitor.at_monitor_task: AT notif: +CSCON: 1

[00:00:06.938,659] <dbg> at_monitor.at_monitor_task: Dispatching to 0x31d7b
[00:00:06.939,636] <dbg> at_monitor.at_monitor_task: Dispatching to 0x28351
[00:00:06.939,758] <inf> cloud_mqtt: RRC mode: Connected

+CEREG: 1,"0012","0AAEEF01",9,,,"11100000","11100000"
[00:00:08.488,647] <dbg> at_monitor.at_monitor_task: AT notif: +CEREG: 1,"0012","0AAEEF01",9,,,"11100000","1~
[00:00:08.488,677] <dbg> at_monitor.at_monitor_task: Dispatching to 0x31d7b
[00:00:08.493,865] <dbg> at_monitor.at_monitor_task: Dispatching to 0x287a1
[00:00:08.494,201] <inf> cloud_mqtt: Network registration status: Connected - home network
[00:00:08.494,689] [1;31m<err> cloud_mqtt: Resolving broker hostname address failed, err -2
[00:00:08.494,720] [1;31m<err> cloud_mqtt: Failed to initialize broker connection
[00:00:08.494,720] [1;31m<err> cloud_mqtt: Cloud service could not be connected, error:-10
[00:00:08.494,720] [1;33m<wrn> main: Cloud connect failed, rescheduled in 100 sec, error:-10
[00:00:08.495,147] <inf> cloud_mqtt: PSM parameter update: TAU: 3240, Active time: -1

At first, we thought this maybe had something to do with the certificates and it was basically denied access to the AWS server. To test this theory out we decided to switch to Mosquitto test servers, give the sensor some new keys, and run the whole system again. But sadly we ended up with the same result. So my question is:
Is anyone familiar with this issue? Is there something we have overlooked and/or is there some useful information that can be gathered from the log above?

Looking forward to everyone's thoughts and thank you in advance!

edit:
I would like to note that the modem firmware version is 1.2.3 and the software running on the device is nordics SDK 9.1. I do not know if this is relevant, but it doesn't hurt adding some more information. The sim card that is being used is also an IoT sim card.

Parents
  • NB-IoT networks typically do not support TCP connections, they only provide UDP. Therefore you won't be able to make an MQTT connection in such a network (MQTT depends on TCP for flow control). 

  • Okay, that makes sense. Thank you for the answer!

    I have another question as well if you don't mind:
    On the prototypes we have running in Norway we are using "normal" phone sim-cards which probably use LTE instead of LTE-M. As mentioned above everything is operating as normal. How it basically works is that every 5 minutes the sensor sends data to AWS. However, every now and then we see the sensor skipping an interval and waiting 11-14 minutes instead 5 minutes. Our theory here is that it has disconnected from the network and then after some time reconnects. But we are very uncertain about the cause of this?  The sensors are placed rather close to the city center of Trondheim, so the connection should not be an issue here. Do you have any thoughts about this?

  • Well, regular Smartphone SIMs are not officially supported, you need a dedicated IoT SIM. You are entering undefined territory so there are many things that can go wrong. You could have a look at the modem traces to figure out what's going wrong.

Reply Children
No Data
Related