Skip to content

AIOC and AllStarLink with simple_usb Module #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Murf opened this issue Mar 2, 2024 · 84 comments
Open

AIOC and AllStarLink with simple_usb Module #61

Murf opened this issue Mar 2, 2024 · 84 comments

Comments

@Murf
Copy link

Murf commented Mar 2, 2024

More of a question than an Issue,
I am trying to get my AIOC working with a 'feng UV-5R for an AllStarLink node.
I recompiled the chan_simpleusb module with the correct vendor and product ID's, and was surprised when the PTT came on during the simpleusb-tune-menu utility option to flash the PTT.
I know I have a long way to go, especially with COR.
How is COR currently handled by default? is it a code sent on the serial port?
Thanks,
Murf.

@Murf
Copy link
Author

Murf commented Mar 2, 2024

Oh wow I just found the solution already, I was on the right track.
https://www.youtube.com/watch?v=dMoZEgm2ULo&ab_channel=chcmedia FYI

@skuep
Copy link
Owner

skuep commented Mar 2, 2024

Nice! So this is a first confirmed use for All-star link for me 🙂 Did you end up using the Virtual COS function of the AIOC?

@Murf
Copy link
Author

Murf commented Mar 2, 2024

Well I tried to do what they did in that video and did not get the same results.
I assume Virtual-COS is a serial code to watch for instead of a hardware line?
The problem with the AllStarLink usbradio module is it only looks at the soundcard, not the serial port, I have left a comment asking him how he does it.
Ideally I would want to be using serial and sound, like any normal ham radio application would :)
For that I will need to add code to the module to do that as well.
Murf.

@skuep
Copy link
Owner

skuep commented Mar 2, 2024

Virtual COS essentially listens to the audio from the radio and tries to determine if there is a carrier (squelch disengaged). Currently this is done using very simple thresholding.
It asserts the volume down (iirc) key of the cm108 emulation, no serial codes required.

@Murf
Copy link
Author

Murf commented Mar 2, 2024

Ah yes I saw that option in the ASL module code, cool I will see if I can get it to work!

@Murf
Copy link
Author

Murf commented Mar 2, 2024

Oh.. I think I should be using v 1.3 RC1 not 1.2, correct Simon?

@skuep
Copy link
Owner

skuep commented Mar 2, 2024

Ooops, you are correct! My bad. It looks like the COS feature was introduced in the v1.3 version.

@Shopstream204
Copy link

Murf, is it possible to share your modified version of Allstarlink? I would love to test it with my AOIC.

@Murf
Copy link
Author

Murf commented Mar 2, 2024 via email

@Murf
Copy link
Author

Murf commented Mar 2, 2024

Simon rather than rebuild v1.3 rc1 with the CM108 Vendor and product ID , here is the changes to the ASL asterisk module :
Murf/ASL-Asterisk@91b621e

Only chan_usbradio.c needs changes

@Murf
Copy link
Author

Murf commented Mar 2, 2024

Ok I see no difference with V1.3 :(

@Murf
Copy link
Author

Murf commented Mar 2, 2024

UPDATE: and facepalm... I was using a Quansheng UV-K6, and have now swapped to a 'feng UV-5R and am progressing.

@Murf
Copy link
Author

Murf commented Mar 2, 2024

And now OPERATIONAL :)
TL;DR
Use a Baofeng UV-5R, make sure you either 1) Set the Vendor/Product ID of the AIOC to 0d8c:000c OR Modify AllStarLink asterisk module chan_usbradio.c to use the normal AIOC IDs of 1209:7388.

@skuep
Copy link
Owner

skuep commented Mar 3, 2024

UPDATE: and facepalm... I was using a Quansheng UV-K6, and have now swapped to a 'feng UV-5R and am progressing.

What exactly didn't work? I think those should be very similar 🤔

And now OPERATIONAL :)

Nice! With virtual COS? Or are you using another way of detecting incoming voice?

Modify AllStarLink asterisk module chan_usbradio.c to use the normal AIOC IDs of 1209:7388.

Just curious, how did you do it? Using the python script? Note that the next time you use the script, you need to adjust the VID/PID to the new one, or it doesn't find the AIOC.

@Murf
Copy link
Author

Murf commented Mar 3, 2024

For the Quansheng, when I run the radio-tune-menu option "F" which is supposed to turn on PTT, emit a tone, then turn off PTT, which it does for the Baofeng UV-5R, but for the Quansheng UV-K6 the PTT stays on and never goes off, and no tone is emitted.

For the Vendor/Product ID detection I didnt use the script as I could not get it to run. Modifying the ASL chan_usbradio module itself to look for AIOC IDs rather than CM108 IDs is what I did.
So no serial port involved at all, just pure CM108 emulation.

For COS I didnt really do anything to the AllStarLink config other than what the Youtube I linked suggested, which is basically just set carrierfrom=VOX in usbradio.conf

May I ask, what exactly did you base the CM108 emulation on? Was it the PDF that ASL use for modifying the CM108 hardware?

@Shopstream204
Copy link

Has anyone been able to successfully use the script? I have tried on both a linux and windows machine and each time it fails.

@Murf
Copy link
Author

Murf commented Mar 10, 2024

Has anyone been able to successfully use the script? I have tried on both a linux and windows machine and each time it fails.

Which script?

@Shopstream204
Copy link

The script for v1.3 RC1 that allows the vid and pid to be changed

@Murf
Copy link
Author

Murf commented Mar 10, 2024

The script for v1.3 RC1 that allows the vid and pid to be changed

No I could not get it to run either, errors in the file.
I just recompiled chan_usbradio.c with correct IDs

@Shopstream204
Copy link

What all is involved in recompiling the file? Once the file is compiled is it as easy as placing the file on your existing Allstarlink install or do you need to do a complete reinstall of Allstarlink?

@Murf
Copy link
Author

Murf commented Mar 10, 2024

What all is involved in recompiling the file? Once the file is compiled is it as easy as placing the file on your existing Allstarlink install or do you need to do a complete reinstall of Allstarlink?

You will need to install build tools on the computer that you have ASL installed on, what OS is it? and distribution?
Then you will need to download the version of ASL you are using (for example I am using ASL V2 beta)
Once you can confirm you can build it (not install it) then edit the chan_usbradio.c file to make the changes, as shown above in previous posts.
then just copy the module "chan_usbradio.so" to /usr/lib/asterisk/modules/, and restart asterisk or reboot

@Shopstream204
Copy link

@Murf I am using the ASL Beta 2 ISO. I believe it's based on Debian 10.

@Murf
Copy link
Author

Murf commented Mar 18, 2024

@Murf I am using the ASL Beta 2 ISO. I believe it's based on Debian 10.

Perfect, thats what I am using.

@Hadgee
Copy link

Hadgee commented Mar 24, 2024

Hi, @Murf Brett,

Is the modified 'chan_usbradio.c' (chan_usbradio.so) file available?. I have been struggling and only running Raspberry Pi on Linux and would like to try it. I have no major knowledge but can get the file to the correct directory. I would love to get my AIOC working on AllStar. Thanks in advance, or more information (laymans terms) on how to do it.
Ellis

@Murf
Copy link
Author

Murf commented Mar 25, 2024 via email

@Hadgee
Copy link

Hadgee commented Mar 25, 2024

@Murf No problem. I will investigate further.

@Hadgee
Copy link

Hadgee commented Mar 30, 2024

@Murf
In the interest of my sanity....after losing far too many hours with permission errors and getting nowhere would it be possible to have a copy of your 'chan_usbradio.so' file as I believe it is only the equivalent of a library file.? I will try anything before assigning my AIOC cable to chirp and APRS and moving on from AllStarLink home repeater.
Yours Hopingly Ellis de M5AEI

@Murf
Copy link
Author

Murf commented Mar 30, 2024

@Murf In the interest of my sanity....after losing far too many hours with permission errors and getting nowhere would it be possible to have a copy of your 'chan_usbradio.so' file as I believe it is only the equivalent of a library file.? I will try anything before assigning my AIOC cable to chirp and APRS and moving on from AllStarLink home repeater. Yours Hopingly Ellis de M5AEI

Assuming you are using a Pi, here you go
chan_usbradio.zip
Also here:
https://archive.org/download/chan_usbradio/chan_usbradio.zip

@Hadgee
Copy link

Hadgee commented Mar 31, 2024

@Murf Thank you, yes Pi. I will let you know how it goes.

@Hadgee
Copy link

Hadgee commented Apr 1, 2024

@Murf
Thanks again. All good first contact through to Hubnet today. AIOC V1.3. Pi4 8gb running ASL 2.0Beta. I am using Baofeng UV-82.
I have a bit of tweaking but works a treat. :-)

@skuep
Copy link
Owner

skuep commented Apr 11, 2024

I had this issue and had to change the ID from another linux host (Intel nuc). Pi would not work.

Interestingly I have one Pi set up (v11 Bullseye) where this works consistently no problem, but all the new images I am trying won't work so there is a solution somewhere. @skuep any ideas?

Can you try running the script with sudo?

@skuep
Copy link
Owner

skuep commented Apr 11, 2024

I have used the simplusb settings following, and everything works except DTMF is not detected. carrierfrom = usbinvert ctcssfrom = no invertptt = 0

DTMF was working for me, but the virtual-cos was dropping between numbers so you have t send quickly. I tested with the Asterix CLI as in this vid: https://www.youtube.com/watch?v=iCZsMFrVJlM&t=1485s

Nice! I think the thresholding detector on the AIOC needs some tuning still. There are ways to manipulate the timeouts using the script as well, but I have not had time to define the registers for that yet.

@skuep
Copy link
Owner

skuep commented Apr 11, 2024

I have used the simplusb settings following, and everything works except DTMF is not detected. carrierfrom = usbinvert ctcssfrom = no invertptt = 0

Is invertptt = 0 special (different from default)? From what I can tell from e.g. https://allstarsetup.com/modify-a-cm108-sound-fob/ invertptt should have the same polarity on the AIOC.

What about carrierfrom=usbinvert? The AIOC sets the Volume UP or DOWN button (not sure) when the carrier is received. I think that is the other way around by default in ASL?

@G1LRO
Copy link

G1LRO commented Apr 11, 2024

I had this issue and had to change the ID from another linux host (Intel nuc). Pi would not work.

Interestingly I have one Pi set up (v11 Bullseye) where this works consistently no problem, but all the new images I am trying won't work so there is a solution somewhere. @skuep any ideas?

Can you try running the script with sudo?

everything is run Sudo.
this is relatively simple to reproduce by installing a fresh Raspbian bullseye and running the script.

@G1LRO
Copy link

G1LRO commented Apr 11, 2024

Nice! I think the thresholding detector on the AIOC needs some tuning still. There are ways to manipulate the timeouts using the script as well, but I have not had time to define the registers for that yet.

I think the COS overhang needs to be extended a bit as it does flap a bit between words. this causes a problem on ASL. So good news there's a register for it. I would go to say 600ms or so to start with.

@G1LRO
Copy link

G1LRO commented Apr 11, 2024

Hi @skuep please can you help with advice about an environment that will support the Python hid library functions? I've been struggling for days to get this to work on Rasbian Bullseye, since this is the OS that end users are likely to use (an an RPi 3 etc since they have it already for ASL). I'm running into one error after another.

I'm very happy to help where I can, as being able to run the script is essential for any user looking to take advantage of the v1.3 features.

Sorry to be a pain but it's difficult to find experts in this specialist area.

@Murf
Copy link
Author

Murf commented Apr 12, 2024

ng for me, but the virtual-cos was dropping between numbers so you have t send quickly

None of my DTMF codes show up at all.

@Hadgee
Copy link

Hadgee commented Apr 16, 2024

Hi all,
Just an update...I am successfully running a AIOC Cable AllStar node using Vox and USBradio on a Pi 4. My radio is Baofeng UV-82 and has battery eliminator. DTMF works fine using Quansheng K5 with regular connects and tests to HubNet. I've been delayed with the update due to an annoying noise issue. It turned out to be the monitor into the Pi, it is now sorted out and I have clear audio. Thanks again murf for the your file.
I may look at PTT control once its sorted out, at the moment it works perfect so no rush.....
73 Ellis M5AEI

@G1LRO
Copy link

G1LRO commented Apr 17, 2024

@Hadgee did you have any trouble running the python script to set the new USB ID's and using the HID drivers? I can't seem to get it to work on my Pi 3b.

@Hadgee
Copy link

Hadgee commented Apr 17, 2024

@G1LRO I only tried it once and it didn't work, also on a Pi 3b. I didn't want to mess with my ASL image on the Pi 4 as I had lost it once. So essentially using @Murf 's modified chan_usbradio.so file so no USB ID modification needed. The only issue I have had was the vox triggering and staying on tx which turned out to be very noisy monitor/HDMI lead. So quiet now its headless.

@skuep
Copy link
Owner

skuep commented Apr 21, 2024

I definitely need to test the script on a Raspberry Pi. Sounds odd to me, that it doesn't work. But currently I don't have a lot of spare time for this project, so it might take a while.

@G1LRO
Copy link

G1LRO commented Apr 21, 2024

Hi @skuep do you mind if I set up another issue for the HID on Pi problem? That way me may be able to call upon some specialist expertise on that specialist area, I think this item #61 is pretty much completed. I'd also like to log another issue to extend the virtual-COS overhang period.

@skuep
Copy link
Owner

skuep commented Apr 21, 2024

Hi @skuep do you mind if I set up another issue for the HID on Pi problem? That way me may be able to call upon some specialist expertise on that specialist area, I think this item #61 is pretty much completed. I'd also like to log another issue to extend the virtual-COS overhang period.

Yeah, b feel free to open those issues 👍

@G1LRO
Copy link

G1LRO commented May 4, 2024

I've provided a documented/scripted software download for the process of using
AIOC and AllStarLink (Simple_USB) on the Raspberry Pi so I think this issue can be closed @Murf .

https://g1lro.uk/?p=676

@Murf
Copy link
Author

Murf commented May 5, 2024

Thanks @G1LRO I was having a few problems getting ASL 2 beta to work properly, so i started from scratch with the HamVoip image and it literally worked out of the box.
Great work, @skuep lets close this.

@Murf
Copy link
Author

Murf commented May 5, 2024

Oops i spoke too early, I am getting no CTSS at all, tried all 3 settings:
ctcssfrom=no
ctcssfrom=usb
ctcssfrom=usbinvert

@G1LRO
Copy link

G1LRO commented May 5, 2024

@Murf I don't think you'll get CTCSS to work through the speaker port of the radio, it's all filtered out by then. CTCSS can be used on the receive settings of the radio to secure the channel, then the AIOC will just use it's virtual-COS when the RX audio arrives.

so set the ctcssfrom to no and rely on the squelch/ctcss settings on the radio.

I'm also getting reliable DTMF operation on the ASL.

@Murf
Copy link
Author

Murf commented May 6, 2024 via email

@skuep
Copy link
Owner

skuep commented May 6, 2024

I've provided a documented/scripted software download for the process of using AIOC and AllStarLink (Simple_USB) on the Raspberry Pi so I think this issue can be closed @Murf .

https://g1lro.uk/?p=676

Nice, I like it! Couple of suggestions:

  • The HID interface for configuring the AIOC might change in the future, due to some issues that we have with windows hosts. The 1.3.0 firmware is a preview firmware and things might break. Just a heads up
  • Did you modify the binary file to change the COS timeout? In that case I recommend to mark the firmware like so: aioc-firmware-1.3.0-rc.1-g1lro.bin and make it obvious to the user that you are using a "custom" firmware.

@skuep
Copy link
Owner

skuep commented May 6, 2024

Sorry i meant DTMF

I remembered thare are some issues with DTMF due to the default COS timeout being too low.. Not sure though, should be all in this issue here.

@G1LRO
Copy link

G1LRO commented May 6, 2024

I've provided a documented/scripted software download for the process of using AIOC and AllStarLink (Simple_USB) on the Raspberry Pi so I think this issue can be closed @Murf .
https://g1lro.uk/?p=676

Nice, I like it! Couple of suggestions:

  • The HID interface for configuring the AIOC might change in the future, due to some issues that we have with windows hosts. The 1.3.0 firmware is a preview firmware and things might break. Just a heads up
  • Did you modify the binary file to change the COS timeout? In that case I recommend to mark the firmware like so: aioc-firmware-1.3.0-rc.1-g1lro.bin and make it obvious to the user that you are using a "custom" firmware.

Hi Simon, I haven't modified your binary firmware, I've just supplied the Python scripts for the user to run with the extra parameter that will extend the COS. When the firmware goes to GA then I'll just change the link to the correct bin file, I think everything else will be OK.

If/when the HID mechanism is changed then I can update that process too. It's all fairly easily scripted, but for now I'm prescribing a Raspberry Pi image to do the updates as that's a stable machine environment.

For @Murf and the DTMF issues, I have not experienced any of these and use DTMF to join nodes on ASL etc, I can also see the DTMF properly reported in the Asterisk command-line console. I wonder if this is a problem with the sending device, I happy to pop a video across if that will help.

@Murf
Copy link
Author

Murf commented May 7, 2024

@G1LRO The node radio is a Baofeng UV-5R and the radio I am trying to DTMF to it from is a Quansheng UV-K6(8)

@Hadgee
Copy link

Hadgee commented May 7, 2024

@G1LRO The node radio is a Baofeng UV-5R and the radio I am trying to DTMF to it from is a Quansheng UV-K6(8)

@Murf It might not be your node. I have two Quansheng UV-K6(8) on different firmware. IJV and Egzumer. Only the Egzumer works with my node for DTMF. Try another firmware it might help.
73 Ellis M5AEI

@Murf
Copy link
Author

Murf commented May 7, 2024

@Hadgee I have tried multiple firmware, and even an Icom and a Yaesu handheld, same thing on all of them, just the occasional "*" is recognized, nothing else.

@G1LRO
Copy link

G1LRO commented May 7, 2024

ASL-DTMF.mp4

Hi @Murf , here is a video of a Boafeng sending DTMF to a Quansheng K5 connected via my Universal Radio Controller box (that includes the AIOC CPU).
The monitor is showing the ASL Asterisk CLI client receiving the DTMF and the action completing.
The K5 is running stock firmware.
The ASL is a fresh install, the only changes are the PTT and COS settings.
Not sure if this is very helpful to you exactly, other than to show you that it should work and to soldier-on.
73 Mark

@skuep
Copy link
Owner

skuep commented May 7, 2024

I've provided a documented/scripted software download for the process of using AIOC and AllStarLink (Simple_USB) on the Raspberry Pi so I think this issue can be closed @Murf .
https://g1lro.uk/?p=676

Nice, I like it! Couple of suggestions:

  • The HID interface for configuring the AIOC might change in the future, due to some issues that we have with windows hosts. The 1.3.0 firmware is a preview firmware and things might break. Just a heads up
  • Did you modify the binary file to change the COS timeout? In that case I recommend to mark the firmware like so: aioc-firmware-1.3.0-rc.1-g1lro.bin and make it obvious to the user that you are using a "custom" firmware.

Hi Simon, I haven't modified your binary firmware, I've just supplied the Python scripts for the user to run with the extra parameter that will extend the COS. When the firmware goes to GA then I'll just change the link to the correct bin file, I think everything else will be OK.

I see.. I was just thrown off by the following

Virtual-COS timer fix.
 
This section is not needed if you are running the installation after 4th May 2024 as the change is already in the software download.

If/when the HID mechanism is changed then I can update that process too. It's all fairly easily scripted, but for now I'm prescribing a Raspberry Pi image to do the updates as that's a stable machine environment.

That's a good choice in my opinion for now.

@skuep skuep mentioned this issue Sep 17, 2024
@skuep
Copy link
Owner

skuep commented Jan 4, 2025

@G1LRO Just wanted to give you a heads up regarding a new firmware release. From now on, the new HID interface will be used. It just has some minor protocol differences, the registers stayed the same (as far as I can remember). You might want to change your scripts to the new solution in order to avoid an influx of users having issues :-)

BTW, what was the COS timeout that you decided on for AllStarLink? I was thinking on making this value the new default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants