SARA-R4 / SARA-R5 - Application note
UBX-20032566 - R05 Contents Page 4 of 66
C1-Public
5.3.3 Queue FULL .......................................................................................................................................31
5.4 Socket operations with "Keep Alive" option .........................................................................................31
5.5 Socket read (+USORD) .............................................................................................................................32
5.6 Socket write (+USOST) ............................................................................................................................34
5.7 Socket read (+USORF) .............................................................................................................................34
5.8 Socket state ...............................................................................................................................................36
5.9 Socket close ...............................................................................................................................................36
5.10 Testing sockets .........................................................................................................................................37
5.11 Secure socket ............................................................................................................................................37
6 MQTT ...................................................................................................................................................... 38
6.1 Basic setup .................................................................................................................................................38
6.1.1 Default and minimal configuration ...............................................................................................38
6.1.2 Last will configuration .....................................................................................................................38
6.1.3 Profile management .........................................................................................................................38
6.2 Start and end a MQTT session ..............................................................................................................39
6.3 Subscribe to a topic and publish a message to the same topic ......................................................39
6.4 Publish a message with hexadecimal mode set .................................................................................40
6.5 Publish a binary message to a topic ......................................................................................................41
6.6 Ping the MQTT broker ..............................................................................................................................41
6.7 Last will packet ..........................................................................................................................................41
6.8 Debug ...........................................................................................................................................................42
6.9 Secure MQTT .............................................................................................................................................42
7 MQTT-SN ............................................................................................................................................... 43
7.1 Basic setup .................................................................................................................................................43
7.1.1 Default and minimal configuration ...............................................................................................43
7.1.2 Last will configuration .....................................................................................................................43
7.1.3 Profile management .........................................................................................................................43
7.2 Start and end a MQTT-SN session........................................................................................................44
7.3 Subscribe to a normal topic ....................................................................................................................44
7.4 Publish and read a message to a topic .................................................................................................44
7.5 Unsubscribe from a normal topic ..........................................................................................................45
7.6 Register to a topic and publish a message to the same topic .........................................................45
7.7 Subscribe to a short topic name and publish a message to the same topic ................................45
7.8 Last will .......................................................................................................................................................45
7.9 Error handling ............................................................................................................................................46
7.10 Secure MQTT-SN ......................................................................................................................................46
7.11 MQTT Anywhere ........................................................................................................................................46
7.12 MQTT Flex ..................................................................................................................................................47
7.12.1 Specify the client key and certificate to be used .......................................................................48
7.12.2 Configure the DTLS security profile .............................................................................................48
7.12.3 Configure the MQTT-SN client ......................................................................................................48
8 CoAP ........................................................................................................................................................ 49