Sending binary data with BC660K module?

Hello.

Can binary data be sent through BC660K TCP/IP connection using command

at+qisend=0,nnn,"<data here>"+<CRLF>
Where nnn = number of bytes to be sent.

As NB-IoT is so restricted (in speed, size of data blocks, …), I want to send most efficienty. So re-packing everything into HEX is actually no good idea, it halves the size of every packet.

Data is actually transmitted in binary form, this way you just communicate with the module using ASCII.
AT+QISEND=0,1,00 will send 1 byte.

rastik,

So I can literally send any byte to the BC660K in the data section (after and “,”), including a 0x0D and/or 0x0A ?
All bytes are treated as data?

I am asking, because this did not appear to be so. Or must I leave away “” in this case?

Hi, Herbert.
Thank you for this information.

Referring to the screenshots you provided:

  1. Variable data length mode is for sure not capable to send any byte from 0x00 … 0xFF. Reason: (= 0x1A in hex) is also part of this range but will trigger the transmission.
  2. So there is only the fixed data length mode remaining. But even here I doubt it is accepting literally any possible byte. Will a (= 0x0D), <ctrl+Z> (= 0x1A), (= 0x0A) be transmitted to the receiver instead of being handles locally by the modem?

You for sure understand the difference between ASCII and BINARY?
If not, I try to explain below. You see the same number twice.

In ASCII, I have to send 8 Characters/Bytes, one byte for every digit.
In BINARY the same number requires only 4 Bytes! This is not human readable, but lots shorter.
ASCII ____ BINARY
20241232 _ 01 34 DB 4F ← This is HEX writing (01 is the same as <Ctrl+A>, as an example)
255 ______ FF ← For number 255 you need 3 byte in ASCII, 1 Byte in binary.

Hope you understand?

I also wonder about one crazy effect I experienced:
I cannot send more than 92-94 characters in one command. Because HEX needs two characters for one data byte, this means that the maximum number of data bytes I can send in one block is limited to 46-47 byte only!
Is this a limitation of BC660K ?
I googled and found out that the maximum data size can vary from approx. 350 byte - 1500 Byte (depending on provider). Even when TCP/IP requires 30-60 Byte, I should be able to send approx 300 Byte in one block, not 92-94!

Hi rainer,

for binary data you have to use fixed data length mode.
This way all binary values are considered data and the modem only exits data mode after receiving the number of bytes it’s expecting.

You can also use HEX mode with the drawback of sending the double amount of bytes to the modem.

In any other method you’ll have to escape special characters.

Since BC660KGLAAR01A05_01.002.01.002 firmware AT+QISEND accepts 1024 bytes in HEX mode as well.

Yes, that’s correct. Just specify <num_bytes> and then add that many bytes in hex, i.e. number of characters is double the <num_bytes>. You can send zeros and other special characters this way.