Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB null modem serial console?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pgu
Guru
Guru


Joined: 30 Jul 2009
Posts: 594
Location: Oslo, Norway

PostPosted: Sat May 05, 2018 7:19 am    Post subject: USB null modem serial console? Reply with quote

My new lab bench motherboard does not seem to have any internal serial ports.
But is it possible to attach a serial console using an USB null modem cable like this?

http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_USBNMC.pdf

Is it suppored in grub2 and the kernel so I get the grub2 menu and the kernel logs out on the serial port?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 05, 2018 10:39 am    Post subject: Reply with quote

pgu,

USB is started very late in the boot process. After root is mounted in fact. So you won't export the console until that time.
Its no a new problem though.

There are various ways around it in the kernel.
Code:
  │ │    [ ] Remote debugging over FireWire early on boot
...
  │ │    [*] Early printk                                                  │ │ 
  │ │    [ ]   Early printk via EHCI debug port                            │ │ 
  │ │    [ ]   Early printk via the xHCI debug port

Read the help ... they all seem to be ugly.

There is also the Network Console.

If you want to export the console over serial and you need the very start, you need a real serial port to do it.

What motherboard do you have?
_________________
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
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5956

PostPosted: Sat May 05, 2018 2:23 pm    Post subject: Reply with quote

If it's UEFI, it's possible to make the kernel write the entire dmesg buffer to efivars pstore where it can be read back later from a different kernel or livecd.
Back to top
View user's profile Send private message
pgu
Guru
Guru


Joined: 30 Jul 2009
Posts: 594
Location: Oslo, Norway

PostPosted: Sun May 06, 2018 7:22 am    Post subject: Reply with quote

Thank you for your replies.

I would assume the support would have to be built into Grub2 even before the kernel is loaded if I should be able to access the boot menu.

It seems like there is support for ftdi serial devices in the grub source:

http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/bus/usb/serial/ftdi.c

This is my motherboard:
https://www.gigabyte.com/Motherboard/GA-H270N-WIFI-rev-10#kf


I use the system for a FPGA/driver design and there will be kernel crashes. Being able to select kernel in grub via serial would be helpful. Also having the kernel messages output to the serial console right before the crash would also be helpful.

I was also thinking about using a Raspberry Pi as a terminal server as I have an FTDI adapter for the Pi. But the PC does not seem to be able to detect it:

Code:
[  755.433161] usb 1-1-port3: Cannot enable. Maybe the USB cable is bad?
[  755.434631] usb 1-1-port3: attempt power cycle
[  756.593357] usb 1-1-port3: Cannot enable. Maybe the USB cable is bad?
[  757.441205] usb 1-1-port3: Cannot enable. Maybe the USB cable is bad?
[  757.442678] usb 1-1-port3: unable to enumerate USB device

whereas on my desktop PC (NUC) it's detected:

Code:
[2772211.572578] ftdi_sio 1-2.2:1.0: FTDI USB Serial Device converter detected
[2772211.572604] usb 1-2.2: Detected FT232RL
[2772211.572946] usb 1-2.2: FTDI USB Serial Device converter now attached to ttyUSB0

Code:
< Bus 001 Device 114: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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