Since some time I'm experimenting with HC-12 wireless transceiver.
My test environment has two Arduinos with HC-12 connected by a software serial. On HC-12 I'm using a default configuration which has:
My simple test scenario is as below:
Si4463 sends data over the air as packets. It looks like HC-12 need to collects (on the serial port) some amount of bytes, then send them to Si4463, which sends them over the air as a packet.
Here is how it may looks like in my test scenario:
@ Mark Hughes , if you do not mind I created this thread with the same title as your article (mentioned above). If you do not agree, please let me know and I will change it.
@Mark Hughes, in your article you put an image:
where you send allaboutcircuits.com over HC-12. You have noticed that there is a gap (or a delay) before .com has been sent. I think this is because of the way how Si4463 sends data: it sends them in packets. Probably HC-12 is designed in the way, that every 16 characters (that are sent over serial port) are sent to Si4463 as a packet. Just count the number of characters in allaboutcircuits - it is 16. Then HC-12 receives the last part of text .com but default packet size for HC-12 is 16. HC-12 waits a bit for more data to read from serial port. But after some time (like a timeout) it notices, that no more data is sent through serial port. HC-12 decides that current transmission over serial port is over and send the last part to Si4463. This could be the explanation of the delay, that you have noticed. I think this delay can be read from your picture, but I need to take a closer look at this.
Mark - what do you think of this?
My test environment has two Arduinos with HC-12 connected by a software serial. On HC-12 I'm using a default configuration which has:
- 9600 bps as data speed of serial port
- 15000 bps as data speed over the air
My simple test scenario is as below:
- Arduino number A sends a 7B ping packet to Arduino number B
- Arduino B receives that ping packet and sends ACK packet (acknowledgment) - which is also 7B - back to Arduino A
- Arduino A receives the ACK packet
- The whole round-trip of packets takes around 97ms. I was a bit surprised why it takes so long. Then I have found this article by @ Mark Hughes Thanks Mark! After reading it I understood that HC-12 uses Si4463 under the hood. When I took a look at its datasheet, I think now I know why the round trip takes so long
Si4463 sends data over the air as packets. It looks like HC-12 need to collects (on the serial port) some amount of bytes, then send them to Si4463, which sends them over the air as a packet.
Here is how it may looks like in my test scenario:
- Arduino A sends 7B to serial port with data rate 9600 bps. It takes around 8ms (including start and stop bits for every byte).
- HC-12 collects the data on its serial port. Ir receives 7B and after some time (like a timeout) it finds out that no more data will be sent over serial port. HC-12 sends the data to Si4463.
- Si4463 sends the 7B as a packet. This packet's length is probably more than 7B (there is a preamble, CRC, and some other things). Lets assume that it has 15B of length. With 15000 bps, the transmission is roughly about 8ms.
- HC-12 (attached to Arduino number B) receives the packet and shifts it to itd serial port with 9600 bps. It takes again around 8ms.
@ Mark Hughes , if you do not mind I created this thread with the same title as your article (mentioned above). If you do not agree, please let me know and I will change it.
@Mark Hughes, in your article you put an image:

where you send allaboutcircuits.com over HC-12. You have noticed that there is a gap (or a delay) before .com has been sent. I think this is because of the way how Si4463 sends data: it sends them in packets. Probably HC-12 is designed in the way, that every 16 characters (that are sent over serial port) are sent to Si4463 as a packet. Just count the number of characters in allaboutcircuits - it is 16. Then HC-12 receives the last part of text .com but default packet size for HC-12 is 16. HC-12 waits a bit for more data to read from serial port. But after some time (like a timeout) it notices, that no more data is sent through serial port. HC-12 decides that current transmission over serial port is over and send the last part to Si4463. This could be the explanation of the delay, that you have noticed. I think this delay can be read from your picture, but I need to take a closer look at this.
Mark - what do you think of this?