Re: Azure MQTT with GSM modem over PPP #nrf52840 #mqtt #ppp #modem


Jukka Rissanen
 

Hi Petrus,

On Thu, 2021-01-28 at 03:49 -0800, petrus.vanderwalt@... wrote:
Hi, Zephyr community.  I am trying to add Azure MQTT functionality to my project.  I am using an nRF52840 with a Quectel BG96/Sara R412M-02B.  I would also like to use the modem functionality to communicate to cellular towers over PPP.

Currently, I have the gsm_modem sample up and running for my Quectel BG96 and U-Blox SARA R412.  I also have the tagio_http_post sample up and running.  I would also want to adapt the tagio_http_post sample to work for Azure.  Would this be easy to do?  Have anyone tried to do this?

Did you need to do any changes to generic gsm modem in order to get the BG96 or SARA modem working. I do not have these modems, so would be interested to know if they worked ok without any special modifications.

To you other question, do you want to connect to azure without using mqtt? Then probably you could use the tagio as a base and change it according to relevant configs found in azure sample. If you get this working, it would be nice to have a separate sample for this.


I am now playing around with the mqtt_azure sample.  I have added PPP support by adding a modem overlay.  I had to disable the DHCPV4 and use a static IP address.  The sample
[00:00:13.283,172] <inf> modem_gsm: Manufacturer: u-blox
[00:00:13.362,243] <inf> modem_gsm: Model: SARA-R412M-02B
[00:00:13.442,871] <inf> modem_gsm: Revision: M0.10.00 [Mar 28 2019 17:13:41]
[00:00:13.523,864] <inf> modem_gsm: IMSI: 655014150468485
[00:00:13.604,797] <inf> modem_gsm: ICCID: 89415000000004684852
[00:00:13.685,394] <inf> modem_gsm: IMEI: 354679092855504
[00:00:13.847,473] <inf> modem_gsm: Attached to packet service!
[00:00:13.880,706] <inf> net_ppp: Initializing PPP to use UART_1
[00:00:13.904,815] <inf> net_config: Interface 1 (0x20000544) coming up
[00:00:13.931,030] <inf> net_config: IPv4 address: 192.0.2.1
[00:00:13.954,803] <dbg> mqtt_azure.main: Waiting for network to setup...
[00:00:15.979,888] <err> mqtt_azure: DNS not resolved for WCM.azure-devices.net:
[00:00:16.744,842] <inf> mqtt_azure: DNS resolved for WCM.azure-devices.net:8883
[00:00:16.770,294] <dbg> mqtt_azure.try_to_connect: attempting to connect...
[00:00:19.802,642] <err> mqtt_azure: mqtt_connect failed -116
[00:00:22.833,923] <err> mqtt_azure: mqtt_connect failed -116
[00:00:25.865,234] <err> mqtt_azure: mqtt_connect failed -116

I can not seem to find the definition of error -116.  Does anyone have an idea what this error is referring to?

The 116 errno is ETIMEDOUT and comes from newlib which can be found in Zephyr SDK.



Cheers,
Jukka

Join users@lists.zephyrproject.org to automatically receive all group messages.