AllStarLink / asl3-menu

This repository contains the ASL3 menu system
GNU Affero General Public License v3.0
3 stars 0 forks source link

Error Adding SimpleUSB to Voter Node #30

Closed tsawyer closed 4 months ago

tsawyer commented 4 months ago

On a node with the first node having a Voter interface, then adding a SimpleUSB interface node, the Voter node number was placed in the SimpleUSB config file.

Allan-N commented 4 months ago

The default configuration files include [1999] in simpleusb.conf, usbradio.conf, and voter.conf. If you change the channel type then we update rpt.conf (rxchannel=) and, if needed, add the [node#] stanza to the channel's .conf.

In the case you described, you changed the first node from the [current] default "rxchannel=SimpleUSB/1999" to "rxchannel=Voter/1999". That would have left simpleusb.conf and voter.conf as-is (we don't remove the SimpleUSB node configuration unless/until you remove the node). In short, the SimpleUSB configuration for the now-voter node was there from the start.

Please let me know if you would like things to work differently.

tsawyer commented 4 months ago

In the case you described, you changed the first node from the [current] default "rxchannel=SimpleUSB/1999" to "rxchannel=Voter/1999".

Wouldn't the rxchannel would have become rxchannel = Voter/newNode?

That would have left simpleusb.conf and voter.conf as-is (we don't remove the SimpleUSB node configuration unless/until you remove the node).

We can't depend on the menu removing simpleUSB as manually edit might leave it. If simpleusb.conf is removed then what happens if a simpleUSB node is added later? I think you're going to have to scan the files to suss out what is there and modify as necessary. It might be necessary to have default configs somewhere in case the needed channel configuration is not in /etc/asterisk.

Allan-N commented 4 months ago

In the case you described, you changed the first node from the [current] default "rxchannel=SimpleUSB/1999" to "rxchannel=Voter/1999".

Wouldn't the rxchannel would have become rxchannel = Voter/newNode?

Yes/No. Changing the node # and the rxchannel would be done in 2 steps.

First, you change SimpleUSB node [1999] to newNode [2345]. This would update :

Then, you change node [2345] from SimpleUSB to Voter. This would update :

The configurations gets more interesting when you are adding a 2nd node. In those cases, the [1999] (or whatever node # you changed it to) will remain in the files. What differs for additional nodes is that we add new categories/stanzas to simpleusb.conf, usbradio.conf, etc.

That would have left simpleusb.conf and voter.conf as-is (we don't remove the SimpleUSB node configuration unless/until you remove the node).

We can't depend on the menu removing simpleUSB as manually edit might leave it. If simpleusb.conf is removed then what happens if a simpleUSB node is added later? I think you're going to have to scan the files to suss out what is there and modify as necessary. It might be necessary to have default configs somewhere in case the needed channel configuration is not in /etc/asterisk.

With templates there's little to worry about because removing a node has little effect on the configuration. If we are not using templates then, yes, the actions needed to add a node are more involved.

Happy to "talk" if more clarification is needed.

Allan-N commented 4 months ago

I added some changes to https://github.com/AllStarLink/asl3-menu/pull/28 that should make the described multi-node case "better" (with or without templates)