According to http://arduino.cc/forum/index.php?topic=50417.0 and to my tests, the tx_ant and rx_ant pins arent needed. I leave them floating and it seems to work fine.
The ones Im using are identical to the one in the picture at:http://www.sparkfun.com/products/10153If it really needs tx_ant and rx_ant pins to be controlled externally, then I will need to make some changes to the library. But... surely the controller chip on board knows when it want to transmit and recieve and should be controlling the antenna switch itself? Why would it expect an external processor to control the antenna switch for it?Cheers.
The RF22 library was written for the RFM22B devices and AFAICS, the tx_ant and rx_ant pins dont need to be connected for the RFM22B. May be different for the RFM22 devices, but RF22 library does not support them.
spiWrite (RF22_REG_0B_GPIO_CONFIGURATION0, 0xD2) ; // TX state spiWrite (RF22_REG_0C_GPIO_CONFIGURATION1, 0xD5) ; // RX state
8.9. Antenna DiversityTo mitigate the problem of frequency-selective fading due to multi-path propagation, some transceiver systems use a scheme known as antenna diversity. In this scheme, two antennas are used. Each time the transceiver enters RX mode the receive signal strength from each antenna is evaluated. This evaluation process takes place during the preamble portion of the packet. The antenna with the strongest received signal is then used for the remainder of that RX packet. The same antenna will also be used for the next corresponding TX packet.This chip fully supports antenna diversity with an integrated antenna diversity control algorithm. The required signals needed to control an external SPDT RF switch (such as PIN diode or GaAs switch) are available on the GPIOx pins. The operation of these GPIO signals is programmable to allow for different antenna diversity architectures and configurations. The antdiv[2:0] bits are found in register 08h "Operating & Function Control 2."The GPIO pins are capable of sourcing up to 5 mA of current, so it may be used directly to forward-bias a PIN diode if desired.