Skip to content

AIOC and SVXLINK #86

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

Closed
F8ASB opened this issue Sep 11, 2024 · 4 comments
Closed

AIOC and SVXLINK #86

F8ASB opened this issue Sep 11, 2024 · 4 comments

Comments

@F8ASB
Copy link

F8ASB commented Sep 11, 2024

Hello all,

I'm trying AIOC with Svxlink repeater software,
AIOC is detected and audio level on alsamixer are available and /dev/hidraw0 is present on my Raspberry Pi.

For RX config is for a CM108 and SQUELCH(COS) detection on VOL_DW pin 48.
HID_DEVICE=/dev/hidraw0
HID_SQL_PIN=VOL_DN
SQL_DET=HIDRAW

For TX config:
PTT_TYPE=Hidraw
HID_DEVICE=/dev/hidraw0
HID_PTT_PIN=GPIO3

I have this error:
Wed Sep 11 10:04:09 2024: *** ERROR: unknown/unsupported sound chip detected...
Wed Sep 11 10:04:09 2024: *** ERROR: Squelch detector initialization failed for RX "Rx1"
Wed Sep 11 10:04:09 2024: *** ERROR: Could not initialize RX "Rx1"
Wed Sep 11 10:04:09 2024: *** ERROR: Could not initialize Logic object "SimplexLogic". Skipping...

Have you an idea to resolve this problem?

Maybe HID_SQL_PIN=VOL_DN isn't correct for AIOC.

@skuep
Copy link
Owner

skuep commented Sep 17, 2024

Hi!
I am not familiar with the software. From what I can tell, I would guess that the last 3 errors are a result of the first error. And the first error is probably related to the fact that SVXLINK checks VID/PID of the given hidraw device, to detect what driver it needs to use (e.g. CM108). It doesn't recognize the AIOC's own VID/PID although the AIOC would be compatible to the CM108 chipset.

Currently, there are two ways to solve this particular problem. Either use the preview release and a python script to configure the AIOC for a different VID/PID. However this does currently not work on Windows.
#46

The second way is to use the firmware of G1LRO, that has baked these changes into the firmware.
#61
https://g1lro.uk/?p=676

In both cases, the VID/PID pair of the AIOC is changed so that it looks (almost) like a genuine CM108 chip to the computer. So it comes with all the caveats that you can read in those issues.

@F8ASB
Copy link
Author

F8ASB commented Sep 18, 2024

Hi!,

Thanks for your reply.

I'll try and report back on this thread.

@tomaz1
Copy link

tomaz1 commented Dec 16, 2024

Hi,

I have AIOC on SvxLink, and I can confirm the solution from G1LRO works.
I have also tried aioc-fw-1.3.0-rc.2.bin and setting the VID and PID to "Bus 001 Device 006: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter" with the Python script provided in the release notes: write(aioc, Register.USBID, (0x0d8c << 0) | (0x000c << 16)) also works!

Thanks @F8ASB for the settings provided:

Rx settings:
HID_DEVICE=/dev/hidraw0
HID_SQL_PIN=VOL_DN
SQL_DET=HIDRAW

Tx settings:
PTT_TYPE=Hidraw
HID_DEVICE=/dev/hidraw0
HID_PTT_PIN=GPIO3

It works, but with both solutions, when the station stops transmitting, I get Rx triggered after approximately 500ms, and the signal (silence) lasts around 300ms. (Rx is sending a short silence to SvxLink, and the AIOC green light is brighter, indicating it is receiving something.)

Why is Rx getting triggered (immediately) after Tx?

My current, not-so-good workaround/solution is to have two Rx settings and use "Voter" where I can set VOTING_DELAY=600.

P.S.: SvxLink runs in userspace as the user "svxlink", so it needed permissions to use /dev/hidraw0, like this:

cat /etc/udev/rules.d/99-hidraw.rules
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev"
#Or if I would allow only (ID 0d8c:000c)
#KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="000c", MODE="0660", GROUP="plugdev"

sudo usermod -aG plugdev svxlink

sudo udevadm control --reload-rules
sudo udevadm trigger

Edit:
I'm happy with aioc-fw-1.3.0-rc.2.bin and this settings on SvxLin (and ModuleFRN):

[Rx1]
...
AUDIO_DEV=alsa:plughw:2
AUDIO_CHANNEL=0
HID_DEVICE=/dev/hidraw0
HID_SQL_PIN=VOL_DN
SQL_DET=HIDRAW
SQL_START_DELAY=500
SQL_HANGTIME=1500
SQL_DELAY=1500

[Tx1]
...
PTT_TYPE=SerialPin
PTT_PORT=/dev/ttyACM0
PTT_PIN=DTR!RTS
TIMEOUT=240
TX_DELAY=100

@skuep
Copy link
Owner

skuep commented Jan 4, 2025

I suspect you are using the VCOS for detecting incoming audio correct? From what I have heard about VCOS it tends to have issues with spurious activations. In current versions it will be possible to hardware a pin on the AIOC (e.g. unused PTT2) as input so you can tap a COS signal off the radio and connect it with the AIOC for this purpose.

For now I am closing this issue, but I thank you for sharing your experiences

@skuep skuep closed this as completed Jan 4, 2025
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

3 participants