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

Simply trying to connect and send data to Herokuapp with nRF9160 using AT commands

I'm working with a NimbeLink SkyWire Nano Dev kit, but I am hoping the question is simple enough that I can get some quick help here. I'm new to this side of things, so any help is greatly appreciated.

I'm able to use basic AT commands to open a socket connection on port 80 and send data via POST to dweet.io. (I also can't get this to work through nRF LTE Monitor, only Tera Term)

AT#XSOCKET=3,1,1
#XSOCKET: 3,6
OK
AT#XTCPCONN=3,"dweet.io",80
#XTCPCONN: 1
OK
AT#XTCPSEND=3
>POST /dweet/for/xxxx?h=HelloTest HTTP/1.1

#XTCPSEND: 56

OK
SOCK: 3,DTA
AT#XTCPRECV=3,500,10
#XTCPRECV: 368,HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 203
Date: Thu, 10 Dec 2020 13:32:20 GMT
Connection: keep-alive

{"this":"succeeded","by":"dweeting","the":"dweet","with":{"thing":"xxxx","created":"2020-12-10T13:32:20.622Z","content":{"h":"HelloTest"},"transaction":"b8750453-xxxx-xxxx-xxxx-0c309a341fb1"}}
OK

I am able to open a socket connection to our existing webapp (example.herokuapp.com) on port 80.

However, I haven't been able to send data to example.herokuapp.com and am wondering why.

  • I've also tried POST, as well as sending the full URL (example.herokuapp.com/add.  Nothing gets through to the webapp or even the logs on Herokuapp.

AT#XSOCKET=3,1,1
#XSOCKET: 3,6
OK
AT#XTCPCONN=3,"">example.herokuapp.com",80
#XTCPCONN: 1
OK
AT#XTCPSEND=3
>GET /add?HelloTest HTTP/1.1

#XTCPSEND: 47

OK
SOCK: 3,DTA
SOCK: 3,HUP

If I simply paste this into the web browser, our webapp logs it.

Any help is appreciated, thanks.

Related