Version latest

8 HTTP/HTTPS client use cases

NORA-W36 does no support a http client in current SW version, but it is a planned feature. It is possible to download files and web sites without a http client, this example show how to do that using a HTTP GET Request.
HTTP is just thin layer on top of TCP on port 80, and HTTPS is using TCP with TLS on port 443, for a more secure encrypted connection.
This example use Binary mode, String mode can’t be used in this case since some data may be non ASCII caracters.This example does not validate the server certificate, but is can be made by adding the connect CA Root certificate in the AT+USOTLS=0,1,CA.pem or .

8.1 HTTPS download

In this example the following image will be downloaded: https://test.mosquitto.org/mosquitto-text-side.png using the HTTP protocol.
Parameters and values
  • Host: test.mosquitto.org
  • Port: 443 (HTTPS default port)
  • Path: /mosquitto-text-side.png
Before connecting to HTTPS, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station
Nr
Instructions
AT command
AT event
1
Create a TCP socket
AT+USOCR=6
+USOCR:0
2
Enable TLS on the created socket (0)
AT+USOTLS=0,1
3
Connect TCP with TLS enabled
AT+USOC=0,"test.mosquitto.org",443
+UESOC:0
4
Send HTTP GET Request in Binary format (39 bytes, 0x27)
AT+USOWB=0\x01\x00\x27GET/mosquitto-text-side.pngHTTP/1.1\r\nHost:NORA-W36\r\n\r\n
+USOWB:0,39
5
Data is now received in
+UESODA:0,4096
6
Read out the data in binay format
AT+USORB=0,1000
+USORS:0,1000{Binaryheaderanddata}
7
Read out the data in binay format
AT+USORB=0,1000
+USORS:0,1000{Binaryheaderanddata}
8
When the file has been received the server may close the connection
+UESOCL:0

8.2 HTTPS upload

In this example the following file will be uploaded: https://posttestserver.dev using the HTTPS (TLS) protocol on port 443. Random post receiver site https://posttestserver.dev/p/0k64ebdoksza3usa/
Parameters and values
  • Host: posttestserver.dev
  • Port: 443 (HTTPS default port)
  • Path: /p/0k64ebdoksza3usa/post/
  • File: file.bin (12288 bytes)
Before connecting to HTTPS, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station
Nr
Instructions
AT command
AT event
1
Create a TCP socket
AT+USOCR=6
+USOCR:0
2
Enable TLS on the created socket (0)
AT+USOTLS=0,1
3
Connect TCP with TLS enabled
AT+USOC=0,"posttestserver.dev",443
+UESOC:0
4
Send HTTP GET Request in Binary format (143 bytes, 0x8F)
AT+USOWB=0\x01\x00\x8FPOST/p/0k64ebdoksza3usa/post/HTTP/1.1\r\nHost:posttestserver.dev\r\nContent-Type:application/octet-stream\r\nContent-Length:12288\r\n\r\n
+USOWB:0,8F
5
Send Binary file
AT+USOWB:0{file.bin}
6
Send Binary file
AT+USOWB:0{file.bin}
7
| 8 | Send Binary file until 12288 bytes has been sent | AT+USOWB:0{file.bin} | | 9 | HTTP reply is now received | +UESODA:0,512 | | 10 | Read out the data in binay format | AT+USORB=0,512 | +USORS:0,512{Binaryheaderanddata} | 11 | Close the connection to the HTTPS server |AT+USOCL=0 | +UESOCL:0 |

8.3 HTTPS upload with server certificate validation

In this example the following file will be uploaded: https://posttestserver.dev using the HTTPS (TLS) protocol on port 443. Random post receiver site https://posttestserver.dev/p/0k64ebdoksza3usa/ using the CA certificate “GTS Root R4.crt” for the website to validate the server certificate.
Parameters and values
  • Host: posttestserver.dev
  • Port: 443 (HTTPS default port)
  • Path: /p/0k64ebdoksza3usa/post/
  • File: file.bin (12288 bytes)
  • CA Certificate: “GTS Root R4.crt”
Extract the CA Root Certificate using a Browser or OpenSSL as below: $openssls_client-showcerts-connectposttestserver.dev:443</dev/null|opensslx509-outformPEM>"GTSRootR4.crt"
Before connecting to HTTPS, set up Wi-Fi Connection like in steps 1-5 in Wi-Fi station
Nr
Instructions
AT command
AT event
1
Upload CA certificate
AT+USECUB=0,"GTSRootR4.crt"{databinarycontentof"GTSRootR4.crt"}
2
Create a TCP socket
AT+USOCR=6
+USOCR:0
3
Enable TLS on the created socket (0)
AT+USOTLS=0,1,"GTSRootR4.crt"
4
Connect TCP with TLS enabled
AT+USOC=0,"posttestserver.dev",443
+UESOC:0
5
Send HTTP GET Request in Binary format (143 bytes, 0x8F)
AT+USOWB=0\x01\x00\x8FPOST/p/0k64ebdoksza3usa/post/HTTP/1.1\r\nHost:posttestserver.dev\r\nContent-Type:application/octet-stream\r\nContent-Length:12288\r\n\r\n
+USOWB:0,8F
6
Send Binary file
AT+USOWB:0{file.bin}
7
Send Binary file
AT+USOWB:0{file.bin}
8
9
Send Binary file until 12288 bytes has been sent
AT+USOWB:0{file.bin}
10
HTTP reply is now received
+UESODA:0,512
11
Read out the data in binay format
AT+USORB=0,512
+USORS:0,512{Binaryheaderanddata}
12
Close the connection to the HTTPS server
AT+USOCL=0
+UESOCL:0
Last updated: 25 August 2025
Need help?Contact Support
Questions?Contact us