AllStarLink / asl3-asterisk

Building enviornment for the .deb packages of Asterisk LTS + ASL3/app_rpt.
GNU General Public License v2.0
2 stars 0 forks source link

ERROR[1127]: chan_simpleusb.c:843 hidthread: Channel usb_1999: Device string was not found. #15

Closed tsawyer closed 7 months ago

tsawyer commented 9 months ago

simpleUSB not working with debs. Running Asterisk in console mode asterisk -c as root or with systemctl gives same error. Also tested with renamed (disabled) udev rule when running as root to eliminate possibility of bad rule.

*CLI>     -- Loading initial config for repeater 1999
[2023-12-22 06:25:36.245] NOTICE[1119]: app_rpt.c:6026 rpt_master: Normal Repeater Init  1999
[2023-12-22 06:25:36.258] NOTICE[1126]: chan_simpleusb.c:2423 simpleusb_setoption: Channel usb_1999: Set option TONE VERIFY, mode: OFF(0).
[2023-12-22 06:25:36.439] ERROR[1127]: chan_simpleusb.c:843 hidthread: Channel usb_1999: Device string  was not found.

*CLI> core show version
Asterisk 20.5.1+asl3-0.1.0.c5f7031~deb12-1 built by builder @ allstarlink.org on a x86_64 running Linux on 2023-12-15 01:41:40 UTC
*CLI>
encbar5 commented 9 months ago

What device string are you using in etc/asterisk/simpleusb_tune_usb_1999.conf?

tsawyer commented 9 months ago

cat simpleusb_tune_usb_1999.conf

[usb_1999]
; name=usb_1999
; devicenum=1
devstr=1-1.4:1.0
rxmixerset=500
txmixaset=500
txmixbset=500
encbar5 commented 9 months ago

Does that string exist in /sys/bus/usb/devices/ ? If it doesn't exist, then it would seem the error is correct.

jxmx commented 8 months ago

I believe we decided this was a problem with susb tune

tsawyer commented 8 months ago

Had not seen the query from @encbar5 two weeks ago. How is

Bus 002 Device 005: ID 0d8c:0013 C-Media Electronics, Inc. USB Audio Device
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and

ll /sys/bus/usb/devices/
total 0
lrwxrwxrwx 1 root root 0 Jan  6 06:49 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:1a.0/usb1/1-0:1.0
lrwxrwxrwx 1 root root 0 Jan  6 06:49 1-1 -> ../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1
lrwxrwxrwx 1 root root 0 Jan  6 06:49 1-1:1.0 -> ../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-1 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-1.1 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-1:1.0 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-1.1:1.0 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-1.1:1.1 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.1
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-1.1:1.2 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.2
lrwxrwxrwx 1 root root 0 Jan  6 06:49 2-1.1:1.3 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.3
lrwxrwxrwx 1 root root 0 Jan  6 06:49 usb1 -> ../../../devices/pci0000:00/0000:00:1a.0/usb1
lrwxrwxrwx 1 root root 0 Jan  6 06:49 usb2 -> ../../../devices/pci0000:00/0000:00:1d.0/usb2

translated to a device string?

encbar5 commented 8 months ago

@tsawyer I think @jxmx pointed out that using 'lsusb -t' gives a tree that you can then use to trace out what the string should be. For example

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 3, If 0, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 3: Dev 3, If 1, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 3: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 3: Dev 3, If 3, Class=Human Interface Device, Driver=usbfs, 12M

So my audio device is on Bus 1, Port 1, Port 3, so my string is 1-1.3:1.0

I don't think the original issue of "simpleUSB not working with debs." is valid, because just like any other part of asterisk, you have to customize the config files for your particular system. There is no guarantee that everyone will plug their audio device into the same port on the same hub on every device, so I think it's expected that simpleusb_tune_usb_1999.conf has to be manually updated with the appropriate device string before it works.

tsawyer commented 8 months ago
lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 5, If 0, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 1: Dev 5, If 1, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 1: Dev 5, If 2, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 1: Dev 5, If 3, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

So my string should be 2-1.5:1.0? That's not working.

jxmx commented 8 months ago

Should be. See what this says: https://github.com/AllStarLink/ASL3/blob/develop/bin/asl-find-sound

encbar5 commented 8 months ago

@tsawyer It's actually BUS-PORT.PORT. So according to your output you need to use 2-1.1:1.0 2-1 is a hub, and your device says Port 1 on that hub. So you just add a .1 after. I'm not sure the :1.0 is even used but it didn't hurt. My output was coincidentally Port 3 Dev 3 but I don't think the Dev is used at all. Ignore your Dev 5. You just need to use the port numbers as far as my last research told me.

tsawyer commented 7 months ago

Jason's asl-find-sound script and a OSS fix on my system fixes this. Closing.