Skip to content

RadioHead Packet Radio library for embedded microprocessors - Fork for RFM22B support on Raspberry PI

License

Notifications You must be signed in to change notification settings

istvanzk/RadioHead

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RadioHead Packet Radio library for embedded microprocessors - Fork for RFM22B and RFM69 support on Raspberry Pi, October 2020

Features added with this fork

This is a modification of the initial fork by Charles-Henri Hallard for Raspberry PI support of the original RadioHead Packet Radio library. The RadioHead Packet Radio library for embedded microprocessors by Mike McCauley provides a complete object-oriented library for sending and receiving packetized messages via a variety of common data radios and other transports on a range of embedded microprocessors.

Please read the full documentation and licensing for the original code by Mike McCauley. This fork has been merged with the orginal RadioHead Packet Radio library version 1.108

Compatible boards

Installation and use on Raspberry PI

Clone repository

git clone https://github.com/istvanzk/RadioHead

Note: the example scripts using the bcm2835_gpio_len/eds combination, work only if the boot/config.txt contains the line

dtoverlay=gpio-no-irq

For the explanations see conclusion, discussion, discussion.

Connection and pins definition

To connect a Raspberry Pi (V2) to a RFM22B module, connect the pins like this:

          Raspberry PI      RFM22B
    P1_20,P1_25(GND)----------GND-\ (ground in)
                              SDN-/ (shutdown in)
                 VDD----------VCC   (3.3V in)
      P1_22 (GPIO25)----------NIRQ  (interrupt request out)
         P1_24 (CE0)----------NSEL  (chip select in)
         P1_23 (SCK)----------SCK   (SPI clock in)
        P1_19 (MOSI)----------SDI   (SPI Data in)
        P1_21 (MISO)----------SDO   (SPI data out)
                           /--GPIO0 (GPIO0 out to control transmitter antenna TX_ANT)
                           \--TX_ANT (TX antenna control in) RFM22B only
                           /--GPIO1 (GPIO1 out to control receiver antenna RX_ANT)
                           \--RX_ANT (RX antenna control in) RFM22B only

To connect a Raspberry Pi (V2) to a RFM69HCW module, connect the pins like this:

          Raspberry PI     RFM69HCW
      P1_20,P1_25(GND)----------GND   (ground in)
                   VDD----------VCC   (3.3V in)
        P1_22 (GPIO25)----------DIO0  (interrupt request out)
           P1_24 (CE0)----------NSS   (chip select in)
           P1_23 (SCK)----------SCK   (SPI clock in)
          P1_19 (MOSI)----------SDI   (SPI Data in)
          P1_21 (MISO)----------SDO   (SPI data out)

Boards pins Chip Select and IRQ line (Reset and LED not used) definition for RFM22B and RFM69HCW can be set in your code like:

#define RF_CS_PIN  RPI_V2_GPIO_P1_24 // Slave Select on CE0 so P1 connector pin #24
#define RF_IRQ_PIN RPI_V2_GPIO_P1_22 // IRQ on GPIO25 so P1 connector pin #22
#define RF_LED_PIN NOT_A_PIN	       // No onboard led to drive
#define RF_RST_PIN NOT_A_PIN		     // No onboard reset

About

RadioHead Packet Radio library for embedded microprocessors - Fork for RFM22B support on Raspberry PI

Resources

License

Stars

Watchers

Forks

Languages

  • C++ 74.1%
  • C 25.2%
  • Other 0.7%