Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hdlc over serial?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 663

PostPosted: Tue Feb 13, 2018 9:01 pm    Post subject: hdlc over serial? Reply with quote

Hi,

I have a serial device which sends hdlc over a serial port, how can I read it?

I can open the tty and read the hdlc directly, of course, but this seems like it is short-circuiting something.

Is there a way to get the traffic coming in over the serial port into the network stack, like it probably should be?

Sorry for the scarcity of details but I'm sort of a noob in this particular instance.

Thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Tue Feb 13, 2018 9:08 pm    Post subject: Reply with quote

Progman3K,

Here's a pointer into the kernel
There may well be some userspace bits too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
AngelKnight
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 126

PostPosted: Wed Feb 14, 2018 10:07 am    Post subject: Reply with quote

Hi Progman3K,

You mentioned "you have a serial device." We can probably help more if you provide more details on what kind of "serial device", or the device on the remote end of this "serial device."

I don't have a lot of experience with HDLC on Linux, so while I believe you when you say your device is represented with a tty, I find this a little weird since HDLC typically involves a synchronously-clocked serial port, which I don't usually expect to see represented in Linux with a tty device.
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 663

PostPosted: Wed Feb 14, 2018 1:43 pm    Post subject: Reply with quote

Hello Neddy, hello AngelKnight!

Thanks for taking the time.

The device is not commercially available, it is homebrew, it apparently writes hdlc packets over /dev/ttyACM0 at 115200 kbps,N81

To go into more detail, it does not conform to synchronous HDLC, there are no timing bits.

Rather, it sends a series of HDLC packet (header, escaped-data, CRC) over the line.

I've tried using mmcli -L but this simply returns
Quote:

[date time] [Debug] ModemManager process found at ':1.10536'

No modems were found
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 663

PostPosted: Wed Feb 14, 2018 2:11 pm    Post subject: journalctl --no-pager -u ModemManager.service Reply with quote

ModemManager[13892]: <info> Creating modem with plugin 'Generic' and '1' ports
ModemManager[13892]: <warn> Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'
ModemManager[13892]: <warn> Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2': Failed to find primary AT port
ModemManager[13892]: <info> (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2
ModemManager[13892]: <info> Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2': Operation was cancelled
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 663

PostPosted: Wed Feb 14, 2018 2:37 pm    Post subject: Reply with quote

At this point, I am guessing the device needs to support a specific AT-command set to be registered as an actual HDLC network interface card
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum