Ubuntu build/run

96 views
Skip to first unread message

Matt Pelmear

unread,
Apr 1, 2014, 8:07:01 PM4/1/14
to extr...@googlegroups.com
I've built extradio on Ubuntu 13.10 (with a change to the build script) but run into a problem.
When I run the application (no command line options) I get: "ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred"

Any ideas before I start debugging this on my own?

FYI, to build extradio in Ubuntu 13.10 I had to make the following modification:

diff --git a/build.py b/build.py
index e87f3e5..96d1721 100644
--- a/build.py
+++ b/build.py
@@ -33,7 +33,7 @@ FILES=['src/audiosource.cpp',
 OBJ_DIR = 'bin'
 CC = 'g++'
 CFLAGS = '-g -O3 -Wall'
-LDFLAGS = '-lportaudio -lboost_system -lboost_program_options'
+LDFLAGS = '-lportaudio -lboost_system -lboost_program_options -lasound'
 EXECUTABLE = 'extmodem'
 JOBS_COUNT = multiprocessing.cpu_count()



Thanks,
-Matt
KC2ZYS

Matt Pelmear

unread,
Apr 1, 2014, 9:49:34 PM4/1/14
to extr...@googlegroups.com
I managed to get things working properly when I run the application. (Initially I could only make it work when specifying input from ALSA, now PortAudio seems to be working fine, since the app runs without any commandline arguments without errors)
However, I am unable to demod received APRS data.

Output is as follows:
==========================================================
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Default device: ALSA
device 0: ALSA
device 1: OSS
Starting extmodem ...
Started!
==========================================================

I can simulate connections with netcat localhost 6666:
    connect, hay clientes: 1

But I never see any indication of successful AFSK reception.
I've checked that I'm not clipping the input on the sound card, and I'm now not sure how to proceed. Any suggestions would be greatly appreciated.

Thanks!
-Matt
KC2ZYS

Alejandro Santos

unread,
Apr 2, 2014, 2:44:17 AM4/2/14
to Matt Pelmear, extr...@googlegroups.com
2014-04-02 3:49 GMT+02:00 Matt Pelmear <mjpe...@gmail.com>:
>
> But I never see any indication of successful AFSK reception.
> I've checked that I'm not clipping the input on the sound card, and I'm now
> not sure how to proceed. Any suggestions would be greatly appreciated.
>

extmodem has a hidden undocumented feature (my fault!) that also
decodes DTMF keys, and logs them on the console. Since DTMF is more
resillient to noise than AFSK, this feature was added for this very
specific purpose: to detect if extmodem decoder is working.

Use a normal portable radio to send DTMF tones, and try using a normal
microphone instead of a packet interface.

If there is some output on the console, then there is some specific
problem with AFSK (noise on the line? wrong audio level?).

If no DTMF tones are shown on the console, the problem is somewhere else.

73 LU4EXT

--
Alejandro Santos

Matt Pelmear

unread,
Apr 2, 2014, 10:16:02 PM4/2/14
to extr...@googlegroups.com, Matt Pelmear
Ah yes, I saw that in the source code!
I gave this a try today, sending DTMF with my HT, and it was detected properly.

Should I have the output gain of the radio adjusted so that the signal is a few (say, 3-6) db short of clipping the sound card when receiving strong signals?
I have tried with this configuration with the receiver both squelched and unsquelched. It did detect one packet late last night, but I'm still having trouble in general.

If this sounds about right maybe I am just not receiving strong/clean enough signals?
Perhaps I should try to send some packets through my HT with another computer?
If I can get this working I'd love to contribute some code so this can pipe AX25 directly into the linux networking stack (to connect with Xastir).

Thanks!
-Matt

Alejandro Santos

unread,
Apr 3, 2014, 3:44:33 AM4/3/14
to extr...@googlegroups.com
2014-04-03 4:16 GMT+02:00 Matt Pelmear <mjpe...@gmail.com>:
> Ah yes, I saw that in the source code!
> I gave this a try today, sending DTMF with my HT, and it was detected
> properly.
>

Excellent! It means your issue is specific to AFSK, ie, your radio,
your interface, or just low quality packets being sent/recvd.

> Should I have the output gain of the radio adjusted so that the signal is a
> few (say, 3-6) db short of clipping the sound card when receiving strong
> signals?
> I have tried with this configuration with the receiver both squelched and
> unsquelched. It did detect one packet late last night, but I'm still having
> trouble in general.
>

In general I use unsquelched but YMMV. As far as I know there is no
right rule, just trial and error, but I'd love to stand corrected.

> If this sounds about right maybe I am just not receiving strong/clean enough
> signals?
> Perhaps I should try to send some packets through my HT with another
> computer?

I agree, maybe the packets are not clear enough, you should try
sending packets with another source.

> If I can get this working I'd love to contribute some code so this can pipe
> AX25 directly into the linux networking stack (to connect with Xastir).
>

That's a feature I'd really love to have in extmodem. At one time I
started poking on soundmodem source code. Let me know if you really
intent to persue this task so we don't duplicate any efforts.

> Thanks!
> -Matt
>

Thank you!
Alejandro
LU4EXT

--
Alejandro Santos

Alejandro Santos

unread,
Apr 3, 2014, 3:47:10 AM4/3/14
to extr...@googlegroups.com
2014-04-03 9:44 GMT+02:00 Alejandro Santos <ale...@gmail.com>:
> 2014-04-03 4:16 GMT+02:00 Matt Pelmear <mjpe...@gmail.com>:
>> Ah yes, I saw that in the source code!
>> I gave this a try today, sending DTMF with my HT, and it was detected
>> properly.
>>
>
> Excellent! It means your issue is specific to AFSK, ie, your radio,
> your interface, or just low quality packets being sent/recvd.
>

One more quiestion: what hardware audio interface are you using? Are
you decoupling your radio from your soundcard, ie, using a 1:1
transformer?

--
Alejandro Santos

Matt Pelmear

unread,
Apr 4, 2014, 1:57:14 AM4/4/14
to extr...@googlegroups.com
Today I ran a test sending junk data through my HT and received it successfully. Afterward, I rearranged the connections to the radio and have been receiving data just fine all day! I think either the antenna connector was a bit loose or for some reason a different audio cable has made the difference. I will play around with it at some point, but for now I am just glad to have it working!
(Right now it is just connected into the onboard sound card of the computer. No audio isolation transformer at the moment; I'll throw one into my next DigiKey order...)

Re: ax25, I am definitely interested in working on this. I'll look at the soundmodem implementation over the next few days and see if I can make any progress.

I've tried transmitting data from Xastir (connected over AGWPE protocol to extmodem) but received an error from extmodem about the "V" packet being unhandled. I would look at this but I think I might first focus on getting things working with ax25 natively in linux.

I also ended up with a segfault when I was sending junk data to extmodem (port 6666) and accidentally sent a malformed KISS frame. I'll look at that if I get a chance too.

Thank you so much for your help and your work on this project. This is very exciting :-)
I hope to be in touch again soon.

-Matt
Reply all
Reply to author
Forward
0 new messages