Based on my review of the AT command sets and app notes, the MC60’s AT command set doesn’t directly support WebSocket. So:
AT+QIOPEN, AT+QISEND only open raw TCP/UDP sockets.
AT+QHTTP… commands are for classic HTTP GET/POST.
There’s no specific AT command for WebSocket. Your application must handle handshake and framing on the MCU side.
If you want to use WebSocket ;
Open TCP with AT+QIOPEN.
Send a handshake GET as the first message:
GET /ws HTTP/1.1\r
Host: xxx.xxx.xx.xxx\r
Upgrade: websocket\r
Connection: Upgrade\r
Sec-WebSocket-Version: 13\r
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r
\r
The server should return 101 Switching Protocols.
Then, the MCU code should generate the WebSocket frames (mask, opcode, length) itself and send them raw with AT+QISEND.
So, the MC60 is essentially the raw carrier, and you must code the WebSocket protocol layer yourself.
My recommendation is to use QHTTPPOST if your endpoint only expects JSON POSTs. It’s much simpler and doesn’t suffer from fragmentation. If you need a WebSocket, you’ll need to implement the WebSocket framework on the MCU side.