Date   

DRAWS Codec Technical Documentation

Annaliese McDermond
 

I have just posted the following article to the UDRC/DRAWS Wiki:

https://nw-digital-radio.groups.io/g/udrc/wiki/DRAWS™-Audio-CODEC-Analog-Routing%2C-Digital-Interfacing-and-Controls

This is a technical document outlining the audio codec on the DRAWS, the TI TLV320AIC3204 and how we use it on the DRAWS board. It’s not designed to be a “how-to” guide or something to hold someone’s hand on how to solve their problem, but rather a technical document on how the hardware and software is designed to support the low level audio interface. If people feel there are missing pieces, please let me know and we’ll see if I can address them. Again, though, this isn’t designed to be a “how to set up your DRAWS” but a conceptual document to help the more technical minded folks understand what they’re dealing with.

--
Annaliese McDermond (NH6Z)
Xenotropic Systems
mcdermj@...


Draws and IC-7000 #draws #ic7000 #minidin6

Jack Spitznagel
 

Basil,

 

Hopefully this experiment provides some useful info:

 

I built a breakout strip to help solve the issues with overdrive of the IC-7000 in fldigi. As I began to put things together I went to the ICOM manual (version 5 English) to confirm how they label their pin position numbers on the diagram.  

 

Used a couple of “half cables” that I had from other projects in the past, rang out the pin connections, and lined them up on a proto strip so a jumper connected each together. This worked same as the mini Din6 cables supplied. IC-7000 pinout diagram is at the end of the email for those interested.

 

Substituted a junk box 500KOhm pot in for the DATA IN jumper (probably overkill for what might really be needed). Ends of the resistor to the Pi side cable and to the cable shield/GND, the wiper was to the Radio side cable on DATA IN. The pot was initially set so there was no resistance in the DATA IN line.

 

After boot, tested Xastir (my control state) first at the original alsamixer settings:

PCM                  L:[-21.50dB],     R:[-21.50dB
ADC Level         L:[-2.00dB],       R:[-2.00dB]
LO Driver Gain  L:[-6.00dB],       R:[-6.00dB]
IN1                    L:[10kOhm],      R:[10kOhm]
IN2                    L:[Off],               R:[Off]

Xastir worked to spec in FM mode RX and TX.

 

Killed AX25, then tested fldigi in USB mode at same alsamixer settings. As before, overdrove the radio input causing ALC reading to be high.

 

Then increase resistance while transmitting into a dummy load and was able to reduce ALC reading considerably while maintaining output power. Signal looked clean on Spectrum Lab fed from another receiver.

 

Shut down fldigi and restarted AX25/Direwolf. No longer enough audio there to drive the rig in FM mode. Sending with Xastir would key rig (using flrig) but no signal was TX. Removed the pot, put the jumper back in and Xastir could transmit as before.

 

Key Findings:

 

  1. There is a difference between the audio input level the IC-7000 wants for clean FM and for “ALC free SSB”. Based on the position of the pot, that was a drive signal reduction of about 40 to 50%.
  2. For fldigi, the alsamixer PCM and LO Drive settings could be increased well above the -30dB noise floor (PCM to 0.00, LO Drive to 0.00) tweeking the pot a bit got ALC to essentially zero with rig power at ~30% (approximately 25 Watts) and still looking very clean.
  3. To confuse the issue, I still have found no way to get wsjt-x to TX with sufficient audio regardless of the settings of alsamixer. This apparent drive signal attenuation has got to be something wsjt-x is doing. Does not make sense.

 

It would be great to find the “half-way point” where both HF programs and Direwolf use identical alsamixer settings.

 

KD4IZ

Jack Spitznagel

FM19oo

 

 

 

 


--
J Spitznagel
Science River LLC
KD4IZ


Re: Beta6 release announcement

Geoffrey Merck
 

Thank you ! :)


Re: Beta6 release announcement

Basil Gunn
 

Hi Geoffrey,

Nope, won't be calling you dumb. I do enough dumb stuff that would blow
back on me pretty quickly.

Try this wiki page out:
https://nw-digital-radio.groups.io/g/udrc/wiki/DRAWS%3A-Getting-Started

Here's an index of the docs so far:
https://nw-digital-radio.groups.io/g/udrc/wiki/DRAWS%3A-Image-getting-started

/Basil

Geoffrey Merck <f4fxl.geoffrey@...> writes:

Hi Basil,

I am moving from a previous compass image to this beta. Call me dumb
if you want, but I cannot find where the default user and password are
documented.

Regards,
Geoffrey


Re: Beta6 release announcement

Geoffrey Merck
 

Hi Basil,

I am moving from a previous compass image to this beta. Call me dumb if you want, but I cannot find where the default user and password are documented.

Regards,
Geoffrey


Re: Observations running Draws_config.md

Basil Gunn
 

Joe,
Thanks for all the information.

I have been successful in verifying the core operation of Beta 6 and
have Direwolf/YAAC running without issue on port 0. I also have FLDIGI
running on port 0 (left hand port on the draws board) without a
problem but had to deviate from the information in
DRAWS_CONFIG.md. The directions in the verify document tell us to
remove the # from dtparm=audio=on to "Test analog audio" . I do that
by removing the # in the config.txt file for the Rpi and the test runs
and I get the results indicated. The same is true for "TEST OF HDMI
AUDIO" . By the way there is a minor error in the information the beta
6 release doesn't have a file named "silence.wav" in $
/usr/share/xastir/sounds.
Yes I see that. I'll fix it.
For now just copy it from n7nix/xastir/silence.wav to the
/usr/share/xastir/silence.wav

Here is the question. When I complete the verify core test and
shutdown --ax25
You need to run a script in your local bin called. ax25-stop

and then start FLDIGi and try to configure the sound
card FLDIGI fails and shuts down.
Try this.
You should see the process id of direwolf the first time you run pidof
and not the second time.

cd
cd bin
sudo su
pidof direwolf
./ax25-stop
pidof direwolf

Now run fldigi

In fldigi under the choices in the
audio selection menu there is no udrc audio choice available.
I just tried it & Fldigi enumerates:
udrc: -(hw:1,0)

without the enabled RPi sound device the udrc will enumerate like this:
udrc: -(hw:0,0)

I have a feeling you are not shutting down direwolf.
The next image will have direwolf unloaded by default.

IF I go
back to CONFIG.TXT and comment out, put the # in, for the line
dtparam=audio=on, reboot, start FLDIGI I can then select the udrc 0
port and complete the configuration of fldigi without issue and fldigi
runs just fine. Am I overlooking something in your instructions?
Or are we to comment out the dtparam=audio=on in the config.txt of the
RPi
There should be no problem enabling the BCM2835 RPi sound device.
I use it with Xastir for the sound alerts.

I am making some progress with WSTX I can receive and decode but not
transmit yet. I need to recheck the cable I made that goes from the
6pin mini din of the draws board to the 13 pin Din of my TS 590.

Thanks,
K3JV Joe


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Art - KC7SDA
 

so try this:
- unplug the antenna and lan cable
- shutdown and unplug the pi for about 10-20 minutes or so (this gives you a good gap to check stuff)
- start back up

it should auto change the time (you could change the makestep to 1 -1 for this test) when it boots, if that works then we need to add the compile from source commands for gpsd

also I just checked, I have version 3.16-4 right now


Observations running Draws_config.md

Joseph Vilardo
 

Basil
I have been successful in verifying the core operation of Beta 6 and have Direwolf/YAAC running without issue on port 0.  I also have FLDIGI running on port 0 (left hand port on the  draws board)  without a problem but had to deviate from the information in DRAWS_CONFIG.md. The directions in the verify document tell us to remove the # from dtparm=audio=on to "Test analog audio" . I do that by removing the # in the config.txt file for the Rpi and the test runs and I get the results indicated. The same is true for "TEST OF HDMI AUDIO" . By the way there is a minor error in the information the beta 6 release doesn't have a file named "silence.wav" in $ /usr/share/xastir/sounds.

Here is the question. When I complete the verify core test and shutdown --ax25 and then start FLDIGi and try to configure the sound card FLDIGI fails and shuts down. In fldigi under the choices in the audio selection menu there is no udrc audio choice available. IF I go back to CONFIG.TXT and comment out, put the # in, for the line dtparam=audio=on, reboot, start FLDIGI I can then select the udrc 0 port and complete the configuration of fldigi without issue and fldigi runs just fine. Am I overlooking something in your instructions? Or are we to comment out the dtparam=audio=on in the config.txt of the RPi

I am making some progress with WSTX I can receive and decode but not transmit yet. I need to recheck the cable I made that goes from the 6pin mini din of the  draws board to the 13 pin Din of my TS 590.
Thanks,
K3JV Joe


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Basil Gunn
 

Also, I just plugged the gps antenna back in, and it updated the time!

So my guess is that gpsd isn't compiled correctly to update the time
from the internal RTC if the antenna isn't plugged in. This can be a
huge issue for some people and needs to be addressed.
I'm not sure if gpsd is not compiled correctly or if it's just buggy. I
read a post that said that you need to run at least gpsd version
3.17. Debian Stretch, has gpsd version 3.16.4 in its repo.

I tried to load the latest version of gpsd (3.18.1) from Debian
experimental & got into a dependency mess so built from source.
That worked & I ended up with:

gpsd -V
gpsd: 3.18.1 (revision 3.18.1)

I wanted to try out your scenario so unplugged the GPS antenna &
Ethernet cable. Tried a warm boot, then a cold boot, and date & time
look OK, that is, date/time matched my workstation date/time. So I
think without an Ethernet cable or gps antenna the date/time will be
read from the battery backed up rtc and date/time will be ok for a
while until a reference can be accessed.

Let me know if I missed something.
Contact me directly if you want my gpsd source build instructions.
/Basil

Here is my main scenario as to why this needs to be addressed: you go
out to field day with your setup and you forgot your gps antenna! you
have no cell signal so you have no internet access to update the
system time! you can't set it manually because ft8 and other time
sensitive modes needs a high precision clock.... also there is the
matter of logging contacts for contests/events that require accurate
times.

Also, I believe when the pi turns on it does set the time from
chrony's source (internet/gps/rtc), and if the rtc isn't updating when
no antenna is attached then the system time won't be right during
startup (which i'm sure will be the cause of headaches for some niche
users).


Re: FT891, FT817, Audio Levels, I/O Fail , and Documentation #draws #ft817 #hfmodes

Tim Carroll <tcarroll4@...>
 

Ed,

KD9FRQ

 

DRAWS  $129.00+ Shipping to Lower 48 US

 

From: udrc@nw-digital-radio.groups.io <udrc@nw-digital-radio.groups.io> On Behalf Of Ed Bloom, KD9FRQ
Sent: Sunday, December 23, 2018 9:07 AM
To: udrc@nw-digital-radio.groups.io
Subject: Re: [udrc] FT891, FT817, Audio Levels, I/O Fail , and Documentation #draws

 

Tim, KE4HGP,

If you no longer want your DRAWS, I would like to purchase it.

Respectfully, Ed, KD9FRQ

 

On 12/22/2018 10:56 PM, Tim Carroll wrote:

I myself have been doing the same.With KX2,FT891,FT817D.For now the draws is in the bottom drawer.Seems like I make one step forward then two steps backward’s.So were going to give her a break,been messing with it since I got.Just have to go with lap-top and sound card for now.

73’S

MERRY Christmas

 

Tim

KE4HGP

 

From: udrc@nw-digital-radio.groups.io <udrc@nw-digital-radio.groups.io> On Behalf Of John D Hays - K7VE
Sent: Saturday, December 22, 2018 12:41 PM
To: udrc@nw-digital-radio.groups.io
Subject: Re: [udrc] FT891, FT817, Audio Levels, I/O Fail , and Documentation #draws

 

Julian,

 

We have an FT-817nd en route to Bryan's lab for him to be able to duplicate the Yaesu setup.  It should arrive later today.  We will try to have an answer for you after he takes a look at it.

 

Yes, we do test various modes, but we don't have every radio immediately available.

 

I have an 817 myself, but I am antenna challenged at the moment. (My house is for sale, and all of my external antennas are taken down, except the garage repeater -- plus I have a very high noise level here, part of the reason I am planning to move.)

 

 

 

On Sat, Dec 22, 2018 at 7:42 AM Julian OH8STN <julian@...> wrote:

Hello Operators
I've been trying for the better part of four days to get the Yaesu ft-891 and Yaesu ft-817 to work on HF digital modes, correctly with the DRAWS hat. Many of the answers to the questions operators are asking are scattered around the forums in dozens of different threads. This is beyond frustrating! I would suggest building a Wiki specifically for the DRAWS hat called "Getting started". That would solve my first problem which is documentation, and being forced to read through mostly irrelevant threads to find the jewels. 

I've already run the scripts to set the levels. I've disabled ax25 and direwolf. I changed the settings from the 9600 packet port to the data line in mentioned in John and Bryans thread. I've also read through Basils threads about troubleshooting. Most of those are direwolf ax.25relsted threads What I'm left with is a pretty horrific audio I/O problem.
On transmit: When I transmit, I never get a clean signal. When I lower the levels I get some sort of oscillation. There is no sweet spot. it's either too much or too little.
On the receipt side, even with the cables unplugged there's a 30 DB noise level emanating from the DRAWS hat. Signals are barely seen in the waterfall, and decoding is ridiculously poor.
If I plug in my signalink, my miniproSC or even the USB audio interface attached to the wolphilink, it's no problem to get clean audio, and to start decoding stations I could barely see in the waterfall. I've done this with js8 call and fldigi, which both work perfectly with a signalink and zlp miniprosc on the DRAWS image.

I could really use some troubleshooting help.

73
Julian oh8stn 

_.

--

 


John D. Hays
Edmonds, WA

K7VE

 

   

 

 


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Steve Stroh
 

There is no GPS antenna built into the DRAWS board. That is by design as the DRAWS board is intended to be packaged (along with its host Raspberry Pi) into a metal case which would block an integrated antenna. 

On Sat, Dec 29, 2018 at 11:57 Basil Gunn <basil@...> wrote:

> When I plugged in the antenna,  all
> worked as I expected. Do I understand this correctly?

Yes that is correct. It is a requirement to have some antenna connected
to the gps device on the DRAWS HAT. I have used a number of USB gps and I'm
impressed how well the DRAWS gps works (11 satellites discovered) compared to
the others based on SiRF IV chips.


> Is there a way to
> receive gps satellites without the antenna?

Do not think so.

/Basil



--
Steve Stroh (personal / general): stevestroh@...


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Basil Gunn
 

When I plugged in the antenna, all
worked as I expected. Do I understand this correctly?
Yes that is correct. It is a requirement to have some antenna connected
to the gps device on the DRAWS HAT. I have used a number of USB gps and I'm
impressed how well the DRAWS gps works (11 satellites discovered) compared to
the others based on SiRF IV chips.


Is there a way to
receive gps satellites without the antenna?
Do not think so.

/Basil


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Bob Orrett <boborrett@...>
 

I will confess that I don't understand the finer points in this discussion . But speaking as an operator who likes to operate out in the field with no Internet,  I am surprised that the gps seems to need the antenna. This is not the best set up for portable field work. It would seem easier to use a gps usb dongle. When I read that purchasing the antenna was optional,  I assumed that that meant that the reception of satellites would be enhanced by the antenna not dependent on the antenna. I did try portable operations with the Draws Hat with no gps antenna and I did not aquire any satellites and therefore could not set the time. When I plugged in the antenna,  all worked as I expected. Do I understand this correctly? Is there a way to receive gps satellites without the antenna?

Bob Orrett,  VE3OBO 


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Basil Gunn
 

partially true, i changed the line int he chrony.conf file from:

makestep 1 3
to

makestep 1 -1
This config will break some apps, like 'make' which builds depending on
time stamps. I'm not sure what else it breaks but I don't recommend your
config change.

So my guess is that gpsd isn't compiled correctly to update the time
from the internal RTC if the antenna isn't plugged in. This can be a
huge issue for some people and needs to be addressed.
I'll look into it.

/Basil


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Art - KC7SDA
 

partially true, i changed the line int he chrony.conf file from:
makestep 1 3
to
makestep 1 -1
when you change the makestep to 1 -1 it will instantly change the system time to whatever the time source it chooses (rtc/gps/internet), it doesn't slow down or speed up the clock at that point, its the same as running 'chronyc makestep'

Also, I just plugged the gps antenna back in, and it updated the time!



So my guess is that gpsd isn't compiled correctly to update the time from the internal RTC if the antenna isn't plugged in. This can be a huge issue for some people and needs to be addressed.

Here is my main scenario as to why this needs to be addressed: you go out to field day with your setup and you forgot your gps antenna! you have no cell signal so you have no internet access to update the system time! you can't set it manually because ft8 and other time sensitive modes needs a high precision clock.... also there is the matter of logging contacts for contests/events that require accurate times.

Also, I believe when the pi turns on it does set the time from chrony's source (internet/gps/rtc), and if the rtc isn't updating when no antenna is attached then the system time won't be right during startup (which i'm sure will be the cause of headaches for some niche users).


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Basil Gunn
 

when i run the date command i get 12:08 gmt, so chrony isn't updating
and I have left this on all night (so it should have updated at some
point)
The chrony service does NOT change the time!

The misconception is that the chrony service is setting the time to the
one given by the NTP server. This is incorrect – what actually happens
is that based on the answer from the NTP server, chrony just tells the
system clock to go faster or slower. For this reason, sometimes even
though the time is wrong and the NTP server is working, the time does
not get corrected immediately.

If your system time, as displayed by the date command, is not correct
ie. off by hours/months/years then as root run:

chronyc makestep

Also refresh my scripts

cd
cd n7nix
git pull

and send me the output of:

gps/verify-time.sh

/Basil


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Art - KC7SDA
 

nope, it just took out the other 4 sources. for whatever reason it's not giving me a sample at all. this is a communication problem between chrony and gpsd


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Julian OH8STN <julian@...>
 

Hi Art 
Try disabling the pool in chrony.conf, by adding a hashtag in front of that line. Save, restart chrony, give it some time, then check with  chonyc sources -v
73
Julian oh8stn 

Julian OH8STN
www.oh8stn.org
www.youtube.com/c/OH8STN

On 28 Dec 2018 14:26, Art - KC7SDA <nouse4anick@...> wrote:
I do have the battery installed, and the rtc does have the correct time, however chrony doesn't view the gps as online and receiving a valid time

this is what the sources looks like:
pi@draws:~ $ chronyc sources 
210 Number of sources = 6
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS                           0   3     0     -     +0ns[   +0ns] +/-    0ns
#? PPS                           0   3     0     -     +0ns[   +0ns] +/-    0ns
^- dfw1.m-d.net                  2  10   377   679   -1023s[ -1023s] +/-   79ms
^- atl1.m-d.net                  2  10   377   194   -1023s[ -1023s] +/-   87ms
^- iad1.m-d.net                  2  10   377   825   -1023s[ -1023s] +/-   87ms
^- static-96-244-96-19.bltm>     2  10   175    80   -1023s[ -1023s] +/-   74ms

and as you can see from the screen shot, it does have the correct time



when i run the date command i get 12:08 gmt, so chrony isn't updating and I have left this on all night (so it should have updated at some point)


Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Art - KC7SDA
 

I do have the battery installed, and the rtc does have the correct time, however chrony doesn't view the gps as online and receiving a valid time

this is what the sources looks like:
pi@draws:~ $ chronyc sources 
210 Number of sources = 6
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS                           0   3     0     -     +0ns[   +0ns] +/-    0ns
#? PPS                           0   3     0     -     +0ns[   +0ns] +/-    0ns
^- dfw1.m-d.net                  2  10   377   679   -1023s[ -1023s] +/-   79ms
^- atl1.m-d.net                  2  10   377   194   -1023s[ -1023s] +/-   87ms
^- iad1.m-d.net                  2  10   377   825   -1023s[ -1023s] +/-   87ms
^- static-96-244-96-19.bltm>     2  10   175    80   -1023s[ -1023s] +/-   74ms

and as you can see from the screen shot, it does have the correct time



when i run the date command i get 12:08 gmt, so chrony isn't updating and I have left this on all night (so it should have updated at some point)


Re: FT891, FT817, Audio Levels, I/O Fail , and Documentation #draws #ft817 #hfmodes

Julian OH8STN <julian@...>
 

Thanks John.
I was starting to think no feedback was coming. The cable mod was the first thing I did when you suggested it privately by email. it solves the squelch mute problem, but it doesn't solve the level problem on receive p, or the over driving on transmit. My MiniProSC cable works fine with DRAWS. So does my WolphiLink cable.

Can you confirm you have yourself been able to set up the Yaesu ft-817, 891, or ft-450 with FLDigi, WSJTX, and or JS8Call, without the -30db noise floor from tge DRAWS audio ports, and 0 ALC? If so, can you guys please post a video of that?

I'm still trying to complete this Getting Started with the DRAWS Hat" video which is desperately needed by the community. Honestly I'm stuck, with no real feedback from the team addressing my problems with DRAWS specifically. I've got the GPS and synchronizing the time sorted, downloading and burning the SD card, initial configuration, disabling ax25 and direwolf, setting up vnc server, ... that's all good. When it comes to sorting out the audio levels with these Yaesu radios on HF Data modes, there still isn't enough information. Yes I can get it "working", but I can't get it working as well as the SignaLink or DigiMaster MiniProSC which are totally plug and play on Raspberry Pi. Add conttols to alsa mixer, one level control for output, one for input, select  hw codec then mono, left or right  in FLDigi, JS8Call or WSJTX.  Theres no -30db noise, and there is zero ALC on tx. At the moment, that can't be achieved with DRAWS.

If I'm the problem, please say it here. There's no need to be kind or polite for my sake. I want this to work , and I'm behind the team 100%. You'll see that just as soon as I can get this video published.
I'm no Linux Guru, but I'm certainly comfortable with it. If I'm having these problems I can't imagine many of my subscribers would be able to get it sorted.

73
Julian oh8stn