mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 00:19:52 +00:00
Expose LQI from radio up through Thread stack. (#70)
* Add an LQI field to the radio packet structure. * Add an LQI field to the ThreadMessageInfo. * Add an LQI field to the scan result. * Print LQI value in CLI scan result.
This commit is contained in:
@@ -116,6 +116,7 @@ typedef struct otActiveScanResult
|
||||
uint16_t mPanId; ///< IEEE 802.15.4 PAN ID
|
||||
uint8_t mChannel; ///< IEEE 802.15.4 Channel
|
||||
int8_t mRssi; ///< RSSI (dBm)
|
||||
uint8_t mLqi; ///< LQI
|
||||
uint8_t mVersion : 4; ///< Version
|
||||
bool mIsNative : 1; ///< Native Commissioner flag
|
||||
bool mIsJoinable : 1; ///< Joining Permitted flag
|
||||
|
||||
@@ -75,6 +75,8 @@ enum
|
||||
|
||||
kPhyBitsPerOctet = 8,
|
||||
kPhyUsPerSymbol = ((kPhyBitsPerOctet / kPhySymbolsPerOctet) * 1000000) / kPhyBitRate,
|
||||
|
||||
kPhyNoLqi = 0, ///< LQI measurement not supported
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -97,6 +99,7 @@ typedef struct RadioPacket
|
||||
uint8_t mPsdu[kMaxPHYPacketSize]; ///< The PSDU.
|
||||
uint8_t mChannel; ///< Channel used to transmit/receive the frame.
|
||||
int8_t mPower; ///< Transmit/receive power in dBm.
|
||||
uint8_t mLqi; ///< Link Quality Indicator for received frames.
|
||||
bool mSecurityValid; ///< Security Enabled flag is set and frame passes security checks.
|
||||
} RadioPacket;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user