BG95: AT HTTP commands

First of all, if the problem is categorised incorrectly, please let me know.

HTTP(s) application note describes HTTP related commands. Typical POST request consists of:

  • AT+QHTTPURL to set up request URL
  • AT+QHTTPPOST to perform POST operation (and provide data to be posted in CONNECT phase)
  • AT+QHTTPREAD to read serwer response.

In my case, communication looks as follows:

HOST->MODEM: AT+QHTTPURL=xx,xx
MODEM->HOST: CONNECT
HOST->MODEM: xxxxxxxxxx
MODEM->HOST: OK

HOST->MODEM: AT+QHTTPPOST=xx,xx,xx
MODEM->HOST: CONNECT
HOST->MODEM: xxxxxxxxxx
MODEM->HOST: OK
MODEM->HOST: +QHTTPPOST: 0,200,0

HOST->MODEM: AT+QHTTPREAD=xx
MODEM->HOST: CONNECT
MODEM->HOST: xxxxx
MODEM->HOST: OK
MODEM->HOST: +QHTTPREAD: 0

If any URC is expected (after POST, READ), the code waits for it before executing next command.

From AT flow point of view, transaction looks fine. However, from server point of view, HTTP request is OK (server gets proper request, server response is correctly delivered back to BG95 and read using AT+QHTTPREAD. Unfortunatelly TCP connection is kept alive, no TCP termination sequence (FIN frame) is sent from BG95 to the server.

Modem / fw version:

HOST->MODEM: AT+QGMR
MODEM->HOST: BG95M3LAR02A03_01.200.01.200
MODEM->HOST: OK

HOST->MODEM: ATI
MODEM->HOST: Quectel
MODEM->HOST: BG95-M3
MODEM->HOST: Revision: BG95M3LAR02A03

Could you please guide me how to solve the problem in such way that TCP connection is closed properly?

I made some experiments on other Quectel modems. In case of EG25G, it seems calling at the end AT+QHTTPSTOP does the trick.

Unfortunatelly, the same command (AT+QHTTPSTOP) likely doesn’t exist in BG95, at least with firmware which I have.

Hi,

What about in Quectel MC60? How to end HTTP session?