Add Serial Number lookup Support and Move EEPROM storage in USB Radio #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the current version of chan_usbradio there is option to store configuration settings in the optional EEPROM. With URI's that use CM119B, the EEPROM is required as it stores configurations of the chip itself. The problem arises when chan_usbradio configurations is stored on the CM119B EEPROMs as chan_usbradio overwrites the chips parameters.
The first half of this change moves the storage of chan_usbradio to a higher point in the EEPROM memory that is currently identified as unused by all URI Chips. There is currently no code that checks for existing configuration at the old location.
Secondly, the Cmedia devices have the ability to access a USB serial number from the optional EEPROM. The second change in the PR allows a user to configure a
devserial
parameter in chan_usbradio. This will be checked against devices with serial numbers, and if a match is found will use that device from the list. This works similar to thedevstr
parameter. Serial numbers take priority over any other configuration parameter. If a serial is configured, but not found we drop into the previous methods. The code also successfully handles cases where mixed devices with and without serial numbers also function.