AT+SQNHTTPRCV: Systematic byte mutation during binary download over HTTPS

Hello

We are trying to download a binary file onto a custom host MCU platform connected via UART to a GM02S running UE8.2.0.2. File is hosted on Azure Blob Storage and we want to download over HTTPS using the modem’s built-in HTTP stack (AT+SQNHTTPCFG, AT+SQNHTTPCONNECT, AT+SQNHTTPQRY, and AT+SQNHTTPRCV).

When downloading raw binary chunks via AT+SQNHTTPRCV=2,1500, the incoming byte stream undergoes a deterministic bitwise mutation where Bit 2 (0x04) is forcefully set on specific low-value bytes.

Specifically:

  • 0x01 (0000 0001) consistently arrives as 0x05 (0000 0101).
  • 0x02 (0000 0010) consistently arrives as 0x06 (0000 0110).
  • 0x03 (0000 0011) consistently arrives as 0x07 (0000 0111).

There might be others but I think this illustrate sufficiently the issue. This is not random noise or dropped bytes—the byte alignment and total file length match the source image exactly, but every instance of 0x01 across the entire payload is translated to 0x05 when compared against the original .bin file in GHex.

What we tried so far:

  • Verified AT+IFC? returns +IFC: 2,2 (Hardware RTS/CTS flow control active). This never gave us any issue.
  • Explicitly switched AT+CSCS="HEX" prior to issuing AT+SQNHTTPRCV.
  • Queried AT+ICF? returns +ICF: 3, this never gave use any issue.

Questions are as follows:

  1. Does AT+SQNHTTPRCV apply any internal escape sequences, control-character mapping, or internal buffer translations to low-value ASCII bytes (0x010x03) when streaming raw octet streams (application/octet-stream)?
  2. Is there a recommended AT command configuration or character set selection specifically required to guarantee transparent 8-bit binary pass-through when reading HTTP responses via UART?
  3. Are there any known driver or firmware quirks in release LR8.2 regarding UART output serialization during AT+SQNHTTPRCV?

Any guidance on achieving transparent 8-bit binary streaming via AT+SQNHTTPRCV would be greatly appreciated.

Thank you.

Hi Ben-AgFlo:

Could you provide me the binary file and the AT commands you used for HTTPS test?

Could you run ATI1 to get the exact sw version? Is it LR8.2.0.2-59200?

Best regards,

Eros

Here is the set of commands used to fetch binary file

AT+CSCS="HEX"

AT+IFC=2,2

AT+SQNHTTPDISCONNECT=2

AT+SQNHTTPCFG=2

AT+SQNSPCFG=1,2,"",1

AT+SQNHTTPCFG=2,"``xyz.blob.core.windows.net``",443,0,"","",1,60,1,1

AT+SQNHTTPCONNECT=2

! Wait for URC: +SQNHTTPCONNECT: 2,0

AT+SQNHTTPQRY=2,0,"/device_firmwares/5.7.0/ultrasound/5.7.0.bin?<SAS_TOKEN>"

! Wait for URC: +SQNHTTPRING: 2,200,"application/octet-stream",204800

AT+SQNHTTPRCV=2,1500

ATI1 command output:
ATI1
UE8.2.0.2
LR8.2.0.2-59200

I will not paste our firmware file of our product here. I will send privately a truncated part of it that does not contain any sensitive information.

Thank you, Ben-AgFlo

It’s enough, I will use it for issue reproducing.

Best regards,

Eros