Activate the serial console on my mini pc

Continuing the discussion from Activate the serial console:


I would like to activate the serial console on my machine.
Unfortunately, I am using a mini pc, so I cannot remove the video card and had to install a USB serial port.
I followed this procedure and tried with both straight and cross cable.
I could not get it to work. Where did I go wrong?
Here is my machine and the prolific USB card installed…

https://fireinfo.ipfire.org/profile/3402a2969f610247cadd6eea109917521f3d8410

Thank you in advance.

This kind of hardware should need a device driver. Is the driver available in a standard Linux kernel? If yes, Is it compiled in IPFire kernel? Keep in mind that It is possible that the board has a serial port header. Many mini-ITX motherboards still harbor a 9 pins serial header.
54d4de2095f5c3.23002064
I am not sure about these mini-pc though. Not a hardware expert. If the header exists, you would need to modify the case, but you could connect a cable from the header to a DB9 port and have a native serial port.

1 Like

I thank you for the diligent response.
I doubt if there are specific drivers for IPFire for my seiale prolific card I am using, although under linux, it should work.
My mini-pc is not modifiable. I can’t even expand the RAM. I don’t think it is set up for a “natural” serial port.
The alternative is to buy another IPFire-compatible USB serial port, but what do I buy?
From what you tell me, I think there is no other solution.

I know this pattern. However, I can try to open it. I hope the serial port I see is present.

try to see the output of the dmesg command to see if you get something like this

I checked on my IPFire:

[root@ipfire cfusco]# modprobe pl2303
[root@ipfire cfusco]# lsmod | grep pl2303
pl2303                 28672  0
usbserial              65536  1 pl2303

the driver is available. It should work.

1 Like

I have the same results. I couldn’t get it to work anyway, though.

What do you get with dmesg | grep tty?

nothing…

[root@ipfire ~]# dmesg | grep tty
[root@ipfire ~]#

I went back to the “original graphics” condition, though. I did the reverse operation, canceling the serial. Does that have anything to do with it?

Plug the hardware, issue modprobe pl2303 and then dmesg | grep tty, still nothing? Can you also check ls /dev/ttyUSB*?

EDIT: To clarify, all this in a working IPFire installation
EDIT2: also check lsusb and see if you have any message concerning USB to serial adapter

1 Like

Prolific hardware connected…

[root@ipfire ~]# modprobe pl2303
[root@ipfire ~]# dmesg | grep tty
[root@ipfire ~]#

Yes, Currently IPFire works and I can access the console either via HDMI cable or via Putty (IP Addressing).

file /dev/ttyUSB0 void

Is the file there? Don’t look at the size, just its presence. Next, please reboot with the hardware plugged in. Then post the output of lsmod and lsusb.

Yes. The file is present. I’ll proceed with restarting IPFire and update you…

[root@ipfire ~]# lsmod
Module                  Size  Used by
nfsv3                  57344  1
rpcsec_gss_krb5        32768  0
nfsv4                 995328  0
nfs                   483328  3 nfsv4,nfsv3
fscache               376832  1 nfs
netfs                  57344  1 fscache
snd_pcm_oss            69632  0
snd_mixer_oss          28672  1 snd_pcm_oss
nfsd                  651264  3
auth_rpcgss           155648  2 nfsd,rpcsec_gss_krb5
nfs_acl                16384  2 nfsd,nfsv3
lockd                 114688  3 nfsd,nfsv3,nfs
grace                  16384  2 nfsd,lockd
sunrpc                663552  22 nfsd,nfsv4,auth_rpcgss,lockd,nfsv3,rpcsec_gss_krb5,nfs_acl,nfs
tun                    61440  2
xt_REDIRECT            20480  1
xt_MASQUERADE          20480  1
xt_set                 20480  39
ip_set_hash_net        53248  18
xt_multiport           20480  20
ip_set                 61440  2 xt_set,ip_set_hash_net
xt_hashlimit           20480  2
xt_mac                 16384  157
xt_policy              16384  5
xt_TCPMSS              16384  1
xt_conntrack           16384  7
xt_comment             16384  14
ipt_REJECT             16384  5
nf_reject_ipv4         16384  1 ipt_REJECT
xt_LOG                 20480  94
xt_limit               16384  92
xt_mark                16384  48
xt_connmark            16384  2
nf_log_syslog          24576  94
iptable_raw            16384  0
iptable_mangle         16384  1
iptable_filter         16384  1
vfat                   24576  1
fat                    90112  1 vfat
snd_hda_codec_hdmi     81920  0
r8153_ecm              16384  0
snd_hda_codec_realtek   176128  1
cdc_ether              24576  1 r8153_ecm
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
ledtrig_audio          16384  1 snd_hda_codec_generic
i2c_algo_bit           16384  0
sch_cake               40960  4
fb_sys_fops            16384  0
syscopyarea            16384  0
sysfillrect            16384  0
sysimgblt              16384  0
intel_powerclamp       20480  0
snd_hda_intel          57344  0
coretemp               20480  0
snd_intel_dspcfg       20480  1 snd_hda_intel
kvm_intel             376832  0
snd_hda_codec         180224  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
pl2303                 28672  0
kvm                  1126400  1 kvm_intel
intel_xhci_usb_role_switch    16384  0
usbserial              65536  1 pl2303
roles                  20480  1 intel_xhci_usb_role_switch
snd_hda_core          122880  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
iTCO_wdt               16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
r8152                 131072  1 r8153_ecm
snd_hwdep              16384  1 snd_hda_codec
irqbypass              16384  1 kvm
snd_pcm               184320  5 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_pcm_oss,snd_hda_core
processor_thermal_device_pci_legacy    16384  0
snd_timer              40960  1 snd_pcm
processor_thermal_device    20480  1 processor_thermal_device_pci_legacy
i2c_i801               36864  0
pcspkr                 16384  0
r8169                  94208  0
snd                   126976  10 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm_oss,snd_pcm,snd_mixer_oss
processor_thermal_rfim    16384  1 processor_thermal_device
lpc_ich                28672  0
realtek                36864  1
i2c_smbus              20480  1 i2c_i801
soundcore              16384  1 snd
processor_thermal_mbox    16384  2 processor_thermal_rfim,processor_thermal_device
mfd_core               20480  1 lpc_ich
i2c_designware_platform    20480  0
intel_soc_dts_iosf     20480  1 processor_thermal_device_pci_legacy
i2c_designware_core    36864  1 i2c_designware_platform
i2c_core              114688  5 i2c_designware_platform,i2c_designware_core,i2c_algo_bit,i2c_smbus,i2c_i801
dw_dmac                16384  0
int3400_thermal        20480  0
int3403_thermal        20480  0
int3406_thermal        16384  0
acpi_thermal_rel       16384  1 int3400_thermal
int340x_thermal_zone    20480  2 int3403_thermal,processor_thermal_device
intel_int0002_vgpio    16384  1
ax88179_178a           36864  0
usbnet                 57344  3 r8153_ecm,cdc_ether,ax88179_178a
mii                    16384  3 usbnet,r8152,ax88179_178a
efivarfs               24576  1
crct10dif_pclmul       16384  1
crc32_pclmul           16384  0
polyval_generic        16384  0
ghash_clmulni_intel    16384  0
mmc_block              53248  5
video                  65536  1 int3406_thermal
sha512_ssse3           49152  0
sdhci_acpi             28672  0
wmi                    36864  1 video
sdhci                  81920  1 sdhci_acpi
mmc_core              208896  3 sdhci,mmc_block,sdhci_acpi
pinctrl_cherryview     49152  3
dm_mirror              28672  0
dm_region_hash         24576  1 dm_mirror
dm_log                 20480  2 dm_region_hash,dm_mirror
dm_mod                167936  2 dm_log,dm_mirror




[root@ipfire ~]# lsusb
Bus 002 Device 004: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 001 Device 003: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 001 Device 004: ID 067b:23a3 Prolific Technology, Inc. USB-Serial Controller
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@ipfire ~]#

The serial/hdmi “console switching,” is it automatic or do you have to configure IPFire with special commands?

As I see, it seems to me that IPFire sees the driver without any problems.

I suspect that IPFire, switches to the HDMI port excluding the serial console.

I agree.

there is a specific menu choice for the console install. Look for the instructions of the APU1 or 2 in the forum and you should see some screenshot. Otherwise you can follow the instructions from @arne_f in the original thread to activate it after the install. You need to change grub configuration file according to his suggestion (be careful to use /dev/ttyUSB0 as the device) and rebuild the boot loader. Message me if you need assistance. I do not have a lot of time but I can try to help.

2 Likes

Yes, I had already tried that procedure.
Subsequently, I had replaced console=ttyS0 with console=ttyUSB0.
I found myself in an extreme condition: my IPFire would no longer start.
I preferred to reinstall the whole system. I had the backup ready and in about 15 minutes solved everything.
I just tried again in a virtual machine. This time, I replaced console=ttyS0 with console=/dev/ttyUSB0: SAME PROBLEM.
Here is what happens to IPFire at boot time, after applying that procedure (ttyUSB0)…
Immagine

try ttyUSB0 without /dev

console=ttyUSB0
already tried at the start. Same problem.

did you rebuild the boot loader after changing the configuration of grub?

grub-mkconfig -o /boot/grub/grub.cfg
1 Like

Yes, from terminal I launched…
/usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg

With console=ttyS0 no problem at startup. But neither serial nor hdmi works. In my case.

Your terminal connected to the minipc is a laptop running PuTTY? If yes, do you have a correct configuration? In particular:

  1. Specify the serial line to which your device is connected (e.g., COM1, COM2, etc.).
  2. Set the baud rate to 115200, which is the speed specified in the GRUB_SERIAL_COMMAND line.
  3. Make sure the Data bits are set to 8, as indicated by 115200n8 in the console=ttyS0,115200n8 line.
  4. Set the Stop bits to 1, as the 115200n8 notation implies.
  5. Set the Parity to None, as there is no parity specified in the console=ttyS0,115200n8 line.

EDIT, this should boot though, regardless whether the connection is correct.

Yes, I think I have carried out what I said correctly.

Indeed, I do not explain the extreme condition. Yet I think I performed the steps to the letter.