Jump to content

Helios64 USB-C serial console


djurny

Recommended Posts


 

Hi all,

Something to share for those who use the USB-C serial console from another Linux host. Install and use 'tio' to connect to the serial console instead of minicom. This supports both 1500k baud and also can be easily used inside GNU screen (minicom gets a meta key conflict per default; CTRL-A is default meta key for both GNU screen and minicom). Minicom resulted in regular errors posted in syslog by the ftdi_sio kernel module. Did not run any strace to find out what syscall is causing it, but in short, tio appears to not treat the tty as a modem: no errors are popping up in syslog. Hopefully the serial consoles will remain up now.

One caveat: I did not find a way to send a BREAK over serial using tio. This is something that is handy in case kernel freezes up, as sometimes you will still have opportunity to do a magic sysrq triggered reboot (BREAK + b = initiate a reboot of the kernel, also see magic sysrq & REISUB).

 

Groetjes,

 

Spoiler

  

 

 

Hi all,

Not sure if this is related to the Helios64. I have connected all my Pi, Helios4 and Helios64 serial consoles to one of the Raspberry Pi devices. This way I can collect serial console dumps whenever things hit the fan.

 

For the Helios64 (and also the Helios4) console, I do get into trouble after some time. The ftdi_sio module on the Pi complains as follows:


Dec  5 06:25:45 pi2-03 kernel: [112461.799525] ftdi_sio ttyUSB5: failed to get modem status: -71
Dec  5 06:25:46 pi2-03 kernel: [112462.800633] ftdi_sio ttyUSB5: failed to get modem status: -71
[..]
Dec  5 06:25:57 pi2-03 kernel: [112473.814656] ftdi_sio ttyUSB5: failed to get modem status: -71
Dec  5 06:25:58 pi2-03 kernel: [112474.816044] ftdi_sio ttyUSB5: failed to get modem status: -71

And does so repeatedly. Note that it's always erroring on the Helios64 serial console, never about the Helios4 ones.

 

After a while the module gives up and all FTDI consoles will become unresponsive. Only way out is to reboot the Pi.

 

See configuration at and of post. All serial consoles are connected either directly or through generic PL2303 USB-to-serial converters to two el-cheapo USB hubs.

 

Next things to try are:

  • Check picocom, tio (prefer GNU screen, but that will only work nicely after changing serial console baudrate on Helios64 side - not preferred).
  • Try to find more hacks related to USB on the Pi.

 

Anyone have any ideas on what to check next?

 

Thanks,

Groetjes,

 

See spoilter for the setup, all Pi devices are connected via generic unbranded PL2303 USB-to-serial dongles.

Spoiler

image.png

 

Kudos to Kobol for using proper FTDI device with a serial#, that way the Pi can identify what is connected to which tty (udev to the rescue).

Spoiler

ACTION=="remove", GOTO="my-usb-serial.end"
SUBSYSTEM!="tty", GOTO="my-usb-serial.end"

ENV{ID_VENDOR_ID}=="067b", ENV{ID_MODEL_ID}=="2303", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.2.1:1.0", SYMLINK+="serial/by-name/pi2-00"        ## connected to USB hubs on pi2-03
ENV{ID_VENDOR_ID}=="067b", ENV{ID_MODEL_ID}=="2303", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.2.2:1.0", SYMLINK+="serial/by-name/pi2-01"        ## connected to USB hubs on pi2-03
ENV{ID_VENDOR_ID}=="067b", ENV{ID_MODEL_ID}=="2303", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.2.3:1.0", SYMLINK+="serial/by-name/pi2-02"        ## connected to USB hubs on pi2-03
ENV{ID_VENDOR_ID}=="067b", ENV{ID_MODEL_ID}=="2303", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.2:1.0", SYMLINK+="serial/by-name/pi2-03"          ## connected to pi2-00
ENV{ID_VENDOR_ID}=="067b", ENV{ID_MODEL_ID}=="2303", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.2.4.1:1.0", SYMLINK+="serial/by-name/spare"       ## connected to USB hubs on pi2-03
ENV{ID_VENDOR_ID}=="067b", ENV{ID_MODEL_ID}=="2303", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.3.1:1.0", SYMLINK+="serial/by-name/orangepi"      ## connected to USB hubs on pi2-03

ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6015", ENV{ID_SERIAL_SHORT}=="DT03O6AD", SYMLINK+="serial/by-name/kobol0"      ## connected to USB hubs on pi2-03
ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6015", ENV{ID_SERIAL_SHORT}=="DJ00JULE", SYMLINK+="serial/by-name/bluebox1"    ## connected to USB hubs on pi2-03
ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6015", ENV{ID_SERIAL_SHORT}=="DJ00JDCX", SYMLINK+="serial/by-name/bluebox0"    ## connected to USB hubs on pi2-03

LABEL="my-usb-serial.end"

 

Note that all devices are connected to using GNU screen (115k2 baud), but Heliso64 has to use minicom as GNU screen does not like 1500k baud. Will try other terminal emulators as soon as I find some time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines