-
Notifications
You must be signed in to change notification settings - Fork 313
Latest stable version 1.5, random TXDelay timing problem #170
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
Comments
I can reproduce this issue with the current master c0abb4b on my raspberryPi zero W. I am using direwolf in beacon-mode and let it transmit my current system uptime as a dummy value. I am using a GPIO to toggle the PPT. I have tried to narrow the delay down by looking at the log output:
But observing roughly 20 TX-Packets they had no delay. The following log shows such a sample:
I have used an USB-Serial-Adapter to cross-check the problem: With a USB-Serial-Adapter (and a new config-file reflecting the change) the delay seems to be gone, too. Once I've got the time I'll try to reproduce the issue again. |
Thank you very much for that information. I will try that here tonight and see if it clears up the delay. |
Unfortunately, I still have the delay, after running Direwolf with "direwolf -c direwolf.conf -d o". |
If I'm understanding this right, when you run Direwolf without the "-d o" output switch, the TX delay issue is reproduced? And if you run it with the "-d o" output switch, the TX delay issue is gone? I tried it both ways here, but still have the TX delay problem. |
Sorry, that is a misunderstanding. I am not really sure what caused the delay or what made it disappear when I started with debug output. @meinja could you run direwolf with the command I used ( |
OK, I'll post the output later today. What Linux distro are you using on the Pi Zero? The "direwolf -c direwolf.conf -d o | ts '[%Y-%m-%d %H:%M:%S]'" command doesn't work on my Raspian Stretch, I get an error saying "no command found" for "ts". I ran "direwolf -c direwolf.conf -d o -T %H:%M:%S" which did work on mine. Very curious what you did to eliminate the delay. I did notice there is no apparent delay when using 300-baud, which I thought was odd. I'll have to test that some more to verify though. |
I am using a Raspbian Strech Lite. You need to install the
Afterwards you can use the |
Nice! Thanks. Here's the output. I made three transmissions to my other setup across the house by just sending the letter "a". The lines in bold are the transmits. First transmit was noticeably much longer with the delay. Second and third were normal: [2018-11-06 17:27:23] PTT 0 = 1 |
Can you estimate how long noticeably much longer is? In the log the TX have the following duration:
I will try to reproduce this with my setup today. |
I found the time to power up my rig and give it a try. I tried two setups. First: With USB-Hub between RaspberryPi Zero W and Soundcard: Normal length:
Too long:
And 2nd setup without USB-hub:
Really long one:
Another long one:
(I've done a few more samples but they are not all worth mentioning here.) |
That's very interesting. I wonder if it's related to amperage somehow. Is your USB hub an externally-powered hub, or "passive" using the Pi Zero's power? On mine, the noticeable delays were around 2 seconds, and seems like 3 seconds at times. Some are around 1 second. On the transmissions with normal delay, it sounds like just a quick chirp on the back-and-forth acks and short one-letter commands. |
I found this in the "xmit.c" file in the Direwolf directory around line# 882:
|
It seems we are hunting a "heisenbug" here: I tried to have a closer look at the xmit.c toady. But I can not reproduce the issue anymore. Today everything works totally fine. :/ A litte further down in xmit.x wb2osz has already brought some debug infrastructure in place: I have enabled some of the debugging messages in my build:
Maybe you can give this a try on your setup? |
This has been isolated to a small test case. |
Has anyone tried an older version Raspian distro to see if that makes a difference? I'll try it here on my RPi3b, but it won't be for some time yet. |
The problem was reported here but no one seems interested. |
Same as #194 |
Duplicate. See #194 |
Uh oh!
There was an error while loading. Please reload this page.
I have Direwolf 1.5 installed on a Raspberry Pi3 ( with freshly installed Raspian Stretch). The setup uses linBPQ and Direwolf KISS mode 127.0.0.1:8001. I am able to make connections with no problem on 1200 and 300 baud, but I notice random delays between the PTT activation and actual transmitted audio. I have TXDelay set at 30ms, but I'm seeing delays up to 2 seconds (maybe even more at times) between PTT keydown and transmitted audio. Seems purely random; I would say 50% of the transmissions have this large delay, and the rest are normal. The long delays themselves are random in length also, and occur on any transmit, whether an ack or a command sent to the other station. The Pi3's CPU is generally around only 3% use when I'm using packet; no spikes during the delays or anything. This same problem was in the 1.5-beta4 version as well.
PTT is activated by the Pi3's GPIO pin 26.
USB audio is the Syba SD-CM-UAUD.
Timings in bpq32.cfg are at the suggested settings in the Direwolf user guide.
The BPQ config file is very basic; no other timing settings other than the following:
PORT
PORTNUM=1 ; Port number
ID=VHF Packet 1200-baud ; PORTS command text
TYPE=ASYNC :RS232 connection
IPADDR=127.0.0.1 ; DIREWOLF
TCPPORT=8001 ; DIREWOLF
SPEED=19200
CHANNEL=A ; TNC channel
MAXFRAME=1 ;Max outstanding frames
FRACK=4000 ; Level 2 timeout (ms)
RESPTIME=40 ; Level 2 delayed ACK (ms)
RETRIES=10 ; Level 2 max retries
PACLEN=128 ; Max packet length (bytes)
TXDELAY=100 ; Transmit keyup delay (ms)
SLOTTIME=100 ; CMSA interval timer (ms)
TXTAIL=100
PERSIST=63 ; Persistence (256/(# transmissions-1)
DIGIFLAG=1 ; Allow Digipeat on this port
ENDPORT
Direwolf config settings that are enabled are:
ADEVICE plughw:1,0
ACHANNELS 1
MODEM 1200 1200:2200
PTT GPIO 26
KISSPORT 8001
I also tried different ARATE settings at 11025 and 48000, but no change was seen.
Output when I run it is:
Dire Wolf version 1.5 (Sep 22 2018) Beta Test 4
Includes optional support for: cm108-ptt
Reading config file direwolf.conf
Audio device for both receive and transmit: plughw:1,0 (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate / 3.
Ready to accept AGW client application 0 on port 8000 ...
Ready to accept KISS TCP client application 0 on port 8001 ...
Attached to KISS TCP client application 0...
Ready to accept KISS TCP client application 1 on port 8001 ...
KISS protocol set TXDELAY = 10 (*10mS units = 100 mS), port 0
KISS protocol set Persistence = 63, port 0
KISS protocol set SlotTime = 10 (*10mS units = 100 mS), port 0
KISS protocol set TXtail = 10 (*10mS units = 100 mS), port 0
KISS protocol set FullDuplex = 0, port 0
The text was updated successfully, but these errors were encountered: