- Short range radio modules
- Positioning chips and modules
u-blox Products
- Product selector
- Previous generations
- Contact sales
Find products
- Product documentation
Documentation
ATE0 turns off the AT command echo to speed up the data transmission in AT mode. The written data is not echoed back to the host, which helps to make the parsing easier.AT+USOC=0,www.u-blox.com,80 or an IP address AT+USOC=0,75.2.60.5,80Nr | 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 | |||
5 | TCP connection is closed from remote side | +UESOCL:1 | |
6 | Close TCP listener | AT+USOCL=0 | +UESOCL:0 |
AT+USOCR, are needed to send and receive data over UDP.
It is possible to connect using the host name, like AT+USOC=0,www.u-blox.com,80, or the IP address AT+USOC=0,75.2.60.5,80AT+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 for the connections.Nr | Instructions | AT command | AT event |
|---|---|---|---|
1 | Write a X.509 certificate and private key using Binary data | AT+USECUB=0,"ca.pem"{sendbinarycontentof"ca.pem"}AT+USECUB=1,"client.pem"{sendbinarycontentof"client.pem"}AT+USECUB=2,"client.key"{sendbinarycontentof"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 on port 433 | AT+USOC=0,"www.u-blox.com",433 | +UESOC:0 |
5 | |||
6 | Close TCP socket | AT+USOCL=0 | +UESOCL:0 |
opensslgenrsa-outca.key2048
or
Generate 4096 key size:
opensslgenrsa-outca.key4096opensslreq-x509-sha256-new-nodes-keyca.key-days3650-outca.pemopensslreq-newkeyrsa:2048-keyoutserver.key-outserver.csr-nodes
or
Create the server certificate signing request (CSR) for 4096 key size:
opensslreq-newkeyrsa:4096-keyoutserver.key-outserver.csr-nodesopensslx509-req-CAca.pem-CAkeyca.key-inserver.csr-outserver.pem-days3650-CAcreateserialopensslreq-newkeyrsa:2048-keyoutclient.key-outclient.csr-nodes
or
Create the client certificate signing request (CSR) for 4096 key size:
opensslreq-newkeyrsa:4096-keyoutclient.key-outclient.csr-nodesopensslx509-req-CAca.pem-CAkeyca.key-inclient.csr-outclient.pem-days3650-CAcreateserialwinpty is a Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs.
Set up a local TLS 1.2 server (without CA validation in this case)
winptyopenssls_server-CAfileca.pem-keyserver.key-certserver.pem-accept44330-tls1_2-state-Verify1winptyopenssls_client-connectlocalhost:44330-CAfileca.pem-keyclient.key-certclient.pem-tls1_2openssls_server-CAfileca.pem-keyserver.key-certserver.pem-accept44330-tls1_2-state-Verify1openssls_client-connectlocalhost:44330-CAfileca.pem-keyclient.key-certclient.pem-tls1_2opensslx509-inca.pem-text-noout|grep"Public-Key"RSAPublic-Key:(4096bit)opensslx509-inclient.pem-text-noout|grep"Public-Key"RSAPublic-Key:(4096bit)opensslrsa-inclient.key-text-noout|grep"Private-Key"RSAPrivate-Key:(4096bit,2primes)