Serial port source/sink

Hey there! i’m working on a proyect of comunications and i need to get
my
serial data stream into gnuradio companion, so i’m looking for a block
(2
actually) that can make this work, i tried to install pyserial and
gr-pyserial but repository is down, so i’m looking for alternatives,
that
make me skip programming it myself (becoues of my low programing skills
),
so i though serial port is pretty comun, some one else had to build it
before, if you know some blocks which could help me i would be very
thankfull

I can look into my repos. Those blocks were meant for a customer who
specifically had to interact with a GR app through serial, due to legacy
interfaces/software. This allow them the interface to a GNU Radio app
through virtual serial connections (ie. SOCAT), just as if they were
connected to an 90’s vintage radio.

Is there a specific reason you want to do this through serial? Can you
explain your architecture?

-John

On Tue, Oct 28, 2014 at 11:35 AM, Julián Andrés Quenardelle <

Also, I just checked. The repo works fine through https but not ssh…
:shrugs:

On Tue, Oct 28, 2014 at 11:41 AM, John M. <

Hi Julian,
this really depends on how your serial data gets into your PC, but
assuming you’re on linux and have the data coming in over a properly
configured character device (ie. something that appears as /dev/ttyS* or
the like), you could just use the file source and open that device.

Greetings,
Marcus

Agreed, but as soon as device setup is through with your device (thus
the “properly configured character device”) and your reading program
behaves nicely (which I’d expect GR’s file_sink to do), just reading
from a character device should work, if I’m not mistaken.

However, this brings us to a new question: “serial” doesn’t really say
what kind of interface we’re talking about; there’s a whole lot of bytes
that you can not send over a 1980’s style UART as used for the RS-232
peripheral on PCs, and thus the data that comes in over that has to be
decoded first; you could write a block that converts these bytes to
bytes, or, and this is more likely, you already have software that does
that, and writes the result to a file, or prints it on standard output.
You could then connect the output of that to GNU Radio, e.g. using a
named pipe.

On 10/28/2014 06:34 PM, Marcus M. wrote:

Hi Julian,
this really depends on how your serial data gets into your PC, but
assuming you’re on linux and have the data coming in over a properly
configured character device (ie. something that appears as /dev/ttyS*
or the like), you could just use the file source and open that device.

Greetings,
Marcus
TTY I/O on Unix is a bit weird. You’d have to open it, and configure it
(into RAW mode for one).

Hey there! I’m gonna explain a bit of what i’m doing. I’m trying to
conect
a laptop with a ground control station software to an uavdevboard
(UDB4). I
want to get data stream through gnuradio, i want to make it serial
because
of previous work. I can set up the baudrate of transmision at my
software
(running on windows bdw) and my devboard too, i don’t know if that would
affect the TTY I/O on Unix (that was a good idea btw, gonna work over
that). However, my inteface is an USB/Serial cable if thats what you’re
asking, i didnt use the RS232 standard, just needed TxRx pins from the
devboard.

2014-10-28 20:57 GMT-03:00 Marcus Müller [email protected]:

Hey there, i succeed (think i do) installing gr_pyserial block, i wanted
to
test it making a loopback but when i compile muy gnuradio block i get
this

Generating: “/home/iua/Documentos/ComSerialGnu/top_block.py”

Warning: This flow graph may not have flow control: no audio or usrp
blocks found. Add a Misc->Throttle block to your flow graph to avoid CPU
congestion.

Executing: “/home/iua/Documentos/ComSerialGnu/top_block.py”

linux; GNU C++ version 4.6.3; Boost_104601;
UHD_003.004.003-175-g09de3c07

Traceback (most recent call last):
File “/home/iua/Documentos/ComSerialGnu/top_block.py”, line 48, in

tb = top_block()
File “/home/iua/Documentos/ComSerialGnu/top_block.py”, line 32, in
init
self.serial_port_0 =
grpyserial.serial_port("/dev/ttyS0",0,9600,0,1,False)
File
“/usr/local/lib/python2.7/dist-packages/grpyserial/serial_port.py”,
line 62, in init
num_msg_outputs = 1,
TypeError: init() got an unexpected keyword argument
‘num_msg_inputs’

and i have no idea what this means or what’s happened i’m totally lost,
so
i beg you help me with this fellas, thanks a lot for your time.

Hi Juli?n,

interesting!
I think I might be misunderstanding what’s happening here, so I think we
should make a sketch of what I think you’re doing:

“data” --> Ground control station --> TX Antenna --> Air --> RX Antenna
UAVdevboard

Is that correct?

Greetings,
Marcus