RFM22B and packet length

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have got the EWS_RFM22B_CHAT_EXAMPLE working and spent hours reading the RFM22B and Silicon Labs AN440.pdf datasheets.

I have a test link passing a single byte command back and forth to control some hardware. I have my own code to make it "reliable".

The example works with PKTSIZE down to somewhere between 10 and 17, then stops. For sending one byte, all my reading suggests that PKTSIZE could be 1.

Could anyone enlighten me?

Thanks,
davef

Last Edited: Fri. Oct 16, 2015 - 01:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry I didn't see this sooner.

I'm using RadioHead (Mike's) excellent library for Arduino and Teensy 3's. With the RFM22B in module form, and I have some really good value System on a chip from Anarduino.

The RFM22 packet size can be 1+ where you choose to stay within the FIFO's limits (60 bytes as I recall), or you can manage the RX/TX FIFO on the fly to have, say, 255 bytes per packet.

The RadioHead library works well and is simple to use.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry I didn't see this sooner.

I'm using RadioHead (Mike's) excellent library for Arduino and Teensy 3's. With the RFM22B in module form, and I have some really good value System on a chip from Anarduino.

The RFM22 packet size can be 1+ where you choose to stay within the FIFO's limits (60 bytes as I recall), or you can manage the RX/TX FIFO on the fly to have, say, 255 bytes per packet.

The RadioHead library works well and is simple to use.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Better late then never! I still don't understand the basic packet configuration.

Using the EWS_RFM22B_CHAT_EXAMPLE and some basic debugging I am certain that for sending that one byte, ie the letter 'A' that I get two packets at the RX end ... one that passes checksum and the other doesn't. And I need PKTSIZE to be 17 to do that successfully.

Am I correct that write(0x3E, PKTSIZE); means that if you want to send one byte then PKTSIZE could be 1 or does PKTSIZE also include TX headers, CRC and preamble etc?

Would really appreciate knowing what happens at this level before moving on to RadioHead.

Thanks,
Dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Think I am making some progress. The above example is set up like this:

as bit 5 in 0x30 is zero, then the checksum is calculated across the TX header (4 bytes), packet length (1 byte) and the actual data (1 byte). So, in my case PKTSIZE needs to be at least 6 bytes.

Am I right so far?

Thanks,
davef