-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Radio's should report RSSI in dBm #6887
Copy link
Copy link
Closed
Labels
Area: driversArea: Device driversArea: Device driversArea: networkArea: NetworkingArea: NetworkingType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Description
When receiving a frame, all radio's report the RSSI as the raw register value in the netdev_radio_rx_info struct. This way it is impossible to use this value in any higher level layer. This value should be converted to dBm by the radio drivers, to have any use.
I would propose to refactor the type of the rssi variable to int8_t. The practical range of most radio's is between -10 and -100 dBm. The reason for keeping it as a negative value instead of an absolute value is mainly for ease of programming and clarity. I don't think anyone is ever going to hit positive dBm values, but to me it makes sense to keep it negative.
I've done most of the work for all radio drivers, but I only own the mrf24j40 so I can't test everything.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: driversArea: Device driversArea: Device driversArea: networkArea: NetworkingArea: NetworkingType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation