NORA-W36 u-connectXpress user guide

NORA-W36 u-connectXpress user guide

u-blox short range stand-alone modules

short range

This document provides an overview of the u-connectXpress software for u-blox short range modules and describes how the products can be configured for Wi-Fi and Bluetooth Low Energy use cases.

short rangeshort range

Document information

TitleNORA-W36 series u-connectXpress User Guide
Subtitleu-blox short range stand-alone modules
Document typeUser guide
Document numberUBX-23008692
Revision and dateR01 - Mar-18-2024
Disclosure restrictionC1-Public


This document applies to the following products

Product nameSoftware version
NORA-W36 series1.0.0 or newer


1 Overview

This document describes how to set up and use u-blox short range stand-alone modules with u-connectXpress software. It explains the functionality of different u-blox short range stand-alone modules and includes examples that describe how to use the software in different environments with AT commands. The document is applicable for Bluetooth® Low Energy (LE), multiradio, and Wi-Fi modules.

Several u-blox short range stand-alone modules support open software variants. For more information about the available options, see the corresponding system integration manuals for u-blox short range stand-alone modules.

1.1 Getting started with s-center 2

Downloading and installing

  1. Download the latest version of s-center 2 here
  2. Double click the downloaded file and follow the installation instructions
  3. Launch s-center 2 when the installation is completed

s-center 2

1.2 Product description

1.2.1 General

u-blox modules are developed for integration into a vast range of devices that demand a high level of reliability, such as those that are typically used in industrial and medical applications.

These professional grade modules operate over an extended temperature range and are approved for radio type application products in many countries. By choosing to use u-blox short range stand-alone modules, the cost and work involved in developing wireless communication solutions is significantly reduced.

ConceptDefinition
HostIn this document, a host refers to the device connected to a u-blox short range stand-alone module
through any of the available physical interfaces. In a real application, the host is typically
a microcontroller Unit (MCU) running a customer specific application.
ModuleIn this document, module refers to a u-blox stand-alone module.
A module can also refer to a self-contained unit or item that is linked with similar units of a larger system that performs a defined task.
Remotedevice A remote device in a wireless network connecting over the Bluetooth Low Energy or Wi-Fi interfaces supported in the module.

1.2.2 Multiradio and Wi-Fi modules

u-blox compact and powerful stand-alone, multiradio modules are designed for the development of Internet-of-Things (IoT) applications. The NORA-W36 modules include embedded Bluetooth stack, Wi-Fi driver, IP stack, and an application for wireless data transfer. The wireless support includes Bluetooth v5.3 (Low Energy) and dual-band Wi-Fi (2.4 and 5 GHz bands).

The modules support point-to-point and point-to-multipoint configurations and can accommodate concurrent Bluetooth and Wi-Fi connections. The software provides support for micro Access Point. Some modules also have support for interfacing the module through an SPI (Serial Peripheral Interface).

They are delivered with u-connectXpress software that provides support for u-blox Bluetooth LE Serial Port Service, Generic Attribute Profile (GATT) client and server, Bluetooth beacons, simultaneous Peripheral and Central roles – all configurable from a host by means of AT commands.


2 Key features

The possibility of replacing serial cables with simple wireless connections is a key feature of u-blox modules. It allows system hosts to transfer data to one another over wireless Bluetooth connections that are established between u-blox modules in Central/Peripheral configuration.

Depending on the module capabilities, data from each host is transferred to local u-blox modules over a serial UART interface.

u-blox modules can be configured to automatically establish new connections and/or accept incoming connections using AT commands. For connected hosts, this means that physical serial cables can be replaced with more convenient wireless solutions.

Bluetooth SPS connection


short range

Wi-Fi connection


short range

Wi-Fi Wi-Fi station connection


short range

Wi-Fi access point connection


short range

3 u-connectXpress software

3.1 Software architecture

u-connectXpress software for u-blox short range stand alone modules makes it easy to integrate Bluetooth and Wi Fi connectivity into new and existing products.

In several high-end modules, u-connectXpress software contains separate stacks for Bluetooth Low Energy (LE), and wireless (TCP/IP). The necessary Wi-Fi drivers are also included. Other module variants support different combinations of these stacks.

Figure below shows the logical components for high-end (NORA-W36) modules.

short range

3.2 Operating modes

The module operates in the following modes:

  • AT mode (default)
  • Transparent Mode (TM)
    • All data send and received on the UART is connected to the remote device
  • Transparent Mode Persistent (TMP)
    • Same as TM, but connection is established at startup or when dropped

In addition, the module supports a number of different low-power modes, allowing power consumption optimization, independent of operating mode. See also Low power modes and Power consumption optimization.

3.2.1 Changing operating modes

u-blox modules can be configured to start in any operating mode. Once up and running, the modules can be switched between most modes. The modes are changed with a command or escape sequence sent to the module.

AT command is used to switch from Command mode to Transparent mode. Escape sequence is used to change from transparent mode to command mode.

The module is controlled using AT commands in (default) Command mode. In this mode the host sends control and configuration commands and indicates when data is to be sent over the UART interface.

3.3 NORA-W36 capabilities

u-connectXpress featuresCapability in 1.0.0
MultiradioBluetooth Low Energy 5.3 and Wi-Fi 4 dual band 2,4 and 5 GHz
Wi-Fi Access Point5 Stations connected
TCP/UDP sockets3 Simultaneous sockets
MQTT Connections1 Connection (client)
BLE Mode defaultON, Central and Peripheral
BLE Central connections3 Peripherals connected
BLE Peripheral connections1 Central connected
BLE Scatternet connections (C+P)Central with 1 Peripheral connected, advertising and
allow incoming connection as Peripheral
BLE Advertising defaultOFF
BLE Link key storage30 Devices, keys that are the least used are removed first when storage is full
Coexistence Wi-Fi, BLE and TLSMax 1 TLS client, 1 BLE, 2 TCP Client
Data modesBuffer Mode (event and read data), Direct Mode (data in event) and Transparent mode (serial port cable replacement), Buffer Mode is Default, Transparent mode only supports one link. Transparent Mode has highest throughput, then Direct Mode and then Buffer Mode
Startup timeAbout 2 seconds


u-connectXpress software componentsVersions in 1.0.0
Realtek SDK including Bluetooth stack and Wi-Fi drivers6.2 + patches eb65546, 03911c3, 6dfd87c, bf52a1f, 1bcc6de, 373f322, 0a63ad1
lwIP TCP/IP stack2.0.3
Mbed TLS cryptographic algorithms2.4.0


u-connectXpress MQTT clientVersions in 1.0.0
MQTT version3.1.1
MQTT capabilitiesPublish, Subscribe, TLS, QoS, Testament and Last will
MQTT maximum packets size730 bytes for Publish and Subscribe packets


u-connectXpress TLS featureTLS capability in 1.0.0
TLS versionOnly TLS1.2 (TLS 1.3 is planned for future versions)
TLS max number of connections1
TLS extensions enabled by defaultServer Name Indication (SNI), Maximum Fragment Length Negotiation
TLS Encryption keysAES (DES is not supported)
EAP-TLS certificate key size supported2048 bits (4096 bits may run out of memory)
TLS over TCP certificate key size supported4096 bits
TLS certificatesMaximum 8 certs (or certs chains) can be stored
Certificates can be maximum 15360 bytes
TLS Cipher Suites (29 suites)TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 (0xc024)
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (0xc028)
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (0x006b)
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (0xc00a)
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014)
TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039)
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 (0xc023)
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (0x0067)
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA (0xc009)
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)
TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033)
TLS_RSA_WITH_AES_256_CBC_SHA256 (0x003d)
TLS_RSA_WITH_AES_256_CBC_SHA (0x0035)
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 (0xc02a)
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA (0xc00f)
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 (0xc026)
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA (0xc005)
TLS_RSA_WITH_AES_128_CBC_SHA256 (0x003c)
TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 (0xc029)
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA (0xc00e)
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 (0xc025)
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA (0xc004)
TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 (0x00b7)
TLS_RSA_PSK_WITH_AES_256_CBC_SHA (0x0095)
TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 (0x00b6)
TLS_RSA_PSK_WITH_AES_128_CBC_SHA (0x0094)
TLS Signature Hash Algorithms (10 algorithms)ecdsa_secp521r1_sha512 (0x0603)
rsa_pkcs1_sha512 (0x0601)
ecdsa_secp384r1_sha384 (0x0503)
rsa_pkcs1_sha384 (0x0501)
ecdsa_secp256r1_sha256 (0x0403)
rsa_pkcs1_sha256 (0x0401)
SHA224 ECDSA (0x0303)
SHA224 RSA (0x0301)
ecdsa_sha1 (0x0203)
rsa_pkcs1_sha1 (0x0201)
TLS ExtensionsServer name (SNI)
Max fragment length: 4096 (4)


3.4 NORA-W36 u-connectXpress use cases

More information about the AT commands used in this use cases can be found in the NORA-W36 AT command manual

Supported modulesSoftware versions
NORA-W36 seriesv1.0.0 onwards


4 Bluetooth use cases

  • Peripheral MAC address: AAAAAAAAAAAA
  • Central MAC address: BBBBBBBBBBB

4.1 Bluetooth SPS central

This use case connects two NORA-W36 using SPS (proprietary u-blox Serial Port Service) and sends and receives data.
It is also possible to connect to other devices like a Phone, that supports the SPS protocol.

Works together with Bluetooth SPS peripheral.


bt-sps-central

NrInstructionsAT commandAT event
1Check that Bluetooth Central is enabled, 1:Central or 3:Central and Peripheral,
if so move to step 6
AT+UBTM?+UBTM:1 or +UBTM:3
2Enable Bluetooth 1:Central or 3:Central and PeripheralAT+UBTM=1 or AT+UBTM=3
3Store commandAT&W
4RestartAT+CPWROFF
5Wait for NORA-W36 to startup+STARTUP
6Central make a Device Discovery to find MAC address (optional)AT+UBTD+UBTD:AAAAAAAAAAAAp,-52,"NORA-W36-AAAAAA",0,10094E4F52412D5733362D414141414141
7Connect BluetoothAT+UBTC=AAAAAAAAAAAAp+UEBTC:0,AAAAAAAAAAAAp
8Read MTU, maximum data sizeAT+UBTCST=0,4+UBTCST:4,247
9Read RSSI (optional)AT+UBTRSS=0+UBTRSS:-52
10Connect SPS using handle of Bluetooth connectionAT+USPSC=0
11SPS connection is up+UESPSC:0
12It is now possible to send and receive SPS data in String or Binary mode
13Disconnect the SPS and Bluetooth connectionAT+UBTDC=0+UESPSDC:0
+UEBTDC:0

4.2 Bluetooth SPS peripheral

This use case connects two NORA-W36 using SPS (proprietary u-blox Serial Port Service) and sends and receives data.
It is also possible to connect to other devices like a Phone, that supports the SPS protocol.

Works together with Bluetooth SPS centeral.


bt-sps-central

NrInstructionsAT commandAT events
1Check that Bluetooth Peripheral is enabled, 2:Peripheral and 3:Central and Peripheral,
if so move to step 6
AT+UBTM?+UBTM:2 or +UBTM:3
2Enable Bluetooth 2:Central or 3: Central and PeripheralAT+UBTM=1 or AT+UBTM=3
3Store commandAT&W
4RestartAT+CPWROFF
5Wait for NORA-W36 to startup+STARTUP
6Enable SPS on PeripheralAT+USPS=1
7Enable AdvertisementsAT+UBTA=1
8Peripheral receives Incoming Bluetooth connection+UEBTC:0,BBBBBBBBBBBBp
9Read MTU, maximum data size on bothAT+UBTCST=0,4+UBTCST:4,247
10Read RSSI (optional)AT+UBTRSS=0+UBTRSS:-52
11Central Connect SPS using handle of Bluetooth connectionAT+USPSC=0+UESPSC:0
12It is now possible to send and receive SPS data in String or Binary mode
13SPS and Bluetooth link is down+UESPSDC:0
+UEBTDC:0

4.5 Bluetooth GATT client

This use case connects NORA-W36 as central using GATT client and receives data.


Works together with Bluetooth GATT Server.


bt-gatt-glient

NrInstructionsAT commandAT event
1Check that Bluetooth Central is enabled, 1:Central or 3:Central and Peripheral,
if so move to step 6
AT+UBTM?+UBTM:1 or +UBTM:3
2Enable Bluetooth 1:Central or 3:Central and PeripheralAT+UBTM=1 or AT+UBTM=3
3Store commandAT&W
4RestartAT+CPWROFF
5Wait for NORA-W36 to startup+STARTUP
6Connect to remote deviceAT+UBTC=AAAAAAAAAAAAp+UEBTC:0,AAAAAAAAAAAAp
7Discover Services and look for 180D that is the Heart Rate serviceAT+UBTGPSD=0+UBTGPSD:0,12,65535,180D
8Discover all Service Characteristics and look for 2A37 that is the Heart Rate Measurement characteristicsAT+UBTGSCD=0,12,65535+UBTGSCD:0,13,10,14,2A37
9Use the Value handle, in this case 14, but may vary and get the descriptor and look for the 2902 that is descriptor for the notificationAT+UBTGCDD=0,14,15+UBTGCDD:0,13,15,2902
10Enable notification on the GATT Client the Central in this exampleAT+UBTGCCW=0,15,1
11Notification is received on the GATT Client+UEBTGCN:0,14,60
+UEBTGCN:0,14,61
+UEBTGCN:0,14,62

4.6 Bluetooth GATT server

This use case connects NORA-W36 as Peripheral using GATT Server and sends notifications.


Works together with Bluetooth GATT Client.


bt-gatt-server

NrInstructionsAT commandAT event
1Check that Bluetooth Peripheral is enabled, 2:Peripheral and 3:Central and Peripheral,
if so move to step 6
AT+UBTM?+UBTM:2 or +UBTM:3
2Enable Bluetooth 2:Central or 3: Central and PeripheralAT+UBTM=1 or AT+UBTM=3
3Store commandAT&W
4RestartAT+CPWROFF
5Wait for NORA-W36 to startup+STARTUP
6Enable Advertisements to allow connectionsAT+UBTA=1
7Write the Heart Rate serviceAT+UBTGS=180D+UBTGS:12
8Write the GATT characteristic and enable notificationAT+UBTGC=2A37,3A,1,1,0+UBTGC:14,15
9Wait for incoming Bluetooth connectionAT+UBTGCDD=0,14,15+UEBTC:0,BBBBBBBBBBB
10Get the MTU for the connection (optional)AT+UBTCST=0,4+UBTCST:4,247
11Get the Role for the connection (optional)AT+UBTCST=0,8+UBTCST:8,1
12Send a notification from the GATT Server using the value handleAT+UBTGNS=0,14,60
AT+UBTGNS=0,14,61
AT+UBTGNS=0,14,62

4.5 Bluetooth advertise

This use case connects NORA-W36 as peripheral using GATT client and receives data.


Works together with Apple iPhone using the The Apple Notification Center Service (ANCS).

NrInstructionsAT commandAT event
1Check that Bluetooth Peripheral is enabled, 2:Peripheral and 3:Central and Peripheral,
if so move to step 6
AT+UBTM?+UBTM:2 or +UBTM:3
2Enable Bluetooth 2:Central or 3: Central and PeripheralAT+UBTM=1 or AT+UBTM=3
3Store commandAT&W
4RestartAT+CPWROFF
5Wait for NORA-W36 to startup+STARTUP
6Set Apple ANCS Advertise data packetAT+UBTAD=1115D0002D121E4B0FA4994ECEB531F40579
7Enable AdvertisementsAT+UBTA=1
8Peripheral receives Incoming Bluetooth connection+UEBTC:0,BBBBBBBBBBBBp
9Discover Services and look for 180A that is the Device InformationAT+UBTGPSD=0+UBTGPSD:0,1,5,1800
+UBTGPSD:0,6,9,1801
+UBTGPSD:0,10,14,180A
+UBTGPSD:0,15,19,D0611E78BBB44591A5F8487910AE4366
+UBTGPSD:0,20,24,9FA480E0496745429390D343DC5D04AE
+UBTGPSD:0,25,28,180F
+UBTGPSD:0,29,34,1805
+UBTGPSD:0,35,44,7905F431B5CE4E99A40F4B1E122D00D0
+UBTGPSD:0,45,56,89D3502B0F36433A8EF4C502AD55F8DC
10Discover all Service Characteristics and look for 2A29 that is the Manufacturer Name String characteristicsAT+UBTGSCD=0,10,14+UBTGSCD:0,11,02,12,2A29
+UBTGSCD:0,13,02,14,2A24
11Read the Manufacturer Name String Apple Inc. characteristics on handle 12AT+UBTGR=0,12+UBTGR:0,12,4170706C6520496E632E (Apple Inc.)

4.6 Bluetooth security

Pairing

  • Pairing is the initial process where two Bluetooth devices exchange information necessary to establish an encrypted connection
  • During pairing, devices negotiate security parameters, such as encryption keys and authentication methods
  • It ensures that communication between devices remains confidential and secure

    Think of pairing as the handshake that sets the foundation for a secure link

Bonding

  • Bonding occurs after successful pairing
  • It involves storing the information from the pairing process on both devices
  • Once bonded, devices remember each other’s security credentials (keys) for future reconnections
  • Bonding eliminates the need to repeat the pairing process every time the devices reconnect
  • Essentially, bonding creates a permanent security relationship between the devices

In summary

  • Pairing: Establishes the initial secure connection
  • Bonding: Ensures that the devices remember each other’s security details for subsequent interactions
  • Remember, these processes are essential for maintaining the confidentiality and integrity of data exchanged over Bluetooth connections

4.6.1 Bluetooth security bond initiater

Bluetooth Security is by disabled default and needs to be configured and enabled before use.

AT+UBTIOC - Bluetooth I/O Capabilities

AT+UBTBSM - Bluetooth Bond Security Mode

AT+UBTB - Bluetooth Bond

AT+UBTBDL - Bluetooth Bonded Devices List

TBD

NrInstructionsAT commandAT event
1Connect to remote deviceAT+UBTC=AAAAAAAAAAAAp+UEBTC:0,AAAAAAAAAAAAp
2Discover Services and look for 180D that is the Heart Rate serviceAT+UBTGPSD=0+UBTGPSD:0,12,65535,180D

4.6.2 Bluetooth security bond responder

Bluetooth Security is by disabled default and needs to be configured and enabled before use.

AT+UBTIOC - Bluetooth I/O Capabilities

AT+UBTBSM - Bluetooth Bond Security Mode

AT+UBTPM - Bluetooth Pairing

AT+UBTBDL - Bluetooth Bonded Devices List

TBD

NrInstructionsAT commandAT event
1Connect to remote deviceAT+UBTC=AAAAAAAAAAAAp+UEBTC:0,AAAAAAAAAAAAp
2Discover Services and look for 180D that is the Heart Rate serviceAT+UBTGPSD=0+UBTGPSD:0,12,65535,180D


5 Wi-Fi use cases

Supported modulesSoftware versions
NORA-W36v1.0.0 onwards
  • Station MAC address: AAAAAAAAAAAA
  • Access Point MAC address: BBBBBBBBBBB

5.1 Wi-Fi station

Connect as a Wi-Fi station to an Access Point to get access to network.


The connection has DHCP client as default.


wi-fi-station

NrInstructionsAT commandAT event
1Set SSID for the NetworkAT+UWSCP=0,"NORA-W36 Access Point"
2Set the Password, minimum WPA2
and DHCP client is default
AT+UWSSW=0,"mypassword",0
3Connect Wi-Fi stationAT+UWSC=0
4Wait for Wi-Fi interface+UEWLU:0,BBBBBBBBBBB,6
5Wait for Network interface+UEWSNU
6Check IP address (optional)AT+UWSNST=0+UWSNST:0,192.168.1.100
7Check RSSI (optional)AT+UWSST=4+UWSST:4,-66
8It is now possible to connect TCP, UDP
and send and receive data using String or Binary mode.
It is also possible to connect MQTT
9Disconnect Wi-Fi stationAT+UWSDC
  • Note: If NORA-W36 should connect to Wi-Fi at startup the Connect, Store and Reset should be send, AT+UWSC=0, AT&W and AT+CPWROFF, the current Wi-Fi Station state is be stored in flash and NORA-W36 will try to connect using the stored SSID and password at startup

5.2 Wi-Fi access point

This use case NORA-W36 act as a Wi-Fi Access Point to let Wi-Fi Stations connect and send and receive data to NORA-W36.


The Wi-Fi connection has WPA2 and DHCP server (connected stations will get a 192.168.1.100 + x IP address) as default.


wi-fi-ap

NrInstructionsAT commandAT event
1Set SSID and channel for the Network
and use channel 6
AT+UWAPCP="NORA-W36 Access Point",6
2Set the Password, using WPA2AT+UWAPSW="mypassword"
3Activate Wi-Fi Access point
DHCP Server is enabled by default
AT+UWAPA
4Wait for Access Point+UEWAPU
5Wait for Network interface+UEWAPNU
6Check IP address of the AP (optional)AT+UWAPNST=0+UWAPNST:0,192.168.1.80
7Station connected+UEWAPSA:AAAAAAAAAAAA
8It is now possible to connect TCP, UDP
and send and receive data using String or Binary mode.
It is also possible to connect MQTT
9Station disconnect+UEWAPSDA:AAAAAAAAAAAA
10Deactivate Wi-Fi Access PointAT+UWAPD
  • Note: If NORA-W36 should activate Wi-Fi Access Point at startup the Activate, Store and Reset should be send, AT+UWAPA, AT&W and AT+CPWROFF, the current Wi-Fi Access Point state is be stored in flash and NORA-W36 will activate the Access Point using the stored SSID and password at startup

5.3 Wi-Fi TCP client

  • ATE0 turn of AT command echo to speed up the data transmission in AT mode, the written data is not echoed back to the host, and the also for making the parsing easier
  • It is possible to connect using host name like AT+USOC=0,www.u-blox.com,80 or using ip address AT+USOC=0,75.2.60.5,80
  • TCP is bidirectional and both send and receive is possible from TCP client and server

TCP is bidirectional and one socket can both send and receive data.

NrInstructionsAT commandAT event
1Create a TCP socketAT+USOCR=6+USOCR:0
2Connect using TCP port 5003AT+USOC=0,192.168.0.200,5003+UESOC:0
3It is now possible to send and receive data using String or Binary mode
4Close TCP socketAT+USOCL=0+UESOCL:0

5.4 Wi-Fi TCP server (listener)

NrInstructionsAT commandAT event
1Create a TCP socketAT+USOCR=6+USOCR:0
2Start TCP server (listener) on port 5003AT+USOL=0,5003+UESOC:0
3Incoming TCP connection, a new handle 1 to communicate with the connection+UESOIC:0,192.168.1.100,1
4It is now possible to send and receive data using String or Binary mode
5TCP connection is closed from remote side+UESOCL:1
6Close TCP listenerAT+USOCL=0+UESOCL:0

5.5 Wi-Fi UDP client

  • It is possible to connect using host name like AT+USOC=0,www.u-blox.com,80 or using ip address AT+USOC=0,75.2.60.5,80
  • Note that UDP is not bi-directional as TCP, both an outgoing and incoming socket, AT+USOL are needed to be both be able to send and receive data on UDP.
NrInstructionsAT commandAT event
1Create a UDP socketAT+USOCR=17+USOCR:0
2Connect using UDP port 5003AT+USOC=0,192.168.0.200,5003 +UESOC:0
3It is now possible to send data using String or Binary mode
4Close UDP socketAT+USOCL=0+UESOCL:0

5.6 Wi-Fi UDP server (listener)

NrInstructionsAT commandAT event
1Create a UDP socketAT+USOCR=17+USOCR:0
2Start UDP server (listener) on port 5003AT+USOL=0,5003+UESOC:0
3It is now possible to receive data using String or Binary mode
4Close UDP listenerAT+USOCL=0+UESOCL:0

5.7 Wi-Fi TCP using TLS without certificates

  • Note that some TLS Extensions are enabled by default and in some on some (mostly older) TLS servers they are not supported, https://www.rfc-editor.org/rfc/rfc6066.html
  • Those are Server Name Indication and Maximum Fragment Length Negotiation they can be disabled with
  • AT+USETE0=0 Server Name Indication, 0: Disable - 1: Enable (default)
  • AT+USETE1=0 Maximum Fragment Length Negotiation, 0: Disable - 1: Enable (default)
  • All other Extension are disabled and not supported.
  • It is possible to connect using host name like AT+USOC=0,www.u-blox.com,80 or using ip address AT+USOC=0,75.2.60.5,80

TCP is bidirectional and one socket can both send and receive data.

NrInstructionsAT commandAT event
1Create a TCP socketAT+USOCR=6+USOCR:0
2Add a TLS context to a socketAT+USOTLS=0,1
3Connect using TCP port 433AT+USOC=0,www.u-blox.com,433+UESOC:0
4It is now possible to send data using String or Binary mode
5Close TCP socketAT+USOCL=0+UESOCL:0

5.8 Wi-Fi TCP using TLS with certificates

TCP is bidirectional and one socket can both send and receive data.

NrInstructionsAT commandAT event
1Write a X.509 certificate and private key using Binary dataAT+USECUB=0,"ca.pem"[send binary content of "ca.pem"]
AT+USECUB=1,"client.pem"[send binary content of "client.pem"]
AT+USECUB=2,"client.key"[send binary content of "client.key"]
See Binary data for more information, note that the brackets "[" and "]"
should NOT be sent, they are just here in this example
2Create a TCP socketAT+USOCR=6+USOCR:0
3Add a TLS context to a socket and certificatesAT+USOTLS=0,1,"ca.pem","client.pem","client.key"
4Connect using TCP port 433AT+USOC=0,www.u-blox.com,433+UESOC:0
5It is now possible to send data using String or Binary mode
6Close TCP socketAT+USOCL=0+UESOCL:0


6 MQTT use cases

Supported modulesSoftware versions
NORA-W36v1.0.0 onwards

6.1 MQTT client without TLS

Connect as a Wi-Fi Station and an Access Point and a general MQTT Broker on port 1883, in this example it connects to Mosquito without certificate.


mqtt

  • Host: test.mosquitto.org
  • Port: 1883 (no TLS connection)
  • Client ID: -
  • Username: -
  • Password: -
  • CA Root certificate: -
  • Client certificate: -
  • Client private key: -

Before connecting to MQTT, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station

NrInstructionsAT commandAT event
1Configure MQTT host and portAT+UMQCP=0,test.mosquitto.org,1883
2Connect to MQTT brokerAT+UMQC=0+UEMQC:0
3Publish Message on topic pubtopicAT+UMQP=0,0,0,"pubtopic","Helllo from NORA-W36"
4Subscribe on topic subtopicAT+UMQS=0,0,"subtopic"
5Post a Message to the MQTT Broker on subtopic the message should be Hello from remote device--
6Receive Message on subtopic+UEMQD:0,24
7Read String MessageAT+UMQRS=0+UMQRS:0,0,"subtopic",24,"Hello from remote device"
8Disconnect from MQTT brokerAT+UMQDC=0
  • To receive on all topics use the wildcard "*", this may not be supported by all brokers like Azure

6.2 MQTT TLS client - Mosquitto

Connect as a Wi-Fi Station and a MQTT Broker, in this example it connects to Mosquito using certificates.


mqtt

Follow the example on this page https://test.mosquitto.org/ssl/ to generate certificate and keys.

CA cert: mosquitto.org.crt

Client cert: client.crt

Client key: client.key


mqtt

  • 1883 : MQTT, unencrypted, unauthenticated
  • 1884 : MQTT, unencrypted, authenticated
  • 8883 : MQTT, encrypted, unauthenticated
  • 8884 : MQTT, encrypted, client certificate required (used in this example)
  • 8885 : MQTT, encrypted, authenticated
  • 8886 : MQTT, encrypted, unauthenticated

This example will use the port 8884: MQTT, encrypted, client certificate required

  • Host: test.mosquitto.org
  • Port: 8884 (TLS)
  • Client ID: -
  • Username: -
  • Password: -
  • CA Root certificate: mosquitto.org.crt
  • Client certificate: client.crt
  • Client private key: client.key

Before connecting to MQTT, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station

NrInstructionsAT commandAT event
1Configure MQTT host and portAT+UMQCP=0,test.mosquitto.org,8884
2Write a X.509 certificate and private key using Binary dataAT+USECUB=0,"mosquitto.org.crt"[send binary content of "mosquitto.org.crt"]
AT+USECUB=1,"client.crt"[send binary content of "client.crt"]
AT+USECUB=2,"client.key"[send binary content of "client.key"]
See Binary data for more information, note that the brackets "[" and "]"
should NOT be sent, they are just here in this example
3Setup TLS connection configAT+UMQTLS=0,1,mosquitto.org.crt","client.crt","client.key"
4Connect to MQTT brokerAT+UMQC=0+UEMQC:0
5Publish Message on topic pubtopicAT+UMQP=0,0,0,"pubtopic","Helllo from NORA-W36"
6Subscribe on topic subtopicAT+UMQS=0,0,"subtopic"
7Post a Message to the MQTT Broker on subtopic the message should be Hello from remote device--
8Receive Message on subtopic+UEMQD:0,24
9Read String MessageAT+UMQRS=0+UMQRS:0,0,"subtopic",24,"Hello from remote device"
10Disconnect from MQTT brokerAT+UMQDC=0

6.3 MQTT TLS client - Thingstream

Connect as a Wi-Fi Station and a MQTT Broker, in this example it connects to Thingstream using CA Root certificate, Client-ID, Username and Password.

Thingsream.io use AWS Root Certificate that can be found here

  • Host: mqtt.thingstream.io
  • Port: 8883 (TLS)
  • Client ID: device:78e3d356-876f-483b-872f-3485853fAAAA
  • Username: HMVK8C09FQP245O2BBBB
  • Password: ofYyBB/L3GkPvo060J6Dv+t+mfrh0XpGMcf7CCCC
  • CA Root certificate: AmazonRootCA1.pem
  • Client certificate: -
  • Client private key: -

mqtt

Before connecting to MQTT, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station

NrInstructionsAT commandAT event
1Configure MQTT Host, Port, Client-ID, Username and PassswordAT+UMQCP=0,mqtt.thingstream.io,8883,device:78e3d356-876f-483b-872f-3485853fAAAA,HMVK8C09FQP245O2BBBB,ofYyBB/L3GkPvo060J6Dv+t+mfrh0XpGMcf7CCCC+UEMQC:0
2Write a X.509 CA Root certificate using Binary dataAT+USECUB=0,"AmazonRootCA1.pem"[send binary content of "AmazonRootCA1.pem"]
See Binary data for more information, note that the brackets "[" and "]"
should NOT be sent, they are just here in this example
3Setup TLS connection config, thingstream does not use client certificate or key, only Root CAAT+UMQTLS=0,1,AmazonRootCA1.pem"
4Connect to MQTT brokerAT+UMQC=0+UEMQC:0
5Publish Message on topic pubtopicAT+UMQP=0,0,0,"pubtopic","Helllo from NORA-W36"
6Subscribe on topic subtopicAT+UMQS=0,0,"subtopic"
7Post a Message to the MQTT Broker on subtopic the message should be Hello from remote device--
8Receive Message on subtopic+UEMQD:0,24
9Read String MessageAT+UMQRS=0+UMQRS:0,0,"subtopic",24,"Hello from remote device"
10Disconnect from MQTT brokerAT+UMQDC=0

6.4 MQTT TLS client - AWS IoT Core

Connect as a Wi-Fi Station and a MQTT Broker, in this example it connects to Amazon AWS IoT Core using certificates.


mqtt

Before connecting to MQTT, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station

NrInstructionsAT commandAT event
1Configure MQTT host and portAT+UMQCP=0,a3loryode2aaaa-ats.iot.us-east-2.amazonaws.com,8883
2Write a X.509 certificate and private key using Binary dataAT+USECUB=0,"AmazonRootCA1.pem"[send binary content of "AmazonRootCA1.pem"]
AT+USECUB=1,"aws_client.crt"[send binary content of "aws_client.crt"]
AT+USECUB=2,"aws_priv_key.key"[send binary content of "aws_priv_key.key"]
See Binary data for more information, note that the brackets "[" and "]"
should NOT be sent, they are just here in this example
3Setup TLS connection configAT+UMQTLS=0,1,"AmazonRootCA1.pem","aws_client.crt","aws_priv_key.key"
4Connect to MQTT brokerAT+UMQC=0+UEMQC:0
5Publish Message on topic pubtopicAT+UMQP=0,0,0,"pubtopic","Helllo from NORA-W36"
6Subscribe on topic subtopicAT+UMQS=0,0,"subtopic"
7Post a Message to the MQTT Broker on subtopic the message should be Hello from remote device--
8Receive Message on subtopic+UEMQD:0,24
9Read String MessageAT+UMQRS=0+UMQRS:0,0,"subtopic",24,"Hello from remote device"
10Disconnect from MQTT brokerAT+UMQDC=0

6.5 MQTT TLS client - Azure IoT Hub

Connect as a Wi-Fi Station and an Access Point and a MQTT Broker, in this example it connects to Microsoft Azure using certificates.


mqtt

Note that Azure IoT Hub isn't a full-featured MQTT broker and doesn't support all the behaviors specified in the MQTT v3.1.1 standard

  • Host: iothub-test-sw.azure-devices
  • Port: 8883 (TLS)
  • Client ID: device1
  • Username: iothub-test-sw.azure-devices.net/device1/
  • Password: -
  • CA Root certificate: AzureCa.pem
  • Client certificate: azure_client.crt
  • Client private key: azure_priv_key.key

Before connecting to MQTT, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station

NrInstructionsAT commandAT event
1Configure MQTT Host, Port, Cient and UsenameAT+UMQCP=0,iothub-test-sw.azure-devices.net,8883,device1,iothub-test-sw.azure-devices.net/device1
2Write a X.509 certificate and private key using Binary dataAT+USECUB=0,"AzureCa.pem"[data binary content of "AzureCa.pem"]
AT+USECUB=1,"azure_client.crt"[data binary content of "azure_client.crt"]
AT+USECUB=2,"azure_priv_key.key"[data binary content of "azure_priv_key.key"]
See Binary data for more information, note that the brackets "[" and "]"
should NOT be sent, they are just here in this example
3Setup TLS connection configAT+UMQTLS=0,1,AzureCa.pem","azure_client.crt","azure_priv_key.key"
4Connect to MQTT brokerAT+UMQC=0+UEMQC:0
5Publish Message on topic pubtopicAT+UMQP=0,0,0,"pubtopic","Helllo from NORA-W36"
6Subscribe on topic subtopicAT+UMQS=0,0,"subtopic"
7Post a Message to the MQTT Broker on subtopic the message should be Hello from remote device--
8Receive Message on subtopic+UEMQD:0,24
9Read String MessageAT+UMQRS=0+UMQRS:0,0,"subtopic",24,"Hello from remote device"
10Disconnect from MQTT brokerAT+UMQDC=0


7 Send and receive data

NORA-W36 support different ways to send and receive data

  • String mode
    • All readable ASCII characters (0x21 - 0x7E, 0xA1 - 0xFF)
    • Used then sending data in plain text format eg. JSON, HTML, NMEA
  • Binary mode
    • All types of characters (0x00 - 0xFF)
    • Use when all types of data is needed, eg. binary content like file upload and download
  • Transparent mode
    • All types of characters (0x00 - 0xFF)
  • Transparent mode has best performance, due to no wait states
  • Direct mode is faster than Buffered mode
  • Binary mode is faster than String mode

To receive data without an event and read it out, the read mode can be changed to direct mode AT+USORM=1

7.1 String mode

Socket receive mode

Syntax

AT+USORM=<receive_mode>

  • 0: Buffered mode
    • +UESODA - Socket Data Available Event, default mode
  • 1: Direct string mode
    • +UESODS - Socket Data Binary Event: Incoming on TCP socket data represented as a string
    • +UESODSF - Socket Data Binary From Event: Incoming on UDP socket data represented as a string

SPS Receive data mode

Syntax

AT+USPSRM=<receive_mode>

  • 0: Buffered mode
    • +UESPSDA SPS Data Available event, default mode
  • 1: Direct string mode
    • +UESPSDS - SPS Data String event

7.1.1 Socket write string

Syntax

AT+USOWS=<socket_handle>,<string_data>

Example to write socket data

NrInstructionsAT commandAT event
1Write Socket data in string format sizeAT+USOWS=0,"Hello from NORA-W36"

7.1.2 Socket read string

Syntax

AT+USORS=<socket_handle>,<length>

+USORS:<socket_handle>,<length>,<string_data>

Example to read socket data

NrInstructionsAT commandAT event
1Incoming Socket data+UESODA:0,19
2Reads incoming Socket data in string formatAT+USORS=0,19+USORS:0,19,"Hello from NORA-W36"

7.1.3 SPS write string

Syntax

AT+USPSWS=<conn_handle>,<string_data>

Example to write SPS data

NrInstructionsAT commandAT event
1Write SPS data in string format sizeAT+USPSWS=0,"Hello from NORA-W36"

7.1.4 SPS read string

Syntax

AT+USORB=<socket_handle>,<length>

+USORB:<socket_handle>,<length>,<string_data>

Example to read SPS data

NrInstructionsAT commandAT event
1Incoming SPS data+UESPSDA:0,19
2Reads incoming SPS data in string formatAT+USORB=0,19+USORB:0,19,"Hello from NORA-W36"

7.2 Binary mode

The binary mode should be used when binary conent is transmitted, like files and binary protocols.

See Binary data for more infomation about the format of th data.

Socket receive mode

Syntax

AT+USORM=<receive_mode>

  • 0: Buffered mode
    • +UESODA - Socket Data Available Event, default mode
  • 2: Direct binary mode
    • +UESODB - Socket Data Binary Event: Incoming on TCP socket data represented as binary data
    • +UESODBF - Socket Data Binary From: Incoming on UDP socket data represented as binary data

SPS receive mode

Syntax

AT+USPSRM=<receive_mode>

  • 0: Buffered mode
    • +UESPSDA SPS Data Available event, default mode
  • 2: Direct binary mode
    • +UESPSDB - SPS Data Binary event

See more infomation about Binary Data.

7.2.1 Socket write binary

AT+USOWB=<socket_handle><binary_header><binary_data>

Example to write socket data

NrInstructionsAT commandAT event
1Write Socket data in binary format sizeAT+USOWS=0\x01\x00\x13Hello from NORA-W36

7.2.2 Socket read binary

Syntax

AT+USORB=<socket_handle>,<length>


+USORS:<socket_handle><binary_header><binary_data>

Example to read socket data

NrInstructionsAT commandAT event
1Incoming Socket data+UESODA:0,19
2Reads incoming Socket data in binary formatAT+USORB=0,19+USORB:0\x01\x00\x13Hello from NORA-W36

7.2.3 SPS write binary

Syntax

AT+USPSWS=<conn_handle><binary_header><binary_data>

Example to write SPS data

NrInstructionsAT commandAT event
1Write SPS data in binary format sizeAT+USPSWB=0\x01\x00\x13Hello from NORA-W36

7.2.4 SPS read binary

Syntax

AT+USORB=<socket_handle>,<length>


+USORB:<socket_handle><binary_header><binary_data>

Example to read SPS data

NrInstructionsAT commandAT event
1Incoming SPS data+UESPSDA:0,19
2Reads incoming SPS data in binary formatAT+USPSRB=0,19+USPSRB:0\x01\x00\x13Hello from NORA-W36

7.3 Transparent mode

Transparent mode (TM) works in the same way as Data mode in legacy products, note that only one connection of TCP, UDP (Wi-Fi) or SPS (BLE) is allowed.

To enter Transparent Mode the AT command AT+UTM are used and the option is to use TCP, UDP or SPS.

Syntax

AT+UTM=<link_type>,<handle>

Example for SPS

AT+UTM=0,0

OK

Transparent mode has started

+++

OK

Back in AT mode

Example for TCP socket

AT+UTM=1,0

OK

Transparent mode has started

+++

OK

Back in AT mode

Until the escape secqence +++ is send, all data will received on the UART will be sent unmodified to the remote device on the specific connection selected.

7.4 Transparent mode persistent

Like the Transparent Mode (TM) the Transparent Mode Persistent (TMP) works in the same way as Data Mode in legacy products, note that only one connection of TCP, UDP (Wi-Fi) or SPS (BLE) is allowed.

The only difference with TM and TMP is that TMP can be stored in flash and connect at startup.

To enter TMP AT+UTMP AT command are used and the option is to use TCP, UDP or SPS.

Syntax

AT+UBTP=<bd_addr>,<connect_sps>

AT+UTMP=<link_type>,<config_id>

Example for SPS

NrInstructionsAT commandAT event
1Enter the remote BLE address to connect toAT+UBTP=BBBBBBBBBBBB,1+UBTP:200
2Enable Persistand on the connectionAT+UTMP=0,200
3Store and ResetAT&W
4AT+CPWROFF
5Wait for NORA-W36 to startup+STARTUP
6Transparent Mode Persistent has started
7Exit Transparent Mode using escape sequence+++

Example for TCP socket

NrInstructionsAT commandAT event
1Create a Peristent TCP SocketAT+USOPCR=6+USOPCR:100
2Set the Ip Address and Port for the connectionAT+USOP=100,192.168.0.26,5003
3Enable Persistand on the connectionAT+UTMP=1,100
4Set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station
5Store and ResetAT&W
6AT+CPWROFF
7Wait for NORA-W36 to startup+STARTUP
8Transparent Mode Persistent has started
9Exit Transparent Mode using escape sequence+++

Until the escape sequence +++ is sent, all data will received on the UART will be sent unmodified to the remote device on the specific connection selected.


8 Binary data

firmware

The binary data starts with \x01 (SOH - Start Of Header), following by the length of the data in two bytes format (UINT16) follwed by the binary data.

The binary data shall not be terminated with the normal \x0D (\r - Carriage Return).

The binary header is three bytes:

[0x01(SOH Start Of Header), MSB_datalength, LSB_datalength]

All commands and URC that use binary data are "complete" without the binary data, the binary data is sent directy after the AT command, in most case after the handle.

The AT command follows direcly by the binary data, without any "," or "\r" or anyting in between.

Example:

AT+USOWB=0[0x01,0x00,0x02,0xFF,0xEE]

This command writes to socket 0, 2 bytes data the data is 0xFF 0xEE.

Binary data for Socket, SPS and certicitate upload all use the same Binary data format.

8.1 Example of AT command for Binary mode

To send the content of Hello from NORA-W36 the content will have the length of 19 bytes,
and the length in UINT16 format will be \00\x13.

This is how the complete AT command will look like

AT+USOWB=0\x01\x00\x13Hello from NORA-W36


Note that the AT command shall not be terminated with the \r, the length in the header will show the number of bytes to be received by the AT parser.

This is how the complete AT event will look like, +USORB:0\x01\x00\x13Hello from NORA-W36
the same three bytes header, right after the handle in this event.

8.2 Example of AT command for certificate upload

To send the content of


-----BEGIN CERTIFICATE-----\n


ABCDojCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBkDELMAkGA1UEBhMCR0Ix\n


FzAVBgNVBAgMDlVuaXRlZCBLaW5nZG9tMQ4wDAYDVQQHDAVEZXJieTESMBAGA1UE\n


CgwJTW9zcXVpdHRvMQswCQYDVQQLDAJDQTEWMBQGA1UEAwwNbW9zcXVpdHRvLm9y\n


ZzEfMB0GCSqGSIb3DQEJARYQcm9nZXJAYXRjaG9vLm9yZzAeFw0yMzEwMDQxMDEw\n


MzJaFw0yNDAxMDIxMDEwMzJaMHwxCzAJBgNVBAYTAlNFMQ4wDAYDVQQIDAVNYWxt\n


bzEOMAwGA1UEBwwFTWFsbW8xDzANBgNVBAoMBnUtYmxveDEPMA0GA1UECwwGQUUt\n


U0hPMQ0wCwYDVQQDDARjbWFnMRwwGgYJKoZIhvcNAQkBFg10ZXN0QHRlc3Qub3Jn\n


MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3PZc1E7uSBiB/Es1V0pU\n


XeSayY3f6vrIbnSGTb+/PERSPgPz6UoZumJjcOWbCMq7T+/dvvxox/ZU/t/XdGMq\n


MJRgN+aWRG6I4QmqYgkiAZGMuaMa+TLLEEPvL1IDKSxeVjHRNDx4yZM4zgvl6ZX7\n


oRaBqZBooNTHOtAGjlydyyz55HCZfLsE8Z3iaH7uW+/n9+2nWusfUXoJmI0STmEH\n


pJ+ZF7M+o53UilW2NKdv/R+wCzXxmKWX6PFVg4NdKspTDUOpPcxlphMQGi24E2uz\n


2k7raCQvGt32LxZc/vic4W6rNDGGNSSDVJTSx6egzfRrcCKw3T88TN87nasjc+KV\n


CQIDAQABoxowGDAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DANBgkqhkiG9w0BAQsF\n


AAOCAQEAjRyNWHGtcwLT21IzJ2//I8YL611iTUitRGkA0gF+7l0DuPtfSLPVhoyB\n


Te3FThYsn2OYfF+LrbSMlWO38Am2fqE8lTGe9EX/HZj95Wj+RnQApc9CkxGJkCb8\n


6aecuz8Vhyl2zWA5kqNrq978uMmsyX3FNRcS3mB7Vo+65R/XwThzHjSXyCyHzRMd\n


zOlrJZMuNWV2bI7vyIIp9/AdHNO6Hwnj+I5hBDvyV+T9RT2jLUTRZldGUJQBlDVj\n


QUKa8NSwzVrvoVTPAT6gcPCn4VQkwxLE/LWaNw2X8mxtyo3nXVoo291TzB8mKHUQ\n


ubOA1iBEcKtAFjqOlZSLanVNvrn5KwXY\n


-----END CERTIFICATE-----\n

the certificate have the length of 1342 bytes,
and the length in UINT16 format will be \05\x3E.

This is how the complete AT command will look like


AT+USECUB=0,"ca.pem"\x01\x05\x3E-----BEGIN CERTIFICATE-----\n


ABCDojCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBkDELMAkGA1UEBhMCR0Ix\n


FzAVBgNVBAgMDlVuaXRlZCBLaW5nZG9tMQ4wDAYDVQQHDAVEZXJieTESMBAGA1UE\n


CgwJTW9zcXVpdHRvMQswCQYDVQQLDAJDQTEWMBQGA1UEAwwNbW9zcXVpdHRvLm9y\n


ZzEfMB0GCSqGSIb3DQEJARYQcm9nZXJAYXRjaG9vLm9yZzAeFw0yMzEwMDQxMDEw\n


MzJaFw0yNDAxMDIxMDEwMzJaMHwxCzAJBgNVBAYTAlNFMQ4wDAYDVQQIDAVNYWxt\n


bzEOMAwGA1UEBwwFTWFsbW8xDzANBgNVBAoMBnUtYmxveDEPMA0GA1UECwwGQUUt\n


U0hPMQ0wCwYDVQQDDARjbWFnMRwwGgYJKoZIhvcNAQkBFg10ZXN0QHRlc3Qub3Jn\n


MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3PZc1E7uSBiB/Es1V0pU\n


XeSayY3f6vrIbnSGTb+/PERSPgPz6UoZumJjcOWbCMq7T+/dvvxox/ZU/t/XdGMq\n


MJRgN+aWRG6I4QmqYgkiAZGMuaMa+TLLEEPvL1IDKSxeVjHRNDx4yZM4zgvl6ZX7\n


oRaBqZBooNTHOtAGjlydyyz55HCZfLsE8Z3iaH7uW+/n9+2nWusfUXoJmI0STmEH\n


pJ+ZF7M+o53UilW2NKdv/R+wCzXxmKWX6PFVg4NdKspTDUOpPcxlphMQGi24E2uz\n


2k7raCQvGt32LxZc/vic4W6rNDGGNSSDVJTSx6egzfRrcCKw3T88TN87nasjc+KV\n


CQIDAQABoxowGDAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DANBgkqhkiG9w0BAQsF\n


AAOCAQEAjRyNWHGtcwLT21IzJ2//I8YL611iTUitRGkA0gF+7l0DuPtfSLPVhoyB\n


Te3FThYsn2OYfF+LrbSMlWO38Am2fqE8lTGe9EX/HZj95Wj+RnQApc9CkxGJkCb8\n


6aecuz8Vhyl2zWA5kqNrq978uMmsyX3FNRcS3mB7Vo+65R/XwThzHjSXyCyHzRMd\n


zOlrJZMuNWV2bI7vyIIp9/AdHNO6Hwnj+I5hBDvyV+T9RT2jLUTRZldGUJQBlDVj\n


QUKa8NSwzVrvoVTPAT6gcPCn4VQkwxLE/LWaNw2X8mxtyo3nXVoo291TzB8mKHUQ\n


ubOA1iBEcKtAFjqOlZSLanVNvrn5KwXY\n


-----END CERTIFICATE-----\n


+USECUB:1342


OK

Note that the AT command shall not be terminated with the \r, the length in the header will show the number of bytes to be received by the AT parser.

8.3 Python pseudo code example

byte = 'AT+USECUB=0,"ca.pem"'


byte += b'\x01'


byte += len(bin_data).to_bytes(2, 'big')


byte += bin_data # bin_data contains the binary data to be sent


write(byte)

8.4 C# Pseudo code example

byte[] bin_data' //data contains the binary data to be sent


byte[] dataHeader = new byte[3];


dataHeader[0] = 0x01;


dataHeader[1] = Convert.ToByte(bin_data.Length >> 8);


dataHeader[2] = (Convert.ToByte(bin_data.Length & 0xff));


write("AT+USECUB=0,"ca.pem")


write(dataHeader)


write(bin_data)


9 Diagnosic tools

9.1 Ping

Syntax

AT+UDGP=<destination>[,<count>]

Ping example

NrAT commandAT event
1AT+UDGP=www.google.com,4
2+UEDGP:1,15
4+UEDGP:1,15
5+UEDGP:1,14
6+UEDGP:1,14
7+UEDGPC:4,4,0,14

9.2 Diagnostics iperf

Iperf version 2 is supported as client and server, with support for TCP and UDP data.

Download Iperf 2 for Windows here

Manual for iperf 2 can be found here

Note that the Iperf implementation is exprimental and may change between releases, like parameters and behavior.

Syntax

AT+UDGI=<iperf_action>,<protocol_type>[,<role>,<port>,<report_interval>[,<time_boundary>,<ip_addr>[,<bidirectional>]]]

9.3 Iperf server

Example for Iperf server on port 5001

NrAT commandAT event
1AT+UDGI=1,1,1,5001,1
2+UEDGI:"TCP: Start TCP server!"
3+UEDGI:"tcp_server_func: Create socket fd = 0"
4+UEDGI:"tcp_server_func: Bind socket successfully"
5+UEDGI:"tcp_server_func: Listen port 5001"

9.4 Iperf client

Example for Iperf client to connect on address 192.168.0.41 on port 5001

NrAT commandAT event
1AT+UDGI=1,1,2,5001,1,20,192.168.0.41
2+UEDGI:"tcp_client_func: Create socket fd = 1"
3+UEDGI:"tcp_client_func: Connect to server successfully"
4+UEDGI:"tcp_client_func: Send 1435 KBytes in 1000 ms, 11761 Kbits/sec"
5+UEDGI:"tcp_client_func: Send 1418 KBytes in 1000 ms, 11621 Kbits/sec"
6+UEDGI:"tcp_client_func: Send 1417 KBytes in 1000 ms, 11609 Kbits/sec"


10 Error codes

10.1 Extended error code

AT+USYEC

Syntax

AT+USYEC?


+USYEC:<error_code>

Example

AT+USYEC?


+USYEC:5


OK

The error code for 5 is U_ERROR_COMMON_INVALID_PARAMETER, meaning that the parameter on the last AT command was invalid.

See NORA-W36 u-connectXpress Error codes for more details.

10.2 Extended error codes on/off

This command will enable the error code when an ERROR is received for every commands.

Syntax

AT+USYEE=<extended_errors>

Example

AT+USYEE=1


OK


AT+


ERROR:32

The error code for 32 is U_AT_STATUS_INVALID_COMMAND, meaning that the AT command is not correct.

See NORA-W36 u-connectXpress Error codes for more details.

10.3 Socket error

Use this commond to get the last error on the Socket used.

Syntax

AT+USOE


+USOE:<error_code>

Example

AT+USOE


+USOE:107

The error code for 107 is Transport endpoint is not connected, meaning that the socket connection is down.

See NORA-W36 u-connectXpress Error codes for more details.


11 Software update

This use case shows what AT commands to send to start a software update.

There are two ways to start the software update:

  • See more about the XMODEM protocol here

firmware

11.1 Update software by AT command

  • Enter XMODEM mode for u-connect software update using serial port
  • XMODEM-1K and baud rate up to 3 Mbps is supported.
NrInstructionsAT commandAT event
1Start XMODEM protocol with AT commandAT+USYFWU=0,3000000
2Now NORA-W36 is ready to receive the software using the XMODEM or
XMODEM-1K protocol
CCCCCCCCCCC...
3When the software has been downloaded the module will restart+STARTUP
4Check the version of the softwareAT+GMR"1.0.0-001"

11.2 Update software by bootloader

  • Enter the bootloader command line mode using serial port by AT command
  • Press SWITCH_1 and SWITCH_2 during startup (or after reset)
  • When in bootloader command line mode, a command must be sent before 10 seconds, or the device will reboot in normal mode
  • The command ? will list all available commands
  • The XMODEM protocol will timeout after 10 seconds if nothing has been received
  • XMODEM-1K and baud rate up to 3 Mbps is supported
NrInstructionsAT commandEvent
1aEnter Bootloader with AT commandAT+USYFWU=1,115200
1bOr Enter Bootloader with SWITCH_1 and SWITCH_2
pressed during startup or reset
2Wait for the > prompt>
3Change baud rate to up to 3 Mbit/s (optional)r 3000000
4Start XMODEM protocol with the command xx
5Now NORA-W36 is ready to receive the software using the XMODEM or
XMODEM-1K protocol
CCCCCCCCCCC...
6A prompt will appear when the software has been downloaded>
7Restart the module with the q commandq
8Module has restarted in AT mode+STARTUP
9Check the version of the softwareAT+GMR"1.0.0-001"


12 Related information

ResourceLink
NORA-W36 product pagehttps://www.u-blox.com/en/product/nora-w36-series
s-center 2 webpagehttps://www.u-blox.com/en/product/s-center
NORA-W36 AT command manualNORA-W36 AT command manual
NORA-W36 Error codesNORA-W36 Error codes