Closed samgosamgo closed 4 months ago
The first bit before preamble is likely a ramp-up of the power amplifier - this is very common and can be ignored. That's why the preamble and sync word is there, to let you distinguish a packet from a noise.
Next, the bits at the end - how do you decide where to stop receiving your packet? Typically this would be done by including a length field in the packet itself (which you disabled) or using only packets of fixed lengths, in which case there is no need for you to process beyond that length.
Finally, there's the issues in your code:
radio.fixedPacketLengthMode(0);
- A packet of fixed length 0 seems like it shouldn't work at all. What were you trying to achieve by this?radio.finishTransmit();
- why are you calling this? It's being done internally by transmit
, none of the examples reference finishTransmit
, so I don't understand why you felt the need to add it.First, thank you for a speedy reply.
I added the configuration checks in this format for any configuration lines, and there seems to be no errors on any configuration set ups.
state = radio.setCrcFiltering(false);
if (state != RADIOLIB_ERR_NONE) {
Serial.print(F("Set CRC filtering failed, code "));
Serial.println(state);
while (true);
}
I was trying to set the format to unlimited length packet format, which according to the RFM69HCW module datasheet, Unlimited length packet format is selected when bit PacketFormat is set to 0 and PayloadLength is set to 0.
This was a mistake on my end, and it seems to have no effect on the output.
I have also tried
radio.fixedPacketLengthMode(4); // size of message is 4 bytes
which doesn't drop the extra bits at the end.
which doesn't drop the extra bits at the end.
Why do you think there are extra bits? Or rather, how should the SDR distinguish the bits from the noise?
I'm still not sure why there are extra bits at the end. Regardless, it seems like there is no problem retrieving the message with the feather 32u4 with RFM69HCW module. Thank you for your assistance.
And I remain unconvinced these extra bits are being transmitted by the radio. I think you are just taking some noise after the packet end and interpreting it as "bits". Since the only thing I know about how you are receiving the data is "using RTL-SDR driver to receive the signal.", I don't whether that could be the case.
Hello, I am attempting to send a message with the following structure: preamble, sync word, and message
It seems that there are some unnecessary bits in the packet. There is 1 bit before and after the preamble, and 18 bits after the preamble.
The expected output is (in hex) 0xAAAAD29207074b22 (in binary) 1010101010101010110100101001001000000111000001110100101100100010
The output I am currently getting is (in binary) 1 1010101010101010 1 110100101001001000000111000001110100101100100010 010100101010100001 (here I have separated in space the unnecessary and necessary bits)
The following is my code.
I am using feather 32u4 with RFM69HCW module, and using RTL-SDR driver to receive the signal. Is there a way to get rid of the unnecessary bits?