How to connect EC200U-CN to Azure IoT Hub using HTTPS (SAS Token)?

Hello,
I am working with the Quectel EC200U module and I want to connect it to Azure IoT Hub using HTTPS
Module: EC200U
I have already generated the SAS token and I am trying to send telemetry data

  • I am using QCOM tool

I want to know:

  1. Is EC200U fully compatible with Azure HTTPS telemetry?
  2. What is the correct way to send HTTP POST data to Azure IoT Hub using SAS token?
  3. Is there any example AT command sequence for Quectel modules using Azure HTTPS?
  4. Do I need to set any other QHTTPCFG parameters?
  5. Is there a recommended tool (QNavigator or QCOM settings) for sending multi-line HTTP payloads?

AT command
[2025-12-05_10:20:05:331]AT

[2025-12-05_10:20:05:331]OK
[2025-12-05_10:20:05:363]AT+QICSGP=1,1,“air”,“”,“”,1

[2025-12-05_10:20:05:363]OK
[2025-12-05_10:20:05:379]AT+QIACT=1

[2025-12-05_10:20:05:379]OK
[2025-12-05_10:20:05:395]AT+QHTTPCFG=“sslctxid”,1

[2025-12-05_10:20:05:395]OK
[2025-12-05_10:20:06:410]AT+QSSLCFG=“sslversion”,1,4

[2025-12-05_10:20:06:410]OK
[2025-12-05_10:20:07:411]AT+QSSLCFG=“ciphersuite”,1,0xFFFF

[2025-12-05_10:20:07:411]OK
[2025-12-05_10:20:08:401]AT+QSSLCFG=“seclevel”,1,0

[2025-12-05_10:20:08:401]OK
[2025-12-05_10:20:09:419]AT+QHTTPCFG=“requestheader”,1

[2025-12-05_10:20:09:419]OK
[2025-12-05_10:21:36:160]AT+QHTTPURL=100,80

[2025-12-05_10:21:36:160]CONNECT
[2025-12-05_10:21:37:191]
[2025-12-05_10:21:37:191]OK
[2025-12-05_10:21:44:422]AT+QHTTPPOST=220,80,80

[2025-12-05_10:21:45:114]CONNECT
[2025-12-05_10:21:57:535]
[2025-12-05_10:21:57:535]OK
[2025-12-05_10:21:57:821]
[2025-12-05_10:21:57:821]+QHTTPPOST: 0,400

Dear Kazuki1,

Thank you for your question regarding connecting the Quectel EC200U module to Azure IoT Hub using HTTPS.

Please find the simplified clarification below.

  1. EC200U Compatibility with Azure HTTPS Telemetry

Yes, the EC200U fully supports Azure IoT Hub telemetry over HTTPS, provided it is configured correctly.

The module supports:

-HTTPS communication
-TLS 1.2
-Custom HTTP request headers (required for SAS token authentication)

This makes it compatible with Azure IoT Hub’s HTTPS REST API.

  1. Sending HTTP POST Data Using SAS Token

Azure IoT Hub requires the SAS token to be included in the HTTP Authorization header.
To achieve this, the module must be configured to manual header mode:

AT+QHTTPCFG=“requestheader”,1

When this mode is enabled, the EC200U expects the entire raw HTTP request to be sent manually after the CONNECT prompt, including:

HTTP request line

Host header

Authorization header (SAS token)

Content-Type

Content-Length

Blank line (CRLF)

JSON telemetry payload

If any part of this request is missing or malformed, Azure will return HTTP 400 (Bad Request), which matches the behavior you observed.

  1. Example AT Command Flow (Simplified)

PDP Context

AT+QICSGP=1,1,“air”,“”,“”,1
AT+QIACT=1

SSL and HTTP Configuration

AT+QHTTPCFG=“sslctxid”,1
AT+QSSLCFG=“sslversion”,1,4
AT+QSSLCFG=“ciphersuite”,1,0xFFFF
AT+QSSLCFG=“seclevel”,1,0
AT+QHTTPCFG=“requestheader”,1
AT+QHTTPCFG=“responseheader”,1

Set HTTPS URL

AT+QHTTPURL=100,80
CONNECT
https://{IoTHubName}.azure-devices.net/devices/{DeviceID}/messages/events?api-version=2021-04-12

Send HTTP POST

AT+QHTTPPOST=220,80,80
CONNECT
POST /devices/{DeviceID}/messages/events?api-version=2021-04-12 HTTP/1.1
Host: {IoTHubName}.azure-devices.net
Authorization: SharedAccessSignature sr=…
Content-Type: application/json
Content-Length: 30

{“temperature”:25.5,“humidity”:60}

A successful request should return:

+QHTTPPOST: 0,200

  1. Additional Recommendations

Enable response headers for easier debugging:

AT+QHTTPCFG=“responseheader”,1

For production use, it is recommended to configure the Azure root CA certificate using AT+QSSLCFG=“cacert” instead of disabling certificate verification.

  1. Recommended Tool

Basic terminal tools (e.g. QCOM) can work but are more prone to formatting and length errors, which often result in HTTP 400 responses.

Have a great day!

Best regards,
Ananthan