This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 HTTP client AT commands always returns +CME ERROR: 0

Hello,

I am trying to get my nRF9160 to connect to a https server via AT commands, but this is as far as I've been able to get.

In the end this will be used in a project where another micro is monitoring peripherals and doing a bunch of logging, then powering the modem power supply up, initializing via AT commands and uploading data logs via HTTPS POST using a security token to authorize the device server side. I know I could be using the modem micro for all of this, but the RTOS/Zephyr toolchain has been painful to work with.

Log:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2021-04-12T21:52:25.858Z INFO Application data folder: C:\Users\user\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
2021-04-12T21:52:25.991Z DEBUG App pc-nrfconnect-linkmonitor v1.1.10 official
2021-04-12T21:52:25.991Z DEBUG App path: C:\Users\user\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
2021-04-12T21:52:25.991Z DEBUG nRFConnect 3.6.1 is supported by the app (^3.6.0)
2021-04-12T21:52:25.992Z DEBUG nRFConnect path: C:\Users\user\AppData\Local\Programs\nrfconnect\resources\app.asar
2021-04-12T21:52:25.992Z DEBUG HomeDir: C:\Users\user
2021-04-12T21:52:25.992Z DEBUG TmpDir: C:\Users\user\AppData\Local\Temp
2021-04-12T21:52:26.017Z VERBOSE Could not fetch serial number for serial port at COM1
2021-04-12T21:52:34.311Z INFO Modem port is opened
2021-04-12T21:52:34.321Z DEBUG modem >> AT+CFUN?
2021-04-12T21:52:34.359Z DEBUG modem << +CFUN: 0
2021-04-12T21:52:34.368Z DEBUG modem << OK
2021-04-12T21:52:40.478Z DEBUG modem >> AT
2021-04-12T21:52:40.494Z DEBUG modem << OK
2021-04-12T21:52:43.110Z DEBUG modem >> AT+CFUN=1
2021-04-12T21:52:43.158Z DEBUG modem << OK
2021-04-12T21:52:47.848Z DEBUG modem >> AT+CFUN?
2021-04-12T21:52:47.858Z DEBUG modem << +CFUN: 1
2021-04-12T21:52:47.877Z DEBUG modem << OK
2021-04-12T21:52:47.883Z DEBUG modem >> AT+CGSN=1
2021-04-12T21:52:47.894Z DEBUG modem << +CGSN: "352656106114062"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

seems fine

Mostly right now, I turn the modem power on, then send:

Fullscreen
1
2
3
4
5
6
AT+CFUN=1
AT+CFUN?
AT+CGDCONT=1,"IP","m2m.telus.iot"
AT+CFUN?
AT+CFUN?
AT#XHTTPCCON=1,"google.ca",80
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks,

Kyle

Edit:
It appears the FW doesn't support the HTTPCCON command?? even though its in the documentation?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2021-04-12T22:34:30.215Z DEBUG modem >> AT#XCLAC
2021-04-12T22:34:30.226Z DEBUG modem << AT#XSLMVER
2021-04-12T22:34:30.228Z DEBUG modem << AT#XSLMUART
2021-04-12T22:34:30.232Z DEBUG modem << AT#XSLEEP
2021-04-12T22:34:30.234Z DEBUG modem << AT#XRESET
2021-04-12T22:34:30.234Z DEBUG modem << AT#XDATACTRL
2021-04-12T22:34:30.246Z DEBUG modem << AT#XTCPFILTER
2021-04-12T22:34:30.248Z DEBUG modem << AT#XTCPSVR
2021-04-12T22:34:30.249Z DEBUG modem << AT#XTCPCLI
2021-04-12T22:34:30.250Z DEBUG modem << AT#XTCPSEND
2021-04-12T22:34:30.252Z DEBUG modem << AT#XTCPRECV
2021-04-12T22:34:30.254Z DEBUG modem << AT#XUDPSVR
2021-04-12T22:34:30.255Z DEBUG modem << AT#XUDPCLI
2021-04-12T22:34:30.256Z DEBUG modem << AT#XUDPSEND
2021-04-12T22:34:30.257Z DEBUG modem << AT#XSOCKET
2021-04-12T22:34:30.258Z DEBUG modem << AT#XSOCKETOPT
2021-04-12T22:34:30.259Z DEBUG modem << AT#XBIND
2021-04-12T22:34:30.260Z DEBUG modem << AT#XCONNECT
2021-04-12T22:34:30.261Z DEBUG modem << AT#XLISTEN
2021-04-12T22:34:30.276Z DEBUG modem << AT#XACCEPT
2021-04-12T22:34:30.277Z DEBUG modem << AT#XSEND
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Trying 
img_app_bl/serial_lte_modem_2021-03-01_8e8c6089.hex

and 

img_app_bl/nrf9160dk_at_client_2021-03-01_8e8c6089.hex   << doesn't do anything different other than it no longer responds to AT#XCLAC

Edit2:

The FTP commands seem to be missing from both FW as well?

Edit3:

Part of good news, it does connect to the network and I can ping things, and use a normal TCP socket to manually request a non-SSL page, but this is not great because we want SSL and not have to build the HTTP layer.