1.2.7.1 How the Library Works

RF PHY Frames Serialization

RF Sniffer mission is to provide information about every frame present in the RF medium. This information includes the frame itself and some parameters related to RF communications.

Sniffer library provides functions which perform the encoding of the frames along with their related parameters and store them in a buffer that can be later sent through a Serial interface.

On the other side of this interface, the Microchip Hybrid Sniffer Tool will receive the encapsulated packets, process and present them on a GUI to ease visualization and further analysis. This allows monitoring the PLC-RF medium in real time.

Library provides separate functions to be called either when frames are transmitted, and when are received by a device. This leads to 2 different modes of operation for the Sniffer:

  • Stand-alone Sniffer. A device which runs an application with the only purpose of acting as a sniffer. In this case, device wil never send any frame, and thus only the received frames serialization will be used.

  • Embedded Sniffer. This mode is used when a regular device embeds sniffer capabilities. In this case, received frames will be serialized (after sending them to upper layers for regular processing), and also transmitted frames will be sent to the sniffer library so they are serialized (to simulate reception of own frames).

Parameters Encoded with Frames for Serialization

The parameters included to provide additional information of the RF frames depend on the used PLC-RF protocol, G3 or PRIME.

G3 parameters

ParameterDescription
Modulation Type/SchemeModulation in which RF frame is encoded
FCS CorrectFlag to indicate if FCS is correct
Num SymbolsNumber of symbols that frame payload consists of
Time IniTimestamp for the start of frame
Time EndTimestamp for the end of frame
RSSIReceived Signal Strength Indicator (fixed to 14 - 'txPwrAtt' for transmitted frames)
LengthFrame lenght
PDUFrame buffer

PRIME parameters

ParameterDescription
Modulation Type/SchemeModulation in which RF frame is encoded
Num SymbolsNumber of symbols that frame payload consists of
ChannelRF Channel in which device is operating
Time IniTimestamp for the start of frame
Time EndTimestamp for the end of frame
RSSIReceived Signal Strength Indicator (fixed to 14 - 'txPwrAtt' for transmitted frames)
LengthFrame lenght
PDUFrame buffer