AllStarLink / app_rpt

Refactoring and upgrade of AllStarLink's app_rpt, etc.
5 stars 4 forks source link

chan_simpleusb and chan_usbradio: Address issues with CM-119B chip #227

Closed KB4MDD closed 10 months ago

KB4MDD commented 11 months ago

chan_simpleusb and chan_usbradio needs changes to address problems identified with the CM-119B chip.

The following items were identified by Kevin W3KKC

  1. The level of boost (a function of an amount of attenuation, and the lack of it) is a commandable feature that is also EEPROM based in the CM119B. The standard functions of enabling and disabling seem to work correctly; IE both RX and TX boost commands work as intended in AllStar, but the software needs to be rewritten to command the “amount of” options from the application.

  2. There is bug where the CM119B loses audio if the mixer set value is set to below “375”. This probably due to the audio “steps” not aligning in the channel drivers. The audio scaling seems to be “off” and that’s probably why audio just disappears and is very granular.

  3. There is a bug that if RX boost is set to the “22 dB” setting (as opposed to the original/only 12 dB option in the CM119A), there is NO audio passed through the radio interface.

  4. The CM119B requires an eeprom to store needed parameters. Storing Radio Tune settings in the eeprom overwrites this factory information, requiring the device to be returned to the manufacturer for reprogramming. (The CM119B uses memory address 0 to 50 for factory information. The memory address contains 2 bytes. The CM119A uses memory address 0 to 44 for factory information. For the CM119B we have addresses 51 to 63 available - 13 addresses, which represents 26 bytes. We need 9 or 10 addresses for our tune information. The eeprom holds 64 16-bit words or 128 bytes.)

Notes: We have certainly verified that an EEPROM is necessary to hold the settings of Pop Filter (off) and Boost Mode 1 (12 dB), otherwise bad stuff is going to happen.

Notes: Hamvoip has the txdsplvl setting in the tune file - this level allows fine adjustment of the TX levels. By default, it is set to 999 and finely adjusts the TX level DOWN.

See https://community.allstarlink.org/t/uri-to-yaesu-vertex-vxr-7000-issues-please-help/15352/17?u=wd6awp for a full discussion.

KB4MDD commented 11 months ago

There is a problem with chan_simpleusb and chan_usbradio overwriting the eeprom information written by the device manufacturer. This should not happen.

The CM108 reserved the first 6 memory words (2 bytes per word) for vendor specific information, positions 0 to 5. Jim started writing data at memory position 6 to account for this reserved memory.

Based on the datasheets that I found:

As Kevin noted in his post, our drivers will overwrite any manufacturer information stored in the eeprom for the CM119A and CM119B.

We require memory positions to store:

This will be 12 total memory positions.

There are a total of 64 memory positions available on the eeprom. Considering the CM119B uses up 51 positions, that leaves us 13 memory positions.

There are some options here, but it seems that we need to move our data from starting at position 6 to position 51. This makes it work for all cmxxx devices. There is some pain here for the users, but seems necessary.

We could do something clever like looking at the CM chip type and trying to change the memory locations, but I think the best fix is to simply move the data to a new location. Existing users would simply have to write the data back to the eeprom.