View previous topic :: View next topic |
Author |
Message |
Progman3K l33t
Joined: 03 Jan 2004 Posts: 773
|
Posted: Tue Feb 13, 2018 9:01 pm Post subject: hdlc over serial? |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Tue Feb 13, 2018 9:08 pm Post subject: |
|
|
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 |
|
|
AngelKnight Tux's lil' helper
Joined: 14 Jan 2003 Posts: 127
|
Posted: Wed Feb 14, 2018 10:07 am Post subject: |
|
|
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 |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 773
|
Posted: Wed Feb 14, 2018 1:43 pm Post subject: |
|
|
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 |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 773
|
Posted: Wed Feb 14, 2018 2:11 pm Post subject: journalctl --no-pager -u ModemManager.service |
|
|
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 |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 773
|
Posted: Wed Feb 14, 2018 2:37 pm Post subject: |
|
|
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 |
|
|
|