sm0svx / svxlink

Advanced repeater system software with EchoLink support for Linux including a GUI, Qtel - the Qt EchoLink client
http://svxlink.org/
Other
441 stars 173 forks source link

Setting up a simple parrot server #596

Open WriteCodeEveryday opened 2 years ago

WriteCodeEveryday commented 2 years ago

I have a cheap C-Media USB adapter that I've connected to a device trying the following config.

[GLOBAL]

MODULE_PATH=/usr/lib/arm-linux-gnueabihf/svxlink

LOGIC_CORE_PATH=/usr/lib/arm-linux-gnueabihf/svxlink LOGICS=ParrotOverAudioLogic CFG_DIR=svxlink.d TIMESTAMP_FORMAT="%c" CARD_SAMPLE_RATE=48000

CARD_CHANNELS=1

LOCATION_INFO=LocationInfo

LINKS=LinkToR4

[ParrotOverAudioLogic] TYPE=Repeater RX=MicInput TX=HeadphoneOutput MODULES=ModuleParrot CALLSIGN=KO4YZK SHORT_IDENT_INTERVAL=10 LONG_IDENT_INTERVAL=60 EVENT_HANDLER=/usr/share/svxlink/events.tcl DEFAULT_LANG=en_US RGR_SOUND_DELAY=0 FX_GAIN_NORMAL=0 FX_GAIN_LOW=-12 IDLE_TIMEOUT=30 IDLE_SOUND_INTERVAL=3000

[MicInput] TYPE=Local AUDIO_DEV=alsa:plughw:1 AUDIO_CHANNEL=1 SQL_DET=VOX VOX_FILTER_DEPTH=100 VOX_THRESH=500 PEAK_METER=1

[HeadphoneOutput] TYPE=Local AUDIO_DEV=alsa:plughw:1 AUDIO_CHANNEL=0 PTT_TYPE=NONE TX_DELAY=500

Tried both AUDIO_CHANNEL 0 and AUDIO_CHANNEL 1 but it won't trigger the Parrot to work.

Sun Sep 4 06:52:05 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Loading RX "MicInput" Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Loading TX "HeadphoneOutput" Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Loading module "ModuleParrot" Sun Sep 4 06:52:05 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleParrot.so Sun Sep 4 06:52:05 2022: Module Parrot v1.1.1 starting... Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Event handler script successfully loaded. Sun Sep 4 06:52:35 2022: Sun Sep 4 06:52:35 2022: SIGTERM received. Shutting down application...

Changing the AUDIO_CHANNEL beyond 1 is no good.

Using configuration file: /etc/svxlink/svxlink.conf Sun Sep 4 06:50:35 2022: --- Using sample rate 48000Hz Sun Sep 4 06:50:35 2022: Sun Sep 4 06:50:35 2022: Starting logic: ParrotOverAudioLogic Sun Sep 4 06:50:35 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 06:50:35 2022: ParrotOverAudioLogic: Loading RX "MicInput" Sun Sep 4 06:50:35 2022: ERROR: Audio channel out of range when opening audio device "plughw:1. The card have 2 channel(s) configured, but (zero based) channel number 2 was requested. Sun Sep 4 06:50:35 2022: ERROR: Could not open audio device for receiver "MicInput" Sun Sep 4 06:50:35 2022: ERROR: Could not initialize RX "MicInput" Sun Sep 4 06:50:35 2022: ERROR: Could not load or initialize Logic object "ParrotOverAudioLogic". Skipping... Sun Sep 4 06:50:35 2022: *** ERROR: No logics available. Bailing out...

I don't know how I did but it worked once (haven't changed SQL)... and I can't make it work again...

Sun Sep 4 06:40:17 2022: Starting logic: ParrotOverAudioLogic Sun Sep 4 06:40:17 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Loading RX "HeadphoneInput" Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Loading TX "MicOutput" Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Loading module "ModuleParrot" Sun Sep 4 06:40:17 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleParrot.so Sun Sep 4 06:40:17 2022: Module Parrot v1.1.1 starting... Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Event handler script successfully loaded. Sun Sep 4 06:40:26 2022: HeadphoneInput: The squelch is OPEN (513) Sun Sep 4 06:40:26 2022: HeadphoneInput: The squelch is CLOSED (445) Sun Sep 4 06:40:33 2022: HeadphoneInput: The squelch is OPEN (504) Sun Sep 4 06:40:33 2022: HeadphoneInput: The squelch is CLOSED (422)

I know it's a dumb request but can someone tell me what I'm doing wrong.

f5vmr commented 2 years ago

From my perspective I see that CARD_CHANNELS=1 must be uncommented. Then check with aplay -l what the usb sound card number is exactly. It will be either 0 or 1 depending on whether you have blacklisted the on board sound device. On the earlier models of the cm108 both poles of the microphone socket were connected together, but the later models are true stereo microphone inputs. If you are using the tips of the plugs then you should use 0 or the band you use 1. Finally to use the name you have selected for the logic, you need a corresponding name in the /use/share/svxlink/events.d/local folder that not only matches the name xxxxxx.tcl but the name of the logic to be edited inside the first lines in the logic.

I have not read the log files you have displayed as they are not easily readable in the form they appear. If you run the app from a service then sudo system restart svxlink | tail -f /var/log/svxlink (or .log) if you modified the /etc/default/svxlink file.

Finally to initiate the logic you will still need to issue a carrier with dtmf 1# unless you modify the Start up to do it. You can force the logic to start up but I can't reference it here.

Chris G4nab

On Sun, 4 Sep 2022, 07:02 Lazaro Herrera, @.***> wrote:

I have a cheap C-Media USB adapter that I've connected to a device trying the following config.

`[GLOBAL]

MODULE_PATH=/usr/lib/arm-linux-gnueabihf/svxlink

LOGIC_CORE_PATH=/usr/lib/arm-linux-gnueabihf/svxlink LOGICS=ParrotOverAudioLogic CFG_DIR=svxlink.d TIMESTAMP_FORMAT="%c" CARD_SAMPLE_RATE=48000

CARD_CHANNELS=1

LOCATION_INFO=LocationInfo

LINKS=LinkToR4

[ParrotOverAudioLogic] TYPE=Repeater RX=MicInput TX=HeadphoneOutput MODULES=ModuleParrot CALLSIGN=KO4YZK SHORT_IDENT_INTERVAL=10 LONG_IDENT_INTERVAL=60 EVENT_HANDLER=/usr/share/svxlink/events.tcl DEFAULT_LANG=en_US RGR_SOUND_DELAY=0 FX_GAIN_NORMAL=0 FX_GAIN_LOW=-12 IDLE_TIMEOUT=30 IDLE_SOUND_INTERVAL=3000

[MicInput] TYPE=Local AUDIO_DEV=alsa:plughw:1 AUDIO_CHANNEL=1 SQL_DET=VOX VOX_FILTER_DEPTH=100 VOX_THRESH=500 PEAK_METER=1

[HeadphoneOutput] TYPE=Local AUDIO_DEV=alsa:plughw:1 AUDIO_CHANNEL=0 PTT_TYPE=NONE TX_DELAY=500 `

Tried both AUDIO_CHANNEL 0 and AUDIO_CHANNEL 1 but it won't trigger the Parrot to work.

Sun Sep 4 06:52:05 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Loading RX "MicInput" Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Loading TX "HeadphoneOutput" Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Loading module "ModuleParrot" Sun Sep 4 06:52:05 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleParrot.so Sun Sep 4 06:52:05 2022: Module Parrot v1.1.1 starting... Sun Sep 4 06:52:05 2022: ParrotOverAudioLogic: Event handler script successfully loaded. Sun Sep 4 06:52:35 2022: Sun Sep 4 06:52:35 2022: SIGTERM received. Shutting down application...

Changing the AUDIO_CHANNEL beyond 1 is no good.

Using configuration file: /etc/svxlink/svxlink.conf Sun Sep 4 06:50:35 2022: --- Using sample rate 48000Hz Sun Sep 4 06:50:35 2022: Sun Sep 4 06:50:35 2022: Starting logic: ParrotOverAudioLogic Sun Sep 4 06:50:35 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 06:50:35 2022: ParrotOverAudioLogic: Loading RX "MicInput" Sun Sep 4 06:50:35 2022: ERROR: Audio channel out of range when opening audio device "plughw:1. The card have 2 channel(s) configured, but (zero based) channel number 2 was requested. Sun Sep 4 06:50:35 2022: ERROR: Could not open audio device for receiver "MicInput" Sun Sep 4 06:50:35 2022: ERROR: Could not initialize RX "MicInput" Sun Sep 4 06:50:35 2022: ERROR: Could not load or initialize Logic object "ParrotOverAudioLogic". Skipping... Sun Sep 4 06:50:35 2022: *** ERROR: No logics available. Bailing out...

I don't know how I did but it worked once... and I can't make it work again...

Sun Sep 4 06:40:17 2022: Starting logic: ParrotOverAudioLogic Sun Sep 4 06:40:17 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Loading RX "HeadphoneInput" Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Loading TX "MicOutput" Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Loading module "ModuleParrot" Sun Sep 4 06:40:17 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleParrot.so Sun Sep 4 06:40:17 2022: Module Parrot v1.1.1 starting... Sun Sep 4 06:40:17 2022: ParrotOverAudioLogic: Event handler script successfully loaded. Sun Sep 4 06:40:26 2022: HeadphoneInput: The squelch is OPEN (513) Sun Sep 4 06:40:26 2022: HeadphoneInput: The squelch is CLOSED (445) Sun Sep 4 06:40:33 2022: HeadphoneInput: The squelch is OPEN (504) Sun Sep 4 06:40:33 2022: HeadphoneInput: The squelch is CLOSED (422) Sun Sep 4 06:41:10 2022:

I know it's a dumb request but can someone tell me what I'm doing wrong.

— Reply to this email directly, view it on GitHub https://github.com/sm0svx/svxlink/issues/596, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAKA5EFMUKGP7J635JM3DTV4Q3Q3ANCNFSM6AAAAAAQEF3ZQM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

WriteCodeEveryday commented 2 years ago

Okay, I'll try the card channels, I just need this to parrot the input back to the headphones.

WriteCodeEveryday commented 2 years ago

Yep, starts up successfully now

Sun Sep 4 20:45:15 2022: Starting logic: ParrotOverAudioLogic Sun Sep 4 20:45:15 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 20:45:15 2022: ParrotOverAudioLogic: Loading RX "MicInput" Sun Sep 4 20:45:15 2022: ParrotOverAudioLogic: Loading TX "HeadphoneOutput" Sun Sep 4 20:45:15 2022: ParrotOverAudioLogic: Loading module "ModuleParrot" Sun Sep 4 20:45:15 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleParrot.so Sun Sep 4 20:45:15 2022: Module Parrot v1.1.1 starting... Sun Sep 4 20:45:15 2022: ParrotOverAudioLogic: Event handler script successfully loaded. Sun Sep 4 20:45:18 2022Sun Sep 4 20:45:18 2022: : MicInput: The squelch is OPEN (101) MicInput: The squelch is OPEN (101) Sun Sep 4 20:45:18 2022Sun Sep 4 20:45:18 2022: : MicInput: The squelch is CLOSED (98) MicInput: The squelch is CLOSED (98) Sun Sep 4 20:45:19 2022Sun Sep 4 20:45:19 2022: : MicInput: The squelch is OPEN (107) MicInput: The squelch is OPEN (107) Sun Sep 4 20:45:19 2022Sun Sep 4 20:45:19 2022: : MicInput: The squelch is CLOSED (87) MicInput: The squelch is CLOSED (87) Sun Sep 4 20:45:19 2022Sun Sep 4 20:45:19 2022: : MicInput: The squelch is OPEN (144) MicInput: The squelch is OPEN (144) Sun Sep 4 20:45:20 2022Sun Sep 4 20:45:20 2022: : MicInput: The squelch is CLOSED (85) MicInput: The squelch is CLOSED (85) Sun Sep 4 20:45:25 2022Sun Sep 4 20:45:25 2022: : MicInput: The squelch is OPEN (108) MicInput: The squelch is OPEN (108) Sun Sep 4 20:45:25 2022Sun Sep 4 20:45:25 2022: : MicInput: The squelch is CLOSED (91) MicInput: The squelch is CLOSED (91) Sun Sep 4 20:45:25 2022Sun Sep 4 20:45:25 2022: : MicInput: The squelch is OPEN (112) MicInput: The squelch is OPEN (112) Sun Sep 4 20:45:25 2022Sun Sep 4 20:45:25 2022: : MicInput: The squelch is CLOSED (92) MicInput: The squelch is CLOSED (92) Sun Sep 4 20:45:27 2022Sun Sep 4 20:45:27 2022: : MicInput: The squelch is OPEN (107) MicInput: The squelch is OPEN (107) Sun Sep 4 20:45:27 2022Sun Sep 4 20:45:27 2022: : MicInput: The squelch is CLOSED (94) MicInput: The squelch is CLOSED (94) Sun Sep 4 20:45:27 2022Sun Sep 4 20:45:27 2022: : MicInput: The squelch is OPEN (103) MicInput: The squelch is OPEN (103) Sun Sep 4 20:45:27 2022Sun Sep 4 20:45:27 2022: : MicInput: The squelch is CLOSED (96) MicInput: The squelch is CLOSED (96) Sun Sep 4 20:45:28 2022Sun Sep 4 20:45:28 2022: : MicInput: The squelch is OPEN (140) MicInput: The squelch is OPEN (140) Sun Sep 4 20:45:28 2022Sun Sep 4 20:45:28 2022: : MicInput: The squelch is CLOSED (48) MicInput: The squelch is CLOSED (48) Sun Sep 4 20:45:34 2022Sun Sep 4 20:45:34 2022: : MicInput: The squelch is OPEN (137) MicInput: The squelch is OPEN (137) Sun Sep 4 20:45:34 2022Sun Sep 4 20:45:34 2022: : MicInput: The squelch is CLOSED (22) MicInput: The squelch is CLOSED (22)

I still don't have the input from the mic being sent to the headphones, but it works great now.

f5vmr commented 2 years ago

You might want to consider creating a loopback dummy sound card. This will feed back input to output directly. I use this function to echo output of a repeater to a streaming web page using Darkice and Icecast. Chris

On Sun, 4 Sep 2022, 20:37 Lazaro Herrera, @.***> wrote:

Yep, starts up successfully now

Sun Sep 4 20:35:24 2022: Starting logic: ParrotOverAudioLogic Sun Sep 4 20:35:24 2022: Found plugin: /usr/lib/arm-linux-gnueabihf/svxlink/RepeaterLogic.so Sun Sep 4 20:35:24 2022: ParrotOverAudioLogic: Loading RX "MicInput" Sun Sep 4 20:35:24 2022: ParrotOverAudioLogic: Loading TX "HeadphoneOutput" Sun Sep 4 20:35:24 2022: ParrotOverAudioLogic: Loading module "ModuleParrot" Sun Sep 4 20:35:24 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleParrot.so Sun Sep 4 20:35:24 2022: Module Parrot v1.1.1 starting... Sun Sep 4 20:35:24 2022: ParrotOverAudioLogic: Event handler script successfully loaded.

@f5vmr https://github.com/f5vmr, is there a way to figure out what channel belongs to headphones or mic? I just want the mic input to be parroted back to the headphone input. My alsa device is correctly configured as the default ignoring the device default.

— Reply to this email directly, view it on GitHub https://github.com/sm0svx/svxlink/issues/596#issuecomment-1236402311, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAKA5GN7UCB2DHODWROHM3V4T275ANCNFSM6AAAAAAQEF3ZQM . You are receiving this because you were mentioned.Message ID: @.***>

WriteCodeEveryday commented 2 years ago

@f5vmr Unfortunately that's not gonna work, I want Parrot after squelch is complete....

This is gonna be hooked up to HAM radio so I need the TX to occur after RX but overall this is doing exactly what I need... headphone output actually gives me my ident correctly, it's just that the mic input isn't played back over the headphone output.

WriteCodeEveryday commented 2 years ago

Looking at this again, I'm finding that I need +48db PREAMP just to get the VOX to open up on my radio for short ident.