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

nrf9160 Serial LTE Modem HTTP emulation on TCP

I was working on nRF9160 DK and was trying to emulate HTTP using the AT TCPSEND command.
The following is the series of commands I am using
AT#XSOCKET=1,1
AT#XBIND=8080
AT#XTCPCONN="X.Y.Z.Q",8080
AT#XTCPCONN?
AT#XTCPSEND="GET /hello HTTP/1.1\r\nHost: X.Y.Z.Q \r\nConnection: keep-alive\r\n\r\n"
AT#XTCPRECV=200,30
AT#XSOCKET=0
The reply I get on that is "DEBUG modem << #XTCPRECV: HTTP/1.1 400 Bad Request"
SDK: v1.2.0 or older
MFW: 1.2.3
Any help would be much appreciated.
Parents
  • Hello, 

    The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

    Are you sure this is correct way to communicate?

    Kind regards, 
    Øyvind

Reply
  • Hello, 

    The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

    Are you sure this is correct way to communicate?

    Kind regards, 
    Øyvind

Children
Related