-
Notifications
You must be signed in to change notification settings - Fork 29
FHSS
Frequency-Hopping Spread Spectrum (FHSS) is available for panStamp NRG starting from version 1.0.7 of the Arduino cores.
FHSS systems switch rapidly between different carrier frequencies during each packet transmission, dividing each packet into multiple shorter transmissions done over every different frequency. In order for the receiver to correctly read the whole packet transmitted, transmissions need to be done over a known pattern of frequency hops. This pattern has then to be shared by both the transmitter and the receiver.
FHSS systems are being increasingly used in ISM (Industry, Science and Medicine) applications due to its better noise immunity and higher resistance against RF attacks. Hacking FHSS transmissions not only involves knowing the typical RF parameters such as initial channel, synchronization word and even the encryption password but also knowing the complete sequence of frequency hops.
Another advantage of FHSS is the capability of handling higher bandwidths. Since each RF channel is being occupied for shorter transmissions, multiple nodes can be transmitting simultaneously as far as they are on a different frequency hop.
The frequency hop pattern is hardcoded into panstamp.cpp. In order to enable this feature FHSS_ENABLED needs to be enabled in panstamp.h
#define FHSS_ENABLED 1
After this, any transmission done with panstamp.sendData() will follow the programmed FHSS pattern. On the receiver side, the panStamp stack will receive the packet over the multiple frequency hops and will pass the assembled packet to the user application. If you are using SWAP or GWAP in your application - both protocols developed by panStamp - then this is already done in the background. No need then to do anything apart from enabling FHSS_ENABLED. Other interesting functions that can be called on-demand:
panstamp.startDwellingTimer(); //Start FHSS dwelling timer
panstamp.stopDwellingTimer(); //Stop FHSS dwelling timer
panstamp.getCurrentChannel(); //Get(return) current hopping channel