¿ªÔÆÌåÓý

Date

Re: More verbose command line options with getopt_long?

 

Enthusiastic +1
--
73 de k1jbd
bammi


More verbose command line options with getopt_long?

 

Hi all,

What's the appetite for me submitting a GitHub PR to use getopt_long to allow longer more verbose command line options?

I would love to be able to glance at a DireWolf invocation and have a good idea of what it's doing. But right now e.g. unpicking `direwolf -c hf-packet.conf -t 0 -a 300 -X 1 -q d -p -dp -dx` requires a careful eye and repeated reference to the documentation

Using getopt_long () could instead enable that to be `direwolf --config hf-packet.conf --text 0 --audio-report 300 --enable-fx25 --disable-aprs --ptty-kiss --debug-packet-dump --debug-fx25` - yes, longer, but significantly more explicit, which is valuable when looking at it in a service file, wrapper script, or even just while iterating on running it in a shell

But right now DireWolf does its own argument parsing, making this a nontrivial extension

Before I go to the effort of trying to port it to use getopt, and then extend it with getopt_long to enable longer more verbose arguments, I'd like to get a sense-check on the appetite for this please. If there's platform issues I'd not considered, other objection to adding the dependency etc., or even just a general dislike for longopts, I'd definitely appreciate finding out before I spend more time on it!

Thanks, Kristian 2E0KGG


Re: Newby question for console time stamping / logging #linux

 

John,
If running DW in Windows, how do I add the??-T "%H:%M:%S" to the Desktop Shortcut to get time stamping in the console? My Shortcut Target is?"C:\HAM RADIO\direwolf-1.7.0-7fa91dd_i686\direwolf.exe" -T "%H:%M:%S" which started DW but did not add the time stamps to the console.?

Randy
N1VTT


Documentation source files (rather than PDF)?

 

Greetings,

If someone wanted to help out with documentation fixes/improvements for Direwolf (considering as of today, there are 22 open issues that have something to do with documentation), how would they go about doing that? The only files I can see present in the repo are PDF format, and are not particularly editable.

I'm curious if there are documentation source files that can be added to the repo so that changes can be proposed and PR's issued for those fixes, or if there's a branch I'm not seeing that contains them.

Thanks,

--R
--
Randy Hall AA6RH (not K7AGE, quit asking) ?


Re: Wiring schematic needed: Easy Digi to TK708 trigger via PTT

 

I'm NOT a fan of leaving an open collector output, so the 27K takes care of that AND ensures the transistor switches properly. The PTT may NOT require the pull-up externally, and if YOU feel it is unnecessary, please feel free to NOT use it, especially if you know more about electronics than I do. The circuit I supplied was not etched into a stone tablet or given to me by Moses, it does, however work for me.

On Sat, Apr 8, 2023 at 8:20?PM Nandakishore AV VU3UBN <vu3ubn@...> wrote:
Hi all,

Delayed getting back to the group on the progress. Got busy with other priorities.

Thanks for the information.? Did wire up the radio and RPi along with the easy-digi as per the open-repeater project. I am able to receive and send packets.

Thanks,
Nandu VU3UBN?
Get

From: [email protected] <[email protected]> on behalf of Rob Giuliano via <kb8rco=[email protected]>
Sent: Friday, February 24, 2023 9:34:47 PM
To: [email protected] <[email protected]>
Subject: Re: [direwolf] Wiring schematic needed: Easy Digi to TK708 trigger via PTT
?
Sorry, I was not as concerned about the common grounds.? Not sure why I started the comment with that - it was just an observation.
I understand the purpose, just seems strange to use "isolation" then connect things together so they are not isolated.
The radio manual diagram shows the Mic input to be more isolated (Mic High and Mic Low), but the sound card is NOT.
If the interface had true isolation transformers that broke out AudioOut_HI and AudioOut_Low (for each audio channel) the Mic Low pin would be of more interest.

I meant to comment on the 12V through the 27k resistor on the PTT.? I have not worked with any radio that required the PTT line be pulled-up by the attached device (externally).? No radio I have used for digital work required this kind of wiring.? Almost all the radios I have the PTT pulled up inside the radio.? So adding external voltage (if not matched to the internal) could be a problem.? Any radio that wasn't internally pulled up required the PTT be pulled high for TX.

BUT ... I have not worked with the TK708 or TK705.?
-------
Rob KB8RCO


Re: Wiring schematic needed: Easy Digi to TK708 trigger via PTT

 

¿ªÔÆÌåÓý

Hi all,

Delayed getting back to the group on the progress. Got busy with other priorities.

Thanks for the information.? Did wire up the radio and RPi along with the easy-digi as per the open-repeater project. I am able to receive and send packets.

Thanks,
Nandu VU3UBN?
Get


From: [email protected] <[email protected]> on behalf of Rob Giuliano via groups.io <kb8rco@...>
Sent: Friday, February 24, 2023 9:34:47 PM
To: [email protected] <[email protected]>
Subject: Re: [direwolf] Wiring schematic needed: Easy Digi to TK708 trigger via PTT
?
Sorry, I was not as concerned about the common grounds.? Not sure why I started the comment with that - it was just an observation.
I understand the purpose, just seems strange to use "isolation" then connect things together so they are not isolated.
The radio manual diagram shows the Mic input to be more isolated (Mic High and Mic Low), but the sound card is NOT.
If the interface had true isolation transformers that broke out AudioOut_HI and AudioOut_Low (for each audio channel) the Mic Low pin would be of more interest.

I meant to comment on the 12V through the 27k resistor on the PTT.? I have not worked with any radio that required the PTT line be pulled-up by the attached device (externally).? No radio I have used for digital work required this kind of wiring.? Almost all the radios I have the PTT pulled up inside the radio.? So adding external voltage (if not matched to the internal) could be a problem.? Any radio that wasn't internally pulled up required the PTT be pulled high for TX.

BUT ... I have not worked with the TK708 or TK705.?
-------
Rob KB8RCO


Re: Direwolf crashes and exits

Phil Shields
 

Thanks David, i'll try putting ferrite rings on the audio leads into the USB sound dongle. I'll explore starting direwolf from the command line also.?
Thankks for your help.
Phil VK2CPR


Re: How to use Direwolf with multiple clients and multiple radios?

 

I'm a little late to the info party, but I was told a while ago that you can only have one AGWPORT and it's only assigned to channel 0.

But you can have multiple KISSPORTS and have them assigned to their respective channels.


Re: Direwolf crashes and exits

 

@Gil Rand
Wow, that was so helpful, sir. Thanks for the insight.


--
= = = =

? Kevin? --? KD9EFV


Re: Direwolf crashes and exits

 

My guess would be the high reliability operating system being the problem.

On Sat, Apr 8, 2023 at 8:18?AM David Ranch <direwolf-groupsio@...> wrote:

Hello Phil,

Hi all, my direwolf is on Windoze 7 and works fine for weeks. It then crashes and exits at random. I have looked for logs but can't find any. There is plenty of information about Linux but not much for Windoze.?
I looked at the config file but couldn't see anything about log directories I may be able to make.

You didn't provide any details about your setup but if I was to guess, I would say it could be RFI getting into the USB sound system and removing the USB-connected sound card.? As for logging, that can happen two ways.? When you start direwolf from a cmd window, it will start sending log text into that window.? Maybe you're starting Direwolf from batch file and once Direwolf exits, it closes the window box?? IF that's what you're doing, consider some of these ideas:?


The other approach is starting Direwolf with logging to file enabled:
--
?????? -l logdir
????????????? Generate daily log files in specified directory.? Use "." for current directory.

?????? -L logfile
????????????? Generate single log file with fixed name.
--

--David
KI6ZHD


Re: Running DW from a Service

 

All,

? I've made tons of progress these past few days.? I think I've finally got it.? I'm not afraid to admit, I used ChatGPT extensively these past few days.? I realize you have to ask very specific with the Q&A.? But this is what I have so far:

dw.service looks like this:

[Unit]
Description=Direwolf
After=sound.target
?
[Service]
Type=forking
WorkingDirectory=/home/dp27
User=dp27
Group=dp27
ExecStartPre=+systemctl stop vac
ExecStart=/usr/bin/screen -S dw -d -m /usr/local/bin/direwolf -c direwolf.conf -p -X 1
SyslogIdentifier=Direwolf
Restart=always
?
[Install]
WantedBy=multi-user.target

The trick that worked was adding the "Restart=always" statement.

Then I got brave/froggy and wanted to get KISS parameters running under a service as well.? After hitting my head against the computer screen, this finally works:

kiss.service looks like this:

[Unit]
Description=KISS Interface Configuration
After=network.target dw.service
Requires=dw.service
?
[Service]
Type=simple
User=dp27
Group=dp27
ExecStart=/bin/bash -c "/usr/local/bin/gw-start.sh"
?
[Install]
WantedBy=multi-user.target

And gw-start.sh looks like this:

#!/bin/bash
while [ ! -e /tmp/kisstnc ]
do
? ? sleep 1
done
?
LINK=$(ls -l /tmp/kisstnc | awk '{print $NF}')
sudo /usr/sbin/kissattach -l $LINK 1
?
if grep -q "^ax25 " /proc/modules; then
? ? sudo /usr/sbin/kissparms -c 1 -p 1 /dev/ax25/1
else
? ? echo "No AX.25 ports configured"
fi


Next on the list is to try the service the?Ray VK2TV suggested above and to get LinBPQ to also run as a service.

For those who want to brave these configurations.? I'm running it on a RPi 4 2G running Buster 32-bit.? DW is 1.7F.? Radio is an IC-7100 being keyed with RIGCTL.


Re: Direwolf crashes and exits

 

¿ªÔÆÌåÓý


Hello Phil,

Hi all, my direwolf is on Windoze 7 and works fine for weeks. It then crashes and exits at random. I have looked for logs but can't find any. There is plenty of information about Linux but not much for Windoze.?
I looked at the config file but couldn't see anything about log directories I may be able to make.

You didn't provide any details about your setup but if I was to guess, I would say it could be RFI getting into the USB sound system and removing the USB-connected sound card.? As for logging, that can happen two ways.? When you start direwolf from a cmd window, it will start sending log text into that window.? Maybe you're starting Direwolf from batch file and once Direwolf exits, it closes the window box?? IF that's what you're doing, consider some of these ideas:?


The other approach is starting Direwolf with logging to file enabled:
--
?????? -l logdir
????????????? Generate daily log files in specified directory.? Use "." for current directory.

?????? -L logfile
????????????? Generate single log file with fixed name.
--

--David
KI6ZHD


Direwolf crashes and exits

Phil Shields
 

Hi all, my direwolf is on Windoze 7 and works fine for weeks. It then crashes and exits at random. I have looked for logs but can't find any. There is plenty of information about Linux but not much for Windoze.?
I looked at the config file but couldn't see anything about log directories I may be able to make.
Thanks,
Phil VK2CPR


Re: How to use Direwolf with multiple clients and multiple radios?

 
Edited

Thank you all.? I did get it to work with direwolf 1.7 and help from the code's author John.
I commented out the AWGports because I am not using them.??

my conf file is:
#HF
ADEVICE? plughw:4,0
?
ACHANNELS 1

#VHF
ADEVICE1? plughw:1,0
?
ACHANNELS 1

?
CHANNEL 0
?
MYCALL KC3SMW-7
?
MODEM 300
#MODEM 9600
PTT /dev/serial/by-id/usb-Silicon_Labs_CP2105_Dual_USB_to_UART_Bridge_Controller_0111E470-if01-port0 RTS

?
CHANNEL 2
?
MYCALL KC3SMW-7
MODEM 1200
#signalink ptt

#AGWPORT 8003 2
#AGWPORT 8000 0
?
KISSPORT 8100 0
KISSPORT 8101 2
-----------------------------

When I fire up dire wolf it outputs:
Dire Wolf DEVELOPMENT version 1.7 A (Apr? 6 2023)
Includes optional support for:? hamlib cm108-ptt

Reading config file /home/chengmania/dev/BETATESTING/direwolf-1.7-dev-A/build/direwolfBeta.conf
Audio device for both receive and transmit: plughw:4,0? (channel 0)
Audio device for both receive and transmit: plughw:1,0? (channel 2)
Channel 0: 300 baud, AFSK 1600 & 1800 Hz, A+, 44100 sample rate / 3.
Channel 2: 1200 baud, AFSK 1200 & 2200 Hz, A+, 44100 sample rate.
Note: PTT not configured for channel 2. (Ignore this if using VOX.)
Ready to accept KISS TCP client application 0 on port 8100 (radio channel 0) ...
Ready to accept KISS TCP client application 0 on port 8101 (radio channel 2) ...
---- These last two lines was what I was looking for.??

Then I start linBPQ and direwolf reads:

Attached to KISS TCP client application 0 on port 8101 (radio channel 2) ...

Ready to accept KISS TCP client application 1 on port 8101 (radio channel 2) ...

Attached to KISS TCP client application 0 on port 8100 (radio channel 0) ...

Ready to accept KISS TCP client application 1 on port 8100 (radio channel 0) .

---? This tells my both ports on linBPQ are connected to dire wolf.? I don't know how linBPQ will handle simultaneous connections with VHF and HF, but that's for different forum?


I was able to beacon on both my VHF radio and my HF radio independently.? ?I heard my vhf signal using a handheld and the HF signal using a websdr.
Now I just need to setup some local volunteers to connect to the test node by both VHF and HF.??

After a few more tests on my laptop I will be transferring the of this to my Raspberry Pi4 and will have a working linBPQ node on both VHF and HF.??

Thank you again for everyone's help and suggestions.??


Re: How to use Direwolf with multiple clients and multiple radios?

 

Was that just implemented for TCP KISS?
Or did you just not post the AGW code?
?
As stated in a previous post, I know the TCP KISS works, but as noted from the code, that is specific to receive.
I am pretty sure I had the definitions after all the device declarations (so appears after CHANNEL 2 in config).

So, if the application is listening on KISS port 8100, it will only hear CHANNEL 2.
If your application listens on KISS port 8101,? , it will only hear CHANNEL 0.

Again, (and since the posted code saya nothing about it) I am not sure this was implemented for AGW, so (in theory) the second statement (CHANNEL 2) should be used.

Robert Giuliano
KB8RCO


Re: How to use Direwolf with multiple clients and multiple radios?

 

In V1.7 of Direwolf, you can split the TCP/IP ports per ACHANNEL.
Some applications (namely APRSIS32) will receive the multiple "streams", but only transmit on the first.
?? (Lynn hasn't implemented the stream tracking for transmit - YET.)

I have DEINITELY run 2 separate TCP/IP KISS ports per the designation described.
BUT ... if you split them, then they can't be viewed on the same application, unless the application is capable of multiple ports.

Robert Giuliano
KB8RCO



On Friday, April 7, 2023 at 02:17:37 PM EDT, Greg Cheng <kc3smw@...> wrote:


Thank you.??

I have tried various things.? It appears that it will only recognize the 2nd set of listed ports,? the first set gets ignored.? It doesn't matter what number they are assigned.? ? ?

My ultimate goal is to add an HF radio to my current VHF linBPQ node using 1 RPI and 2 signalinks (or Signalink and digirig).??


Re: How to use Direwolf with multiple clients and multiple radios?

 

¿ªÔÆÌåÓý


Hello Greg,

When you say you only see your "channel 2 ports", what do you mean?? Is it because you don't see the specific AGW and KISSTCP ports that correlate to your "channel 2" actually applied to channel 2?

I see two things going on here:

?? #1 - You didn't show your entire configuration but your AGWPORT and KISSTCP lines seem to be configured under the ADEVICE1:CHANNEL2 area.? Try moving the first set of AGWPORT and KISSTCP lines to be under ADEVICE0:CHANNEL0

?? #2 - While maybe it's not a hard bug, I would argue that Direwolf is applying your CHANNEL 2 port numbers to CHANNEL 0 based on how you configured things.? I think this could be handled better.

?? #3 - It's not clear what applications you're trying to interface via KISSTCP or AGW but both protocols support the concept of which "radio port" to use.? This should be supported by your application.? For example, for Outpost Packet Manager for Windows - page 2 ( ), there is the "TNC radio port" field.? The same goes for KISSTCP.? See the source code comments below.

?? #4 - GAP: Looking at the source code, Direwolf AGW doesn't support fixed "channel" assignments like you're trying to configuring things but I don't think it's required.? The Direwolf User Guide should be more clear about this.?
All that said, I think Direwolf will do what you want but you just shouldn't try to hardcode the "channels" in the AGW or KISSTCP stanzas of the direwolf.conf file:

src/config.c
------------------------------------------------------------------------------------------------------------------------

/*
?* AGWPORT????????????? - Port number for "AGW TCPIP Socket Interface"
?*
?* In version 1.2 we allow 0 to disable listening.
?*/
// FIXME:? complain if extra parameter e.g. port as in KISSPORT? <-------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------

/*
?* KISSPORT port [ chan ]?????????????? - Port number for KISS over IP? <-----------------------------------------------
?*/

??????? // Previously we allowed only a single TCP port for KISS.
??????? // An increasing number of people want to run multiple radios.
??????? // Unfortunately, most applications don't know how to deal with multi-radio TNCs.
??????? // They ignore the channel on receive and always transmit to channel 0.
??????? // Running multiple instances of direwolf is a work-around but this leads to
??????? // more complex configuration and we lose the cross-channel digipeating capability.
??????? // In release 1.7 we add a new feature to assign a single radio channel to a TCP port.
??????? // e.g.
??????? //????? KISSPORT 8001?????????? # default, all channels.? Radio channel = KISS channel.
??????? //
??????? //????? KISSPORT 7000 0???????? # Only radio channel 0 for receive.
??????? //????????????????????????????? # Transmit to radio channel 0, ignoring KISS channel.
??????? //
??????? //????? KISSPORT 7001 1???????? # Only radio channel 1 for receive.? KISS channel set to 0.
??????? //????????????????????????????? # Transmit to radio channel 1, ignoring KISS channel.


------------------------------------------------------------------------------------------------------------------------

--David
KI6ZHD


Re: How to use Direwolf with multiple clients and multiple radios?

 

Thank you.??

I have tried various things.? It appears that it will only recognize the 2nd set of listed ports,? the first set gets ignored.? It doesn't matter what number they are assigned.? ? ?

My ultimate goal is to add an HF radio to my current VHF linBPQ node using 1 RPI and 2 signalinks (or Signalink and digirig).??


Re: How to use Direwolf with multiple clients and multiple radios?

 

¿ªÔÆÌåÓý

The author should confirm, but I don't think Direwolf supports per-channel ports for the AGW and KISS protocol sockets. Both protocols support specifying which channel you want to use natively, so you can multiplex multiple radio channels through the same socket connection. For example, incoming packets from the second radio/soundcard part of the configuration would be appearing over KISS as "TNC" port 1 in the KISS prefix byte (first would be port 0), and transmissions would be routed to radios the same way.

I know I had to deal with demultiplexing packets by channel in my YAAC application that supports both AGW and KISS connectivity to Direwolf.

Andrew, KA2DDO
author of YAAC


From: [email protected] <[email protected]> on behalf of Rob Giuliano via groups.io <kb8rco@...>
Sent: Friday, April 7, 2023, 12:56 PM
To: [email protected] <[email protected]>
Subject: Re: [direwolf] How to use Direwolf with multiple clients and multiple radios?

The question is what are you seeing your CHANNEL 2 port with?
Since you have defined different KISS and AGW ports for each interface, you need to connect to both 8001 and 8003 (or 8100 and 8101) at the same time, in order to see both channel's data.

I suggest testing with only a single AGW and KISS port.? Make sure it is working.? Then (if needed) split the ports.

Separate ports (as you have it):
AGWPORT 8001 0
KISSPORT 8100 0
?
AGWPORT 8003 2
KISSPORT 8101 2

Comment both out, and add (note the channel is missing, so both will be on the same port)
AGWPORT 8001
KISSPORT 8100

-------
Rob KB8RCO


Re: How to use Direwolf with multiple clients and multiple radios?

 

The question is what are you seeing your CHANNEL 2 port with?
Since you have defined different KISS and AGW ports for each interface, you need to connect to both 8001 and 8003 (or 8100 and 8101) at the same time, in order to see both channel's data.

I suggest testing with only a single AGW and KISS port.? Make sure it is working.? Then (if needed) split the ports.

Separate ports (as you have it):
AGWPORT 8001 0
KISSPORT 8100 0
?
AGWPORT 8003 2
KISSPORT 8101 2

Comment both out, and add (note the channel is missing, so both will be on the same port)
AGWPORT 8001
KISSPORT 8100

-------
Rob KB8RCO