OPNsense Forum

English Forums => General Discussion => Topic started by: lenny on January 03, 2020, 07:29:00 am

Title: Serial Console not working
Post by: lenny on January 03, 2020, 07:29:00 am
hi everyone, i use the nano image. My firewall hardware has two RS232 interfaces. I previously ran IPFIRE. the serial console worked there. Not since switching to OPN. In the WebGUI it is active on 115200. I also entered this in PUtty. (everything is like ipfire ...) only nothing is shown to me. Can someone help me?
Title: Re: Serial Console not working
Post by: lenny on January 09, 2020, 11:42:22 am
nothing idea :(
Title: Re: Serial Console not working
Post by: franco on January 09, 2020, 02:21:13 pm
What hardware is this? It may be a driver / hw quirk issue.
Title: Re: Serial Console not working
Post by: lenny on January 09, 2020, 02:49:57 pm
its "noname" from Ali...

but, serial rs232 with this hardware and ipfire work great.
the difference: ipfire is linux

i tried differance options, with vt and without. enable usb driver. nothing. :(
Title: Re: Serial Console not working
Post by: lenny on January 29, 2020, 07:38:36 am
in the ntp setting under gps, it shows the rs232 interfaces.
so i think there is no driver problem.
where can you start?
Title: Re: Serial Console not working
Post by: miroco on January 29, 2020, 05:33:59 pm
Could this be it? A serial cable versus a null modem cable?

IPFire
https://wiki.ipfire.org/installation/serial

OPNsense
https://docs.opnsense.org/manual/how-tos/serial_access.html
Title: Re: Serial Console not working
Post by: franco on January 30, 2020, 07:12:46 am
I'm not aware this is something different. But it's true that a functional serial cable is a requirement. Some people had bad luck with low quality or building one from spare wires (I kid you not, someone had issues and when they sent a picture it was clear why).

What could also be is that the ports are not enabled by default in the OS and need some hardware tweak to be found. Look for your firewall's hardware serial console topics within FreeBSD.


Cheers,
Franco
Title: Re: Serial Console not working
Post by: lenny on January 30, 2020, 07:47:48 am
Oh no...  ;D
Maybe its so easy.
i will test it, thank you!

i used a Checkpoint Serial Cable with Alcatel Lucent Adapter (RJ45 to rs232) this works wth ipfire great.

But a null modem cable is crossing. its a good idea from miroco
Title: Re: Serial Console not working
Post by: lenny on February 27, 2020, 02:17:15 pm
So, had test it.
ipfire need null-modem cable too. - if the connection is from a PC to the aplliance
so i buy a new null-modem cable and test the connection von version 19.7 - sincerly doesnt worked...

the new cable works with ipfire great.
Title: Re: Serial Console not working
Post by: cioby23 on August 21, 2020, 10:40:07 am
Hello,

I have a similar issue. I have this mini PC https://ae01.alicdn.com/kf/H8870d53ce16d49ca8cb9795c717d0e7az.jpg on which I'm running OPNsense 20.7.1.

I want to access it over the serial COM 1 port and I have bought an USB to RJ45 console cable https://www.aliexpress.com/item/4000274169804.html?spm=a2g0s.9042311.0.0.785a4c4dzsp4wF and I tried to connect to it from Linux and Windows using minicom, picocom, screen, PuTTY and the connection is established but I cannot see anything on the console.

On both PC Windows and Linux PC I see the driver for this console cable is installed CH341.

On OPNsense GUI I have enabled the serial console, set speed 115200, checked also the Use USB-based serial ports option and set serial and primary console and VGA as secondary.

Does anyone know if this type of cable is not compatible and should I buy something else or I am doing something wrong ? Any recommendation ?

Thanks,
Title: Re: Serial Console not working
Post by: marjohn56 on August 21, 2020, 04:58:18 pm
Usual way to test the serial adaptor cable is OK is to short the tx/rx pins ( not easy with an RJ45 ) and enter some data in putty, you should see the data come straight back  to you. You'd need to check the serial chip in mini pc and then see if there is a driver for it in  FreeBSD.
Title: Re: Serial Console not working
Post by: cioby23 on August 22, 2020, 03:48:57 pm
Usual way to test the serial adaptor cable is OK is to short the tx/rx pins ( not easy with an RJ45 ) and enter some data in putty, you should see the data come straight back  to you. You'd need to check the serial chip in mini pc and then see if there is a driver for it in  FreeBSD.


I have tried to manually short the RX/TX pins on the RJ-45 side of the cable and I only see some strange characters automatically being typed after I shortens these 2 pins Rx pin 2 and TX pin 3. I have checked this diagram for CH340 which I assume is correct https://wiki.kewl.org/dokuwiki/interfaces:ch340g
Inside OPNsense in dmesg output I see

Code: [Select]
cat /var/log/dmesg.today | grep uart
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (115200,n,8,1)

I also manually loaded in OPNsense the uchcom driver for this cable but still does not work.
I assume it might be an incompatibility or a driver issue.
Title: Re: Serial Console not working
Post by: marjohn56 on August 22, 2020, 04:27:27 pm

Read  this about the adaptor you bought.

https://unix.stackexchange.com/questions/189896/testing-qinheng-electronics-hl-340-usb-serial-adapter (https://unix.stackexchange.com/questions/189896/testing-qinheng-electronics-hl-340-usb-serial-adapter)


The mini PC you have also appears to have a standard D9 serial port, just get a standard USB to serial adaptor. If you post the model number of the mini PC I can try and do a bit more research,


I recommend these:
 https://www.amazon.co.uk/UGREEN-20210-Converter-Connecting-Controller-grey/dp/B00QUZY4UG/ref=sr_1_1_sspa?dchild=1&keywords=ugreen+usb+to+9+pin+serial+female&qid=1598106118&s=computers&sr=1-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzRlc1RlBHVFEwSzZIJmVuY3J5cHRlZElkPUEwODYwMDY5OVpUTUZYUEsyODBWJmVuY3J5cHRlZEFkSWQ9QTA1MzE2NTQxQU1BQTZINVlMOE1aJndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ== (https://www.amazon.co.uk/UGREEN-20210-Converter-Connecting-Controller-grey/dp/B00QUZY4UG/ref=sr_1_1_sspa?dchild=1&keywords=ugreen+usb+to+9+pin+serial+female&qid=1598106118&s=computers&sr=1-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzRlc1RlBHVFEwSzZIJmVuY3J5cHRlZElkPUEwODYwMDY5OVpUTUZYUEsyODBWJmVuY3J5cHRlZEFkSWQ9QTA1MzE2NTQxQU1BQTZINVlMOE1aJndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==)
but you'll also need a null modem adaptor. It's probably what the uart0: is for, standard serial, rather than the console port.
Title: Re: Serial Console not working
Post by: Setyorm69 on August 22, 2020, 05:47:12 pm
What could also be is that the ports are not enabled by default in the OS and need some hardware tweak to be
ผลบอลสด7m (https://7m.live/)
 found. Look for your firewall's hardware serial console topics within FreeBSD.
Title: Re: Serial Console not working
Post by: cioby23 on August 22, 2020, 09:31:26 pm
This is my mini PC on which i'm running OPNsense https://www.aliexpress.com/item/4000627539297.html

Indeed I have a secondary COM 2 port which is DB-9 but the UGREEN USB to RS232, USB Serial Cable DB9 is not good for me since the second COM port is male DB-9 so I need a female DB-9 ending on the other side similar to this one https://www.aliexpress.com/item/32922249681.html?spm=a2g0o.cart.0.0.7c4e3c00k6MeLi&mp=1

I also heard that Ugreen has very good products and I also was looking at this https://www.ugreen.com/products/usb-2-0-to-rj45-console-cable which uses the well known FTDI chip instead of CH340. I have asked them if this cable can be used as null modem and I'm waiting for an answer from them.

Thanks for support
Title: Re: Serial Console not working
Post by: marjohn56 on August 23, 2020, 08:30:35 am
This is my mini PC on which i'm running OPNsense https://www.aliexpress.com/item/4000627539297.html (https://www.aliexpress.com/item/4000627539297.html)

Indeed I have a secondary COM 2 port which is DB-9 but the UGREEN USB to RS232, USB Serial Cable DB9 is not good for me since the second COM port is male DB-9 so I need a female DB-9 ending on the other side similar to this one https://www.aliexpress.com/item/32922249681.html?spm=a2g0o.cart.0.0.7c4e3c00k6MeLi&mp=1 (https://www.aliexpress.com/item/32922249681.html?spm=a2g0o.cart.0.0.7c4e3c00k6MeLi&mp=1)

I also heard that Ugreen has very good products and I also was looking at this https://www.ugreen.com/products/usb-2-0-to-rj45-console-cable (https://www.ugreen.com/products/usb-2-0-to-rj45-console-cable) which uses the well known FTDI chip instead of CH340. I have asked them if this cable can be used as null modem and I'm waiting for an answer from them.

Thanks for support


Just get the usb to serial adaptor and a null modem cable or adaptor too.. one of these:


https://www.amazon.co.uk/C2G-Female-Computer-Serial-Extension-Black/dp/B002DEM02M/ref=sr_1_1_sspa?crid=1SULR20IYFB6B&dchild=1&keywords=null+modem+cable&qid=1598164130&sprefix=null+modem%2Caps%2C133&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExRUtWTkRMUEhYNVFMJmVuY3J5cHRlZElkPUEwNDg2MDgwMzdZVlZIUk5WQlk2SyZlbmNyeXB0ZWRBZElkPUEwNDMwMDAwMTM0SzJEQ0FMR1lIOSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU= (https://www.amazon.co.uk/C2G-Female-Computer-Serial-Extension-Black/dp/B002DEM02M/ref=sr_1_1_sspa?crid=1SULR20IYFB6B&dchild=1&keywords=null+modem+cable&qid=1598164130&sprefix=null+modem%2Caps%2C133&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExRUtWTkRMUEhYNVFMJmVuY3J5cHRlZElkPUEwNDg2MDgwMzdZVlZIUk5WQlk2SyZlbmNyeXB0ZWRBZElkPUEwNDMwMDAwMTM0SzJEQ0FMR1lIOSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=)


or one of these

https://www.amazon.co.uk/StarTech-com-NM9FF-RS232-Serial-Adapter-White/dp/B000DZH4V0/ref=sr_1_4?crid=3VY2TGNMEH5NO&dchild=1&keywords=null+modem+adapter&qid=1598164252&sprefix=null+modem+%2Caps%2C139&sr=8-4 (https://www.amazon.co.uk/StarTech-com-NM9FF-RS232-Serial-Adapter-White/dp/B000DZH4V0/ref=sr_1_4?crid=3VY2TGNMEH5NO&dchild=1&keywords=null+modem+adapter&qid=1598164252&sprefix=null+modem+%2Caps%2C139&sr=8-4)

Always useful.