-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Is your enhancement proposal related to a problem? Please describe.
Some GNSS modules have the ability to switch between multiple antennas (internal vs external, etc). It would be good if the API supported a way to adjust and report back which antenna was used.
Describe the solution you'd like
Change the gnss_info struct
to something like:
/** GNSS info data structure */
struct gnss_info {
...
/** The index of the antenna used */
uint8_t antenna_index;
};
If a device only has a single antenna, antenna_index
would always be set to 0. This data can be parsed by the GNSS callback.
Add a function like:
int gnss_set_antenna(const struct device *dev, uint8_t antenna_index);
To set which antenna is being used.
Describe alternatives you've considered
An out of tree driver for this specific radio, but this still would require changes to the zephyr code anyway.
Additional context
Example module is Quectel LC86G, which supports an internal antenna (mounted directly on the module) or an external antenna connected to a pin on the module. Setting the antenna type is done through a command like:
$PQTMCFGANTENNA,W,0,0*7E
And the radio sends out regular messages like the following which contain the antenna selection status:
$PQTMANTENNASTATUS,3,1,2,1*52