AllStarLink / app_rpt

Refactoring and upgrade of AllStarLink's app_rpt, etc.
3 stars 2 forks source link

simpleusb-tune-menu is replacing empty devstr= with a device string #328

Open jxmx opened 1 month ago

jxmx commented 1 month ago

If /etc/asterisk/simpleusb.conf starts out with an empty devstr=, is it expected that simpleusb-tune-menu will will then populate devstr= with a fixed value? In testing the Pi image, I was running one type of radio board. I swapped it out for a different one and spent a few minutes trying to figure out why the sound card wasn't working right. The devstr= which started out from the stock/default empty changed from from 1-1.5:1-0 to 1-1.2:1.0 with the only thing that would have edited it was simpleusb-tune-menu. Editing /etc/asterisk/simpleusb.conf to clear out devstr= fixed it, but running simpleusb-tune-menu writes the device string right back to simpleusb.conf. I think this is a bug?

jxmx commented 1 month ago

@tsawyer @KB4MDD

tsawyer commented 1 month ago

running simpleusb-tune-menu writes the device string right back to simpleusb.conf. I think this is a bug?

I believe it's intended behavior to allow for additional USB devices. Maybe there needs to be an option to clear the devstr to allow auto discovery once again.

KB4MDD commented 1 month ago

The current operation is the original intended behavior. See issue #284 . Originally, the default configs contained a device string. That string would not work for all users. We changed the sample configs to have a blank device string. When the user plugs in the device, chan_simpleusb and chan_usbradio will recognize the blank device string and assign the first unused CM108 device.

The channel drivers, upon receiving a command to save the settings, writes out the current device string setting to the configuration file.

The device string really needs to be populated after setup. On a node with multiple devices, we need the string to associate the node with the correct device.

I agree with Tim - if a user is replacing a device and it is not recognized with the same device string, we would want some mechanism to reset the device string to blank for a given node. That would cause the internal device discovery mechanism to work.

jxmx commented 1 month ago

Sounds good.

tsawyer commented 1 month ago

@jxmx Sounds like a simple menu option. Do you want to leave it open for a next release... not this beta?