Connect To SSL Server
Connect to an SSL server using a MultiTech Systems, Inc. MNG6 cellular device with radio module firmware version 37.00.xx7.
Serial - Open device.
[0:00:00:00.000361] Opening b'/dev/ttyUSB2' at bit rate `115200`, with flow control flag `1`and a timeout of 200 seconds...
[0:00:00:00.002629] Serial device open.
ATE1 - Turn modem echo on.
[0:00:00:00.018700] line: 8 [send] ATE1<0x0D>
[0:00:00:00.018749] line: 11 [recv] \r\nOK\r\n
[0:00:00:00.024020] line: 11 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT+CMEE - Turn on verbose error messages.
AT+CMEE=[<n>]
| Argument |
Value |
Description |
| n |
2 |
2 - Verbose |
[0:00:00:00.047517] line: 19 [send] AT+CMEE=2<0x0D>
[0:00:00:00.047552] line: 20 [pause] Pausing for 1 second...
[0:00:00:01.047814] line: 22 [recv] \r\nOK\r\n
[0:00:00:01.047907] line: 22 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT#SGACT - Activate PDP context.
AT#SGACT=<cid>,<stat>[,<userId>[,<pwd>]]
| Argument |
Value |
Description |
| cid |
3 |
PDP Context to deactivate |
| stat |
1 |
1 - activate |
| userId |
N/A |
N/A |
| pwd |
N/A |
N/A |
[0:00:00:01.081837] line: 30 [send] AT#SGACT=3,1<0x0D>
[0:00:00:01.081879] line: 31 [pause] Pausing for 1 second...
[0:00:00:02.082191] line: 33 [recv] \r\nOK\r\n
[0:00:00:02.082789] line: 33 [recv] Data received. Length 77. Data: <0x0D><0x0A>#SGACT: 100.66.2.83,38.0.16.20.176.146.202.204.0.0.0.25.88.97.244.1<0x0D><0x0A><0x0D><0x0A>OK<0x0D><0x0A>
AT#SSLEN - Enable SSL subsystem.
AT#SSLEN=<SSId>,<Enable>
| Argument |
Value |
Description |
| SSId |
1 |
SSL Socket ID |
| Enable |
1 |
1 Enable, 0 Disable |
[0:00:00:02.143751] line: 71 [send] AT#SSLEN=1,1<0x0D>
[0:00:00:02.143797] line: 72 [pause] Pausing for 1 second...
[0:00:00:03.144128] line: 74 [recv] \r\nOK\r\n
[0:00:00:03.144293] line: 74 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT#SSLCFG=<SSId>,<cid>,<pktSz>,<maxTo>,<defTo>,<txTo>[,<sslSRingMode>[,<noCarrierMode>[,<skipHostMismatch>[,<equalizeTX>[,<connTo>[,unused1]]]]]]
| Argument |
Value |
Description |
| SSId |
1 |
SSL Socket ID |
| cid |
3 |
PDP context to activate and use. 3 for Verizon, 1 for Other. |
| pktSz |
0 |
SSL Packet size in bytes. |
| maxTo |
90 |
Socket inactivity timeout in seconds. |
| defTo |
100 |
Default timeout used where parameters are not set. |
| txTo |
50 |
Time to wait before sending data even if less than max packet size. |
| sslSRingMode |
0 |
When non-zero, output RING URC on incoming data. |
| noCarrierMode |
0 |
NO CARRIER URC format when socket is closed. |
| skipHostMismatch |
1 |
Set to 1 to disable host mismatch alert, 0 to enable. |
| equalizeTX |
0 |
1 - Enable equalized data transmission, 0 - disable |
| connTo |
0 |
Connection timeout in deciseconds. |
[0:00:00:03.227399] line: 99 [send] AT#SSLCFG=1,3,0,90,100,50,0,0,1,0,0<0x0D>
[0:00:00:03.227445] line: 100 [pause] Pausing for 1 second...
[0:00:00:04.227761] line: 102 [recv] \r\nOK\r\n
[0:00:00:04.227924] line: 102 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT#SSLSECCFG=<SSId>,<CipherSuite>,<auth_mode>
| Argument |
Value |
Description |
| SSId |
1 |
SSL Socket ID |
| CipherSuite |
0 |
0 - Cipher chosen by remote server. See AT Command manual for other values. |
| auth_mode |
0 |
0 - SSL Verify None, 1 - Manage server authentication, 2 - manage server and client authentication if requested by server. |
[0:00:00:04.267904] line: 124 [send] AT#SSLSECCFG=1,0,0<0x0D>
[0:00:00:04.267939] line: 125 [pause] Pausing for 1 second...
[0:00:00:05.268250] line: 127 [recv] \r\nOK\r\n
[0:00:00:05.268415] line: 127 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT#SSLSECCFG2=<SSId>,<version>,[<SNI>[,<CustomCA>[,<PreloadedCA>[,<MinVersion>]]]]
| Argument |
Value |
Description |
| SSId |
1 |
SSL Socket ID |
| version |
4 |
4 - Use TLSv1.3 |
| SNI |
0 |
0 - Don't use SSL SNI. 1 - Use SSL SNI. |
| CustomCA |
N/A |
N/A |
| PreloadedCA |
N/A |
N/A |
| MinVersion |
N/A |
N/A |
[0:00:00:05.310398] line: 147 [send] AT#SSLSECCFG2=1,4,0<0x0D>
[0:00:00:05.310438] line: 148 [pause] Pausing for 1 second...
[0:00:00:06.310568] line: 150 [recv] \r\nOK\r\n
[0:00:00:06.310609] line: 150 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT#SSLD - Dial remote SSL server.
AT#SSLD=<SSId>,<rPort>,<IPAddress>,<ClosureType>[,<connMode>[,<Timeout>]]
| Argument |
Value |
Description |
| SSId |
1 |
SSL Socket ID |
| rPort |
443 |
IP Port |
| IPAddress |
example.com |
IP address or host name |
[0:00:00:06.380464] line: 38 [send] AT#SSLD=1,443,"example.com",0,1<0x0D>
[0:00:00:06.380513] line: 39 [pause] Pausing for 1 second...
[0:00:00:07.380828] line: 41 [recv] \r\nOK\r\n
[0:00:00:13.944190] line: 41 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT#SSLH - Hang up connection to remote SSH server.
AT#SSLH=<SSId>[,<ClosureType>]
| Argument |
Value |
Description |
| SSId |
1 |
SSL Socket ID |
| ClosureType |
0 |
0 - only value supported |
[0:00:00:13.985079] line: 20 [send] AT#SSLH=1,0<0x0D>
[0:00:00:13.985128] line: 21 [pause] Pausing for 1 second...
[0:00:00:14.985447] line: 23 [recv] \r\nOK\r\n
[0:00:00:14.985612] line: 23 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
AT#SGACT - Deactivate PDP context.
AT#SGACT=<cid>,<stat>[,<userId>[,<pwd>]]
| Argument |
Value |
Description |
| cid |
3 |
PDP Context to deactivate |
| stat |
0 |
0 - deactivate |
| userId |
N/A |
N/A |
| pwd |
N/A |
N/A |
[0:00:00:15.020110] line: 34 [send] AT#SGACT=3,0<0x0D>
[0:00:00:15.020196] line: 35 [pause] Pausing for 1 second...
[0:00:00:16.020514] line: 37 [recv] \r\nOK\r\n
[0:00:00:16.020675] line: 37 [recv] Data received. Length 6. Data: <0x0D><0x0A>OK<0x0D><0x0A>
Serial - Close device.
[0:00:00:16.020726] Closing serial device b'/dev/ttyUSB2'...
[0:00:00:16.021913] Serial device closed.