[MQTT/SARAR4] Issue during MQTT publish
Guillaume Paquet
Hello Zephyr Community,
I am trying to use example in samples/net/mqtt_publisher. I am on zephyr 2.0 release and I use SARA R4 driver to try this example. I just changed prj.conf to use MQTT (not secured) on my own mosquito broker (on infomaniak server).
I don’t achieve to connect to MQTT broker and I always have following error message: MQTT connect failed -111
Moreover, I tried to see what is send to SARA-R4 module (and what is its answer).
I can see that it loops several times on same command whereas command is ok and well understood by my SARA R4 module AT+USOWR=0,30 @ 101c00044d5154540402003c00107a65706879725f7075626c6973686572 +USOWR: 0,30
OK
Do you have any idea on what can happen ? For your information, it works when I use zephyr 1.14.1 with 1st SARA R4 driver revision.
Thanks in advance for your help
Don’t hesitate if you need more information
Rgds,
Guillaume Guillaume PAQUET – IoT Engineer guillaume.paquet@... - 02 40 18 50 91 1 Avenue Professeur Jean Rouxel – ZAC Fleuriaye 44470 CARQUEFOU – FRANCE
|
|
Hi Guillaume,
Do you have the debug output showing
This could be caused by a number of things. You may find that there have been some configuration changes in the SARA driver which could be effecting your connection. Billy..
|
|
Guillaume Paquet
Hello William,
Thanks for your feedback. Yes please find below output in my console:
SEGGER J-Link V6.48 - Real time terminal output J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15 V1.0, SN=682005484 Process: JLinkExe [00:00:00.677,947] <inf> modem_ublox_sara_r4: Setting Modem Pins [00:00:10.878,143] <inf> modem_ublox_sara_r4: ... Done! [00:00:10.878,173] <inf> modem_ublox_sara_r4: Waiting for modem to respond [00:00:25.453,521] <inf> modem_ublox_sara_r4: Manufacturer: AT+CGMI [00:00:25.454,284] <inf> modem_ublox_sara_r4: Manufacturer: u-blox [00:00:25.510,009] <inf> modem_ublox_sara_r4: Model: AT+CGMM [00:00:25.511,474] <inf> modem_ublox_sara_r4: Model: SARA-R412M-02B [00:00:25.567,169] <inf> modem_ublox_sara_r4: Revision: <log_strdup alloc failed> [00:00:25.570,129] <inf> modem_ublox_sara_r4: Revision: <log_strdup alloc failed> [00:00:25.625,823] <inf> modem_ublox_sara_r4: IMEI: <log_strdup alloc failed> [00:00:25.627,380] <inf> modem_ublox_sara_r4: IMEI: <log_strdup alloc failed> [00:00:25.776,062] <inf> modem_ublox_sara_r4: Waiting for network [00:00:27.782,928] <inf> modem_ublox_sara_r4: RSRP: -1000 [00:00:29.790,222] <inf> modem_ublox_sara_r4: RSRP: -1000 [00:00:31.797,546] <inf> modem_ublox_sara_r4: RSRP: -88 [00:00:33.798,065] <inf> modem_ublox_sara_r4: Network is ready. [00:00:33.798,248] <err> modem_ublox_sara_r4: NET_SOCKET_OFFLOAD must be configured for this driver [00:00:33.798,248] <wrn> net_dns_resolve: Cannot initialize DNS resolver (-134) ***** Booting Zephyr OS build zephyr-v2.0.0-41-g94019097bb8c ***** [00:00:34.842,803] <inf> net_config: Initializing network [00:00:34.842,864] <inf> net_config: IPv4 address: 83.166.154.87 attempting to connect: socket_id:0 left_bytes:4 err: 4 MQTT connect failed -111 socket_id:1 left_bytes:4 err: 4
I can see that Network connection is ok MQTT server is not reachable.
For your information, I achieved to make it works with previous revision of SARA R4 driver.
I also made some debug on UART bus and I saw something strange on +UUSORD unsolicited answer management
This section is working AT+USOCR=6,47069 +USOCR: 1 OK
AT+USOCO=1,"83.166.154.87",1883 OK
AT+USOWR=1,30 @ +USOWR: 1,30 OK +UUSORD: 1,4
AT+USORD=1,4 +USORD: 1,4,"20020000" OK
AT+USOWR=1,2 @ +USOWR: 1,2 OK +UUSORD: 1,2 AT+USORD=1,2 +USORD: 1,2,"D000" OK
….
This section is not working and we can see that +UUSORD does not come at the good moment. AT+USOCR=6 +USOCR: 0
OK AT+USOCO=0,"83.166.154.87",1883 OK AT+USOWR=0,30 @ +USOWR: 0,30
OK AT+USOWR=0,30 @ +USOWR: 0,30
OK AT+USOWR=0,30 @ +USOWR: 0,30
OK
+UUSORD: 0,4 AT+USOWR=0,30 @ +CME ERROR: 3
Can you please let me know if SARA R4 is tested on MQTT or just on LWM2M example ? (I did not try this last one because I have not any LWM2M server available).
I hope my mail is clear enough (I know it is a bit long 😊)
Really thanks for your help
Rgds
Guillaume
De : devel@... <devel@...>
De la part de William Fish via Lists.Zephyrproject.Org
Hi Guillaume,
At first glance it appears that you aren't connected (Err 111: Connection refused).
|
|
Jukka Rissanen
Hi Guillaume, it sounds like sara modem driver has a regression. Could you create a bug report for this at On Wed, 2020-01-08 at 12:43 +0000, Guillaume Paquet wrote:
I suspect that only LWM2M example was used for testing sara-r4 modem. Cheers, Jukka
|
|
Guillaume Paquet
Hi Jukka,
Thanks for your answer. I created issue here https://github.com/zephyrproject-rtos/zephyr/issues/21764
I don’t assign it.
Rgds,
Guillaume
De : Jukka Rissanen <jukka.rissanen@...>
Hi Guillaume,
it sounds like sara modem driver has a regression. Could you create a bug report for this at
On Wed, 2020-01-08 at 12:43 +0000, Guillaume Paquet wrote:
I suspect that only LWM2M example was used for testing sara-r4 modem.
Cheers, Jukka
|
|