There are a number of recovery methods depending on the Make/Model of your router. A good resource is the OpenWRT project:Any suggestions on what to look out for in buying a USB to RS232 connector?
I've just bricked a router and someone suggested I may be able to see what is going on if I can set up a serial connection.
Actually it was in the process of trying to install OpenWrt on this router, a Teltonika RUT 955, that I bricked it.There are a number of recovery methods depending on the Make/Model of your router. A good resource is the OpenWRT project:
General OpenWRT user guide
Specific OpenWRT Recovery Methods
According to their wiki the serial port is real RS-232, which means that usual 5V and 3.3V TTL USB adapters may not work.this router, a Teltonika RUT 955
How can I tell which ones would work? (Using FreeBSD)According to their wiki the serial port is real RS-232, which means that usual 5V and 3.3V TTL USB adapters may not work.
Many thanks, I'll order one of these.As kpedersen mentioned above, those chipsets work out of the box with FreeBSD. Personally I have dealt with FTDI and Prolfic.
E.g. this one is based on PL2303 (Prolific). "RS-232" should be in the title, not just "Serial" or "UART", and no TTL or 3.3V or 5V should be mentioned in the description. By the way, UGREEN in my link is a noteworthy brand, but there are many others.
Bus /dev/usb Device /dev/ugen1.2: ID 067b:23a3 Prolific Technology, Inc. ATEN Serial Bridge
$ cu -l /dev/ttyU0 -s 9600I use them here. They're great for connecting to serial consoles -- my servers in my basement are serial connected.Any suggestions on what to look out for in buying a USB to RS232 connector?
I've just bricked a router and someone suggested I may be able to see what is going on if I can set up a serial connection.
I'm just looking to see which method I should use....There are a number of recovery methods depending on the Make/Model of your router. A good resource is the OpenWRT project:
General OpenWRT user guide
Specific OpenWRT Recovery Methods
ISTR something about using something like /dev/cuaU0sysutils/screen can also be used. It is simple to use, just screen device speed, example screen /dev/ttyU0 115200 for example.
root@W520:~ $ ls -al /dev/cuaU*
crw-rw---- 1 uucp dialer 0x1cb Nov 23 21:41 /dev/cuaU0
crw-rw---- 1 uucp dialer 0x1cc Nov 23 21:41 /dev/cuaU0.init
crw-rw---- 1 uucp dialer 0x1cd Nov 23 21:41 /dev/cuaU0.lock
crw-rw---- 1 uucp dialer 0x1d1 Nov 23 21:41 /dev/cuaU1
crw-rw---- 1 uucp dialer 0x1d2 Nov 23 21:41 /dev/cuaU1.init
crw-rw---- 1 uucp dialer 0x1d3 Nov 23 21:41 /dev/cuaU1.lock
crw-rw---- 1 uucp dialer 0x1d7 Nov 23 21:41 /dev/cuaU2
crw-rw---- 1 uucp dialer 0x1d8 Nov 23 21:41 /dev/cuaU2.init
crw-rw---- 1 uucp dialer 0x1d9 Nov 23 21:41 /dev/cuaU2.lock
root@W520:~ $
How do I know which of the /dev/cuaU* devices is the one that my cable is connected to?yes, usb serial devices are both /dev/cuaUn and /dev/ttyUn at the same time. As long as you have the correct rights (ownership / group membership and devd rules fixes that) you can use whichever of the two you want.
root@W520:/dev $ cu -l /dev/cuaU3 -s 9600
Connected
I'm not sure what you're telling me.pwd ; mkdir ~/test ; cd ~/test
dmesg | grep -i cua or dmesg | grep -i tty or ls /dev | grep -i cua
cu -l /dev/cuaU3 -s 115200 # what speed does your bricked router use for the TTL serial port speed? Could it be 500K speed or 4800 speed or others used different speeds. Whats your router documentation say?
USB Serial 3.3V TTL connection examples
SCP copy a file through SSH from an embedded computer
Hope this answers your questions, Balanga. Ask more with details
sudo cu -s 115200 -l /dev/ttyU1 # use what works for your hardware and O/S
dmesg | grep -i cua
You can use ttyname for that. Examples:How do I know which of the /dev/cuaU* devices is the one that my cable is connected to?
root@kg-core1# sysctl dev.uftdi.1.ttyname
dev.uftdi.1.ttyname: U1
root@kg-core2:~ # sysctl dev.uslcom.0.ttyname
dev.uslcom.0.ttyname: U0
root@kg-core1# sysctl dev.uchcom.0.ttyname
dev.uchcom.0.ttyname: U1
root@kg-core2:~ # sysctl dev.umodem.0.ttyname
dev.umodem.0.ttyname: U0
It will say "Connected" if the serial device (/dev/cuaU3 in your case) can be opened -- it tells you nothing about whether this is the device the adapter is attached to, whether the speed setting is correct, or whether the serial/USB adapter is correctly configured for the voltage of the serial connection.I change -s to 115200 and get a 'Connected' response but have no idea what this means and whether I should expect some response.