Topics

direwolf configuration file


John Spoonhower
 

I need some help with configuring direwolf. Let me start by saying that I have direwolf running well in receive mode on a raspberry pi 3 with udrc-II. The problem lies with the lack of audio on transmit. I am asking the setup to broadcast my setup with PBEACON on the radio. With some setup configurations I get the transmitter to key (PTT works!) but there is no audio (tones are not evident on a separate second radio). I have setup FLDIGI using the online installation notes and if I click "tune" in FLDIGI , the transmitter keys and I hear I nice tone. I can run measure_deviate.sh and also get the transmitter to key and generate a tone. Measure_deviate.sh is setup in the "stock" manner with gpio  set to gpio 12. FLDIGI setup is also "stock" with GPIO hardware control : BCM 23, GPIO 04, pin 16 selection. 

The direwolf.conf file looks like:
ADEVICE plughw:CARD=udrc,DEV=0
ARATE 48000
ACHANNELS 2
#DIN-6
CHANNEL 0
MYCALL NX2I-10
MODEM 1200i
PTT GPIO 23
#HD-15
# note channels set the same
CHANNEL 1
MYCALL NX2I-10
MODEM 1200
PTT GPIO 23
AGWPORT 8000
KISSPORT 8001
PBEACON delay=1 sendto=0 every=10 overlay=R symbol="igate" lat=28^52.69N long=82^$
#PBEACON delay=1 sendto=1 every=10 overlay=S symbol="digi" lat=17^51.00N long=102$
#DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE
#DIGIPEAT 1 1 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE
#DIGIPEAT 0 1 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE
#DIGIPEAT 1 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE
IGSERVER noam.aprs2.net
IGLOGIN NX2I 4083  #YOUR INTERNET LOGIN AND PASSCODE FOR APRS REPORTING
# Degrees Decimal minutes format for lat, long
PBEACON sendto=IG delay=0:30 every=30:00 symbol="igate" overlay=R lat=28^52.69386$
LOGDIR /home/pi/aprslogs
IGTXLIMIT 6 10
GPSD localhost
#IBEACON DELAY=30 EVERY=30 VIA=WIDE1-1

If I have PTT GPIO 23 set (like above) I see the transmitter key but there is no audio. If I set the GPIO in this file to 12, the transmitter does not key. Obviously I am doing something wrong, but none of this makes any sense to me.
73,
john, NX2I


Basil Gunn
 

Hey John,

Which UDRC do you have, original or II?
- look at the silk screen on the board or
- run udrcver.sh from here:
https://github.com/nwdigitalradio/n7nix/blob/master/systemd/bin/udrcver.sh

Which UDRC port are you using mDin6 or HD15?

Assuming you have a UDRC II
If you are using mDin6 then you will need to set up Direwolf channel 1
(Direwolf uses chan 0 & 1) and PTT will be active on GPIO 23.

If you are using the HD15 interface you will need to set up Direwolf
channel 0 and PTT will be active on GPIO 12.

From your config it looks like you have the Direwolf channels switched
around for mDin6 & HD15 interfaces.

/Basil n7nix


On Thu, 15 Feb 2018 09:14:56 -0800
"John Spoonhower" <jpspoonhower@...> wrote:

I need some help with configuring direwolf. Let me start by saying
that I have direwolf running well in receive mode on a raspberry pi 3
with udrc-II. The problem lies with the lack of audio on transmit. I
am asking the setup to broadcast my setup with PBEACON on the radio.
With some setup configurations I get the transmitter to key (PTT
works!) but there is no audio (tones are not evident on a separate
second radio). I have setup FLDIGI using the online installation
notes and if I click "tune" in FLDIGI , the transmitter keys and I
hear I nice tone. I can run measure_deviate.sh and also get the
transmitter to key and generate a tone. Measure_deviate.sh is setup
in the "stock" manner with gpio  set to gpio 12. FLDIGI setup is also
"stock" with GPIO hardware control : BCM 23, GPIO 04, pin 16
selection. 

The direwolf.conf file looks like:
ADEVICE plughw:CARD=udrc,DEV=0
ARATE 48000
ACHANNELS 2
#DIN-6
CHANNEL 0
MYCALL NX2I-10
MODEM 1200i
PTT GPIO 23
#HD-15
# note channels set the same
CHANNEL 1
MYCALL NX2I-10
MODEM 1200
PTT GPIO 23
AGWPORT 8000
KISSPORT 8001
PBEACON delay=1 sendto=0 every=10 overlay=R symbol="igate"
lat=28^52.69N long=82^$ #PBEACON delay=1 sendto=1 every=10 overlay=S
symbol="digi" lat=17^51.00N long=102$ #DIGIPEAT 0 0
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE #DIGIPEAT 1 1
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE #DIGIPEAT 0 1
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE #DIGIPEAT 1 0
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE IGSERVER noam.aprs2.net
IGLOGIN NX2I 4083  #YOUR INTERNET LOGIN AND PASSCODE FOR APRS
REPORTING # Degrees Decimal minutes format for lat, long
PBEACON sendto=IG delay=0:30 every=30:00 symbol="igate" overlay=R
lat=28^52.69386$ LOGDIR /home/pi/aprslogs
IGTXLIMIT 6 10
GPSD localhost
#IBEACON DELAY=30 EVERY=30 VIA=WIDE1-1

If I have PTT GPIO 23 set (like above) I see the transmitter key but
there is no audio. If I set the GPIO in this file to 12, the
transmitter does not key. Obviously I am doing something wrong, but
none of this makes any sense to me. 73, john, NX2I


Bernard f6bvp / ai7bg
 

Hi,
The main question is which plug are you using : din6 or hd15 ? And what kind of cable. I guess you use din6 for you have selected GPIO 23 for channel 1. If using din6 with a standard din6 cable you may need to use -n 1 parameter on Direwolf command line to get audio output. Careful you may need to change GPIO in case ptt does not work.
I suppose you have set correct audio level of PCM in alsamixer ?
LOR level is also important. I prefere to set it to 0 (null) to get a more clean audio output.
Did you notice spurious letter i after 1200 on your first MODEM 1200 line ?

73 de Bernard f6bvp

Le 15 févr. 2018 à 18:14, John Spoonhower <jpspoonhower@...> a écrit :

CHANNEL 0
MYCALL NX2I-10
MODEM 1200i
PTT GPIO 23


Basil Gunn
 

Also enable both channels in Direwolf with config, ADEVICE like
this:

ADEVICE plughw:CARD=udrc,DEV=0 plughw:CARD=udrc,DEV=0

looks like you only enabled one channel.

/Basil

Hey John,

Which UDRC do you have, original or II?
- look at the silk screen on the board or
- run udrcver.sh from here:
https://github.com/nwdigitalradio/n7nix/blob/master/systemd/bin/udrcver.sh

Which UDRC port are you using mDin6 or HD15?

Assuming you have a UDRC II
If you are using mDin6 then you will need to set up Direwolf channel 1
(Direwolf uses chan 0 & 1) and PTT will be active on GPIO 23.

If you are using the HD15 interface you will need to set up Direwolf
channel 0 and PTT will be active on GPIO 12.

From your config it looks like you have the Direwolf channels switched
around for mDin6 & HD15 interfaces.

/Basil n7nix


On Thu, 15 Feb 2018 09:14:56 -0800
"John Spoonhower" <jpspoonhower@...> wrote:

I need some help with configuring direwolf. Let me start by saying
that I have direwolf running well in receive mode on a raspberry pi
3 with udrc-II. The problem lies with the lack of audio on
transmit. I am asking the setup to broadcast my setup with PBEACON
on the radio. With some setup configurations I get the transmitter
to key (PTT works!) but there is no audio (tones are not evident on
a separate second radio). I have setup FLDIGI using the online
installation notes and if I click "tune" in FLDIGI , the
transmitter keys and I hear I nice tone. I can run
measure_deviate.sh and also get the transmitter to key and generate
a tone. Measure_deviate.sh is setup in the "stock" manner with
gpio  set to gpio 12. FLDIGI setup is also "stock" with GPIO
hardware control : BCM 23, GPIO 04, pin 16 selection. 

The direwolf.conf file looks like:
ADEVICE plughw:CARD=udrc,DEV=0
ARATE 48000
ACHANNELS 2
#DIN-6
CHANNEL 0
MYCALL NX2I-10
MODEM 1200i
PTT GPIO 23
#HD-15
# note channels set the same
CHANNEL 1
MYCALL NX2I-10
MODEM 1200
PTT GPIO 23
AGWPORT 8000
KISSPORT 8001
PBEACON delay=1 sendto=0 every=10 overlay=R symbol="igate"
lat=28^52.69N long=82^$ #PBEACON delay=1 sendto=1 every=10 overlay=S
symbol="digi" lat=17^51.00N long=102$ #DIGIPEAT 0 0
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE #DIGIPEAT 1 1
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE #DIGIPEAT 0 1
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE #DIGIPEAT 1 0
^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE IGSERVER
noam.aprs2.net IGLOGIN NX2I 4083  #YOUR INTERNET LOGIN AND PASSCODE
FOR APRS REPORTING # Degrees Decimal minutes format for lat, long
PBEACON sendto=IG delay=0:30 every=30:00 symbol="igate" overlay=R
lat=28^52.69386$ LOGDIR /home/pi/aprslogs
IGTXLIMIT 6 10
GPSD localhost
#IBEACON DELAY=30 EVERY=30 VIA=WIDE1-1

If I have PTT GPIO 23 set (like above) I see the transmitter key but
there is no audio. If I set the GPIO in this file to 12, the
transmitter does not key. Obviously I am doing something wrong, but
none of this makes any sense to me. 73, john, NX2I


 

Also look at your alsa output settings, the script should set them, but you can view them with alsamixer program.


John Spoonhower
 

Bernard,
thanks for the reply. The alsamixer levels are PCM, ADC, and LO Drive all set to 6 dB.
the spurious "i" after MODEM 1200 was not in the file, but a typo in the note I sent.
I have also boosted the input gain somewhat from the default in the FT-857; there are menu settings to control packet, 
mic, etc. gain for various inputs. What do you mean by LOR?
73, John, NX2I

On Thu, Feb 15, 2018 at 1:51 PM, f6bvp <f6bvp@...> wrote:
Hi,
The main question is which plug are you using : din6 or hd15 ? And what kind of cable. I guess you use din6 for you have selected GPIO 23 for channel 1.  If using din6 with a standard din6 cable you may need to use -n 1 parameter on Direwolf command line to get audio output. Careful you may need to change GPIO in case ptt does not work.
I suppose you have set correct  audio level of PCM in alsamixer ?
LOR level is also important. I prefere to set it to 0 (null) to get a more clean audio output.
Did you notice spurious letter i after 1200 on your first MODEM 1200 line ?

73 de Bernard f6bvp
> Le 15 févr. 2018 à 18:14, John Spoonhower <jpspoonhower@...> a écrit :
>
> CHANNEL 0
> MYCALL NX2I-10
> MODEM 1200i
> PTT GPIO 23






John Spoonhower
 

Bernard,
I am using the din 6 cable I purchased from the NW Digital radio web site.
73, NX2I


On Thu, Feb 15, 2018 at 1:51 PM, f6bvp <f6bvp@...> wrote:
Hi,
The main question is which plug are you using : din6 or hd15 ? And what kind of cable. I guess you use din6 for you have selected GPIO 23 for channel 1.  If using din6 with a standard din6 cable you may need to use -n 1 parameter on Direwolf command line to get audio output. Careful you may need to change GPIO in case ptt does not work.
I suppose you have set correct  audio level of PCM in alsamixer ?
LOR level is also important. I prefere to set it to 0 (null) to get a more clean audio output.
Did you notice spurious letter i after 1200 on your first MODEM 1200 line ?

73 de Bernard f6bvp
> Le 15 févr. 2018 à 18:14, John Spoonhower <jpspoonhower@...> a écrit :
>
> CHANNEL 0
> MYCALL NX2I-10
> MODEM 1200i
> PTT GPIO 23






Basil Gunn
 

Your PTT GPIO & cable connection comment is still wrong. Not your
fault, I believe the "UDRC and Direwolf Packet Modem" wiki is
incorrect.

Your config should be like this:

HD15 is on right audio channel, Direwolf chan 0
mDin6 is on left audio channel, Direwolf chan 1

ARATE 48000
ACHANNELS 2

#HD-15
CHANNEL 0
MYCALL NX2I-10
MODEM 1200
PTT GPIO 12

# DIN-6
CHANNEL 1
MYCALL NX2I-10
MODEM 1200
PTT GPIO 23

You are only concerned with the mDin6 connection so left audio
channel, Direwolf chan 1.

Verify using alsamixer that LOL Outp is not muted ie. shows 00 not MM.
Also verify 'LO Drive' is around 0 dB or less.

I use a script to display just ADC Level, LO Drive Gain & PCM to make
sure those are reasonable.

https://github.com/nwdigitalradio/n7nix/blob/master/debug/alsa-show.sh

Someone who has an Yaesu FT-857 should comment on what those values
should be. Sorry don't own any Yaesu's. John?

For my Kenwood I set the alsamixer settings like this:
'ADC Level' -2.0dB
'LO Driver Gain' 0dB
'PCM' 0.0dB

What is your source of the mDin6 cable? Hand made? or bought from?

/Basil

On Fri, 16 Feb 2018 10:52:37 -0500
John Spoonhower <jpspoonhower@...> wrote:

Basil, (and others...),
I have edited the direwolf.conf file as you suggested. The file now
looks like this:

ADEVICE plughw:CARD=udrc,DEV=0 plughw:CARD=udrc,DEV=0
ARATE 48000
ACHANNELS 2
#DIN-6
CHANNEL 0
MYCALL NX2I-10
MODEM 1200
# note PTT is set to "BCM" value ; same is in fldigi
PTT GPIO 23
#HD-15
# note channels set the same
CHANNEL 1
MYCALL NX2I-10
MODEM 1200
PTT GPIO 23


John Spoonhower
 

Basil,
I purchased the din 6 cable from the NW Digital Radio website at the same time I purchased the UDRC-II board. They arrived together.
Your suggestion for the direwolf.conf file does NOT key the radio. However, if I reverse the PTT GPIO settings between the 2 channels the radio does key (PTT activated). The relevant portion of my direwolf.conf file now looks like the following (with PTT working OK):

ADEVICE plughw:CARD=udrc,DEV=0 plughw:CARD=udrc,DEV=0
ARATE 48000
ACHANNELS 2
#HD-15
CHANNEL 0
MYCALL NX2I-10
MODEM 1200
PTT GPIO 23
#DIN-6
CHANNEL 1
MYCALL NX2I-10
MODEM 1200
PTT GPIO 12

Transmitter keys, still no audio when listening on a second radio 9a handheld).
I ran the alsa-show script; the results, after lowering the LO Drive level are:

./alsa-show.sh
PCM         L:[6.00dB], R:[6.00dB]
ADC Level L:[6.00dB], R:[6.00dB]
LO Driver Gain  L:[0.00dB], R:[0.00dB]

I can confirm that LO DAC, LOR output, and LOL output all show "00", i.e not muted.

For my own sanity, I confirmed that FLDIGI still works and indeed produces a nice tone when the "Tune" button is activated.

FLDIGI reports the following, BTW, when starting:

I: start_alert_thread: started audio alert thread
I: set_gpio: Set GPIO ptt on /sys/class/gpio/gpio23/value HIGH
I: set_gpio: Set GPIO ptt on /sys/class/gpio/gpio23/value LOW


On Fri, Feb 16, 2018 at 11:51 AM, Basil Gunn <basil@...> wrote:
Your PTT GPIO & cable connection comment is still wrong.  Not your
fault, I believe the "UDRC and Direwolf Packet Modem" wiki is
incorrect.

Your config should be like this:

 HD15  is on right audio channel, Direwolf chan 0
 mDin6 is on left audio channel,  Direwolf chan 1

ARATE 48000
ACHANNELS 2

#HD-15
CHANNEL 0
MYCALL NX2I-10
MODEM 1200
PTT GPIO 12

# DIN-6
CHANNEL 1
MYCALL NX2I-10
MODEM 1200
PTT GPIO 23

You are only concerned with the mDin6 connection so left audio
channel, Direwolf chan 1.

Verify using alsamixer that LOL Outp is not muted ie. shows 00 not MM.
Also verify 'LO Drive' is around 0 dB or less.

I use a script to display just ADC Level, LO Drive Gain & PCM to make
sure those are reasonable.

https://github.com/nwdigitalradio/n7nix/blob/master/debug/alsa-show.sh

Someone who has an Yaesu FT-857 should comment on what those values
should be.  Sorry don't own any Yaesu's. John?

For my Kenwood I set the alsamixer settings like this:
'ADC Level' -2.0dB
'LO Driver Gain' 0dB
'PCM' 0.0dB

What is your source of the mDin6 cable? Hand made? or bought from?

/Basil

On Fri, 16 Feb 2018 10:52:37 -0500
John Spoonhower <jpspoonhower@...> wrote:

> Basil, (and others...),
> I have edited the direwolf.conf file as you suggested. The file now
> looks like this:
>
> ADEVICE plughw:CARD=udrc,DEV=0 plughw:CARD=udrc,DEV=0
> ARATE 48000
> ACHANNELS 2
> #DIN-6
> CHANNEL 0
> MYCALL NX2I-10
> MODEM 1200
> # note PTT is set to "BCM" value ; same is in fldigi
> PTT GPIO 23

> #HD-15
> # note channels set the same
> CHANNEL 1
> MYCALL NX2I-10
> MODEM 1200
> PTT GPIO 23





Bernard f6bvp / ai7bg
 

Hi,
Did you try to run measure.deviate script and see if audio output is ok ? You may still have to edit the script in order to trigger PTT.

73 de Bernard f6bvp

Le 16 févr. 2018 à 19:54, John Spoonhower <jpspoonhower@...>


Bernard f6bvp / ai7bg
 

Hi,

Din6 plug looks like :


I guess you don’t have an oscilloscope to visualize electric audio signals. I suggest you connect an earphone wire into the left horizontal hole according to the figure and the other earphone wire to ground of RPi. Then you should be able to hear a tone when output is activated. Same with a male connector.

73 de Bernard f6bvp


Bernard f6bvp / ai7bg
 

Sorry picture did not follow on the list.

When din6 plug is oriented with vertical slot upward, the correct hole is the second one the left that is nearly horizontal.

73 de Bernard f6bvp

Le 16 févr. 2018 à 21:10, f6bvp <f6bvp@...> a écrit :

Hi,

Din6 plug looks like :


I guess you don’t have an oscilloscope to visualize electric audio signals. I suggest you connect an earphone wire into the left horizontal hole according to the figure and the other earphone wire to ground of RPi. Then you should be able to hear a tone when output is activated. Same with a male connector.

73 de Bernard f6bvp



<image1.jpeg>


Basil Gunn
 

Below is what you gave for your Position Beacon command. You are
trying to send out chan 0, that won't work. You need to set sendto=1
so that it uses the proper channel. You are using the mDin6 cable so
you must use channel 1.

PBEACON delay=1 sendto=0 every=10 overlay=R symbol="igate" lat=28^52.69N long=82^$
#PBEACON delay=1 sendto=1 every=10 overlay=S symbol="digi" lat=17^51.00N long=102$

Also set the PTT GPIO's back to the values I gave:

Chan 0 PTT GPIO 12
Chan 1 PTT GPIO 23


I purchased the din 6 cable from the NW Digital Radio website at the
same time I purchased the UDRC-II board. They arrived together.
Good

Your suggestion for the direwolf.conf file does NOT key the radio.
Because your PBEACON command is wrong.

However, if I reverse the PTT GPIO settings between the 2 channels
the radio does key (PTT activated).
Because PBEACON is trying to send out channel 0 PTT works but the
audio is going out the wrong port.

./alsa-show.sh
PCM L:[6.00dB], R:[6.00dB]
ADC Level L:[6.00dB], R:[6.00dB]
LO Driver Gain L:[0.00dB], R:[0.00dB]
PCM & ADC Level seem high but someone that has a working Yaesu radio
should chime in.

/Basil


John Spoonhower
 

Basil and Bernard,
all is well now. Thanks for the help. I will do a deviation test once I put together the necessary hardware.
again, 73, 
NX2I

On Fri, Feb 16, 2018 at 3:19 PM, Basil Gunn <basil@...> wrote:
Below is what you gave for your Position Beacon command. You are
trying to send out chan 0, that won't work. You need to set sendto=1
so that it uses the proper channel. You are using the mDin6 cable so
you must use channel 1.

PBEACON delay=1 sendto=0 every=10 overlay=R symbol="igate" lat=28^52.69N long=82^$
#PBEACON delay=1 sendto=1 every=10 overlay=S symbol="digi" lat=17^51.00N long=102$

Also set the PTT GPIO's back to the values I gave:

Chan 0 PTT GPIO 12
Chan 1 PTT GPIO 23


> I purchased the din 6 cable from the NW Digital Radio website at the
> same time I purchased the UDRC-II board. They arrived together.

Good

> Your suggestion for the direwolf.conf file does NOT key the radio.

Because your PBEACON command is wrong.

> However, if I reverse the PTT GPIO settings between the 2 channels
> the radio does key (PTT activated).

Because PBEACON is trying to send out channel 0 PTT works but the
audio is going out the wrong port.

> ./alsa-show.sh
> PCM         L:[6.00dB], R:[6.00dB]
> ADC Level L:[6.00dB], R:[6.00dB]
> LO Driver Gain  L:[0.00dB], R:[0.00dB]

PCM & ADC Level seem high but someone that has a working Yaesu radio
should chime in.

/Basil