Hi Peter,
On 29-05-12 10:01, Peter wrote:
On 29 May 2012 07:57, Kristoff Bonne <[email protected]
<mailto:[email protected]>> wrote:
Just thinking for realtime stuff. Whether we can stream it
straight in:
RX: rec -r 48000 -t raw -s -b 16 -c 1 -|./gmskmodem -format c
-noreceiver -rif - -rof -|./c2dec.exe 1400 - -|play -r 8000 -t
raw -s -b 16 -c 1 -
TX: rec -r 8000 -t raw -s -b 16 -c 1 -|./c2enc.exe 1400 -
-|./gmskmodem -format c -noreceiver -sif - -sof -|play -r 48000
-t raw -s -b 16 -c 1 -
I've not looked yet. Just wondering if such a thing would be
possible.
It should but I haven't tried it that way.
I wonder how alsa will react if you have two different
applications using the same audio device. In theory it should work.
I actually couldn't compile it because of the alsa code (there isn't
an alsa lib at all for cygwin so far as I can see). Probably what
might be worth doing is adding conditional compiling (in the makefile)
to rip out alsa. If we want to support cygwin of course. Otherwise,
for me I'll just go make dual boot ubuntu some time :)
That's one option. Or simply install Virtual box and set up linux in a VM.
But perhaps we can look at other options, like ARM development boards.
E.g. the beaglebone looks like an interesting platform for me. Running
the modem on it should not be an issue but perhaps it even powerfull
enough to run the codec2 encoder/decoder on it.
Note that there is another element that will make it difficult to
compile it on windows.
On of the functions (ALSA playback) is not just implemented as a normal
POSIX thread, but actually is clocked at 20 ms by the linux kernel. The
reason is that this is the most time-critical element in this and I want
to have something that runs every 20 ms, no matter how much the device
is charged. (remember that my development platform are ARM boards).
These kinds of kernel-driven interrupts apparently do exist on windows
(so I have been told) but the API to program them is not that easy; and
-surely- not done the same way as linux code.
Anycase, I will change the code to disable all ALSA code, based on a
define in the Makefile.
Hmm, I could possibly install it on a linux machine I already have
(performing file server/firewall/routing duties) then try this way I
guess. Assuming I can get netcat to work on cygwin...
It doesn't have to be netcat. Any application that can send or receive
TCP or UDP traffic can do this.
On github, there is also an application "tcpserver" which does the same
thing as "nc -l ..."; which is about 20 lines of C code and more-or-less
a textbook example on socket programming.
(I did it this way as I had problems compiling netcat for my mini2440 board.
You can also use TCP-streams for input. I bit less "real-time",
but a bit better shielded from packetloss. Use the option "-sit"
(sender input TCP) instead of "-siu" (sender input UDP).
(BTW. I just noticed that I did not change the "usage" and "help"
for the PTT switching. Options are
ptt_cs (serial port control signal pins)
ptt_tx (serial port, TX 0 continuesly on servial port. This is
equivalent to +12 V on RS232). Can be used on boards where the
control-ports of a serial port is not connected (like on a
pandaboard). Just add a cap between the input of the transistor
base port of the PTT switch and the ground)
ptt_lf (create lock-file and apply POSIX lock to it).
The Icom 746 "wired" PTT pins are separate from HF. My cable is for HF
(since PSK and so on are mostly on there). For 2m, IF I am using the
cable I tend to use the ICOM CI-V commands. But, that's another story.
For testing I'll use manual transmit. :P
Well, the code is pretty modular. Everything related to ptt-switching is
in s_ptt.h
Again, this runs as a seperate thread: just watch some variable in the
global variables; and -if it is set or not- you perform an action.
If you want it, you can write your own code to -say- drive the PTT over
the CAT_interface of the transceiver.
Peter - M6DGI.
Kristoff - ON1ARF
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2