HTTP Over TCP Sockets No Response BC660K-GL

Hello,

I’m using the module BC660K-GL Development Kit to try out HTTP over the TCP sockets.

After the connection is accomplished and the module is got the IP address, I use the given command to open a TCP socket.

AT+QIOPEN=0,0,“TCP”,“www.google.com”,80,0,1

After this command, I use this command to send a GET request. But as soon as I send a get request the connections gets closed.

AT+QISEND=0,46,“GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n”

image

When I send the same HTTP request using the Postman, I can get a result and response.

My aim is to use the s3 bucket from the amazon to download our firmware. But I cant get the response.
What could be the problem? I have tried different API endpoints too.

Any suggestions would be really helpfull. Thanks.

1 Like

Well, it’s a bit complicated, so I suggest you do it directly over TCP, or MQTT

1 Like

Thank you for your answer. Yes, we can use the TCP directly but then we have to deploy our TCP server which adds complexity. That is why we want to use HTTP over TCP if we can.

Are there any reason why it is complicated?

I’m just sending a HTTP message over a TCP Socket using the port 80 which is intented for the HTTP over TCP protocol, and excepting the response.

Is there something that I’m missing in my current implementation, or it is not possible to get the HTTP response over TCP using the module BC660K-GL?

You can also grab the Debug log and get the packet for analysis, perhaps due to packet packaging exception