- Support portal
- Evaluation Kits and partner products
u-blox Support
- Product documentation
Documentation
Supported modules | Software versions |
---|---|
NORA-W36 | v1.0.0 onwards |
The following Wi-Fi use case, shows some functionality to get started with Wi-Fi Station and Access Point.
The following examples use the MAC address below, this must be replaced by the real MAC address of the devices that are used. - Station MAC address: AAAAAAAAAAAA - Access Point MAC address: BBBBBBBBBBB
Connect as a Wi-Fi station to an Access Point to get
access to network.
The connection use DHCP client
as default, to use static IP use AT+UWSIPS
to set the IP
address, gateway, subnet mask and DNS.
Nr | Instructions | AT command | AT event |
---|---|---|---|
1 | Set SSID for the Network | AT+UWSCP=0,"NORA-W36 Access Point" | |
2 | Set the Password, minimum WPA2 and DHCP client is default | AT+UWSSW=0,"mypassword",0 | |
3 | Connect Wi-Fi station | AT+UWSC=0 | |
4 | Wait for Wi-Fi interface | +UEWLU:0,BBBBBBBBBBB,6 | |
5 | Wait for Network interface | +UEWSNU | |
6 | Check IP address (optional) | AT+UWSNST=0 | +UWSNST:0,192.168.1.100 |
7 | Check RSSI (optional) | AT+UWSST=4 | +UWSST:4,-66 |
8 | It is now possible to connect TCP, UDP and send and receive data using String or Binary mode. It is also possible to connect MQTT | ||
9 | Disconnect Wi-Fi station | AT+UWSDC |
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 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.
Nr | Instructions | AT command | AT event |
---|---|---|---|
1 | Set SSID and channel for the Network and use channel 6 | AT+UWAPCP="NORA-W36 Access Point",6 | |
2 | Set the Password, using WPA2 | AT+UWAPSW="mypassword" | |
3 | Activate Wi-Fi Access point DHCP Server is enabled by default | AT+UWAPA | |
4 | Wait for Access Point | +UEWAPU | |
5 | Wait for Network interface | +UEWAPNU | |
6 | Check IP address of the AP (optional) | AT+UWAPNST=0 | +UWAPNST:0,192.168.1.80 |
7 | Station connected | +UEWAPSA:AAAAAAAAAAAA | |
8 | It is now possible to connect TCP, UDP and send and receive data using String or Binary mode. It is also possible to connect MQTT | ||
9 | Station disconnect | +UEWAPSDA:AAAAAAAAAAAA | |
10 | Deactivate Wi-Fi Access Point | AT+UWAPD |
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 startupATE0
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 easierAT+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. |
Nr| Instructions | AT command | AT event |
|—|——————————————-|———————————–|——————————| | 1 | Create a TCP socket |
AT+USOCR=6
| +USOCR:0
| 2 | Connect using TCP
port 5003 | AT+USOC=0,192.168.0.200,5003
|
+UESOC:0
| 3 | It is now possible to send and receive data
using String or Binary mode | | | 4 | Close TCP socket |
AT+USOCL=0
| +UESOCL:0
|
Nr | Instructions | AT command | AT event |
---|---|---|---|
1 | Create a TCP socket | AT+USOCR=6 | +USOCR:0 |
2 | Start TCP server (listener) on port 5003 | AT+USOL=0,5003 | +UESOC:0 |
3 | Incoming TCP connection, a new handle 1 to communicate with the connection | +UESOIC:0,192.168.1.100,1 | |
4 | It is now possible to send and receive data using String or Binary mode | ||
5 | TCP connection is closed from remote side | +UESOCL:1 | |
6 | Close TCP listener | AT+USOCL=0 | +UESOCL:0 |
AT+USOC=0,www.u-blox.com,80
or using ip address
AT+USOC=0,75.2.60.5,80
AT+USOL
are needed to be both be able to
send and receive data on UDP.Nr | Instructions | AT command | AT event |
---|---|---|---|
1 | Create a UDP socket | AT+USOCR=17 | +USOCR:0 |
2 | Connect using UDP port 5003 | AT+USOC=0,192.168.0.200,5003 | +UESOC:0 |
3 | It is now possible to send data using String or Binary mode | ||
4 | Close UDP socket | AT+USOCL=0 | +UESOCL:0 |
Nr | Instructions | AT command | AT event |
---|---|---|---|
1 | Create a UDP socket | AT+USOCR=17 | +USOCR:0 |
2 | Start UDP server (listener) on port 5003 | AT+USOL=0,5003 | +UESOC:0 |
3 | It is now possible to receive data using String or Binary mode | ||
4 | Close UDP listener | AT+USOCL=0 | +UESOCL:0 |
AT+USETE0=0
Server Name Indication, 0: Disable - 1:
Enable (default)AT+USETE1=0
Maximum Fragment Length Negotiation, 0:
Disable - 1: Enable (default)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. |
Nr| Instructions | AT command | AT event |
|—|——————————————-|———————————–|——————————| | 1 | Create a TCP socket |
AT+USOCR=6
| +USOCR:0
| 2 | Add a TLS context
to a socket | AT+USOTLS=0,1
| | 3 | Connect using TCP port
433 | AT+USOC=0,www.u-blox.com,433
| +UESOC:0
| 4 | It is now possible to send data using String or Binary mode | | | 5 | Close TCP socket |
AT+USOCL=0
| +UESOCL:0
|
TCP is bidirectional and one socket can both send and receive data. |
Nr| Instructions | AT command | AT event |
|—|——————————————-|———————————–|——————————| | 1| Write a X.509
certificate and private key using Binary
data |
AT+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 | | 2 | Create a TCP socket | AT+USOCR=6
|
+USOCR:0
| 3 |Add a TLS context to a socket and
certificates |
AT+USOTLS=0,1,"ca.pem","client.pem","client.key"
| | 4 |
Connect using TCP port 433 | AT+USOC=0,www.u-blox.com,433
|
+UESOC:0
| 5 | It is now possible to send data using String or Binary mode | | | 6 | Close TCP socket |
AT+USOCL=0
| +UESOCL:0
|
Here is some example to cerate own certificates using OpenSSL https://www.openssl.org/. It shows how to use 2048 or 4096 bit keys length.
Create root CA key Generate 2048 key size:
openssl genrsa -out ca.key 2048
or
Generate 4096 key size:
openssl genrsa -out ca.key 4096
Create the root CA based on ca.key:
openssl req -x509 -sha256 -new -nodes -key ca.key -days 3650 -out ca.pem
Create server certificate Create the server
certificate signing request (CSR) for 2048 key size:
openssl req -newkey rsa:2048 -keyout server.key -out server.csr -nodes
or
Create the server certificate signing request (CSR) for 4096 key
size:
openssl req -newkey rsa:4096 -keyout server.key -out server.csr -nodes
Create the server certificate using root CA and server csr, valid for
10 years:
openssl x509 -req -CA ca.pem -CAkey ca.key -in server.csr -out server.pem -days 3650 -CAcreateserial
Create client certificate
Create the client certificate signing request (CSR) for 2048 key
size:
openssl req -newkey rsa:2048 -keyout client.key -out client.csr -nodes
or
Create the client certificate signing request (CSR) for 4096 key
size:
openssl req -newkey rsa:4096 -keyout client.key -out client.csr -nodes
Create the client certificate using root CA and client csr, valid for
10 years:
openssl x509 -req -CA ca.pem -CAkey ca.key -in client.csr -out client.pem -days 3650 -CAcreateserial
Set up a local TLS 1.2 server (without CA validation in this
case):
winpty openssl s_server -CAfile ca.pem -key server.key -cert server.pem -accept 44330 -tls1_2 -state -Verify 1
Connect to the a local TLS 1.2 server, just to try the connection
(without CA validation in this case):
winpty openssl s_client -connect localhost:44330 -CAfile ca.pem -key client.key -cert client.pem -tls1_2
Check the key size of the CA certificate:
openssl x509 -in ca.pem -text -noout | grep "Public-Key"
RSA Public-Key: (4096 bit)
Check the key size of the client certificate:
openssl x509 -in client.pem -text -noout | grep "Public-Key"
RSA Public-Key: (4096 bit)
Check the size of the client key:
openssl rsa -in client.key -text -noout | grep "Private-Key"
RSA Private-Key: (4096 bit, 2 primes)