# Using USB > Serial adapter for console output



## fishfox (Feb 23, 2019)

Hi all, I am trying to get a USB to serial adapter to be the tty used for console output.
The driver works fine and I get a /dev/ttyU0 device.
Is it possible to use this connection for the default console output for the machine?
Thanks!


----------



## Phishfry (Feb 24, 2019)

Yes add these to your /boot/loader.conf on the machine you want to use a serial console on.


```
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,vidconsole"
```

https://www.freebsd.org/doc/handbook/serialconsole-setup.html


----------



## fishfox (Feb 24, 2019)

Phishfry said:


> Yes add these to your /boot/loader.conf on the machine you want to use a serial console on.
> 
> 
> ```
> ...


This will work with a FTDI USB > serial converter?


----------



## aragats (Feb 24, 2019)

fishfox said:


> This will work with a FTDI USB > serial converter?


FTDI driver is separate module, so you will have to load it. Add to /boot/loader.conf:
	
	



```
uftdi_load="YES"
```


----------



## Phishfry (Feb 24, 2019)

That should only be needed on the machine with a serial-usb adapter and a screen connected. Your 'host'.
Not the serial console computer ('client')you are trying to connect to.
The 'client'  needs the above serial console settings from the handbook.


----------



## obsigna (Feb 24, 2019)

In addition to what have been said already by Phishfry and aragats, you need to take care regarding the difference of a USB to serial converter which follows the RS-232 specs, i.e. the logic levels are +12 Volt to -12 Volt and most of the FTDI thingies which are operating on TTL levels which can usually be switched to either +3.3 Volt or to +5 Volt.

You use the FTDI-RS232-TTL converters for connecting to the serial console of many of the modern ARM devices. Do not connect these converters to real RS-232 serial ports which operate at much higher voltages. In the best case 12 V won’t harm your 3.3 V converter. In the worst case the converter might be damaged.

PS: Divination is fun, but usually does not give the most conclusive results. Why don’t you simply start over again, and explain to us, which device(s) do you want to connect to the serial terminals of your FTDI converter. AND, inform the respective (serial) specs of both, the converter and the device.

PPS: Ahh..., DO NOT connect the 3.3 V TTL serial terminals of an ARM device to a real RS-232 +/-12 V serial port.


----------



## Phishfry (Feb 24, 2019)

On top of all this the FTDI are some of the most faked chips out there.
If you did not buy from a reputable seller (not Amazon) then it is probably fake.<<<MY OPINION>








						Fixing Fake FTDIs
					

If you know where to go on the Internet, you can pick up an FTDI USB to Serial adapter for one dollar and sixty-seven cents, with free shipping worldwide. The chip on this board is an FTDI FT232RL,…




					hackaday.com
				




Prolific PL2303 is what I use for my Arm boards after dealing with Ebay fake FTDI's
The real FDTI sell for >$12USD, the fakes are much much less.


----------



## fishfox (Feb 24, 2019)

Phishfry said:


> That should only be needed on the machine with a serial-usb adapter and a screen connected. Your 'host'.
> Not the serial console computer ('client')you are trying to connect to.
> The 'client'  needs the above serial console settings from the handbook.


To be clear, the client AND the host are both using FTDI USB adapters (with a null modem between them).


----------



## Phishfry (Feb 24, 2019)

aragats is probably right looking closer at your question.
You might need that line on the serial console machine depending on your cable arrangement.


----------



## obsigna (Feb 24, 2019)

On the client side (the serial console computer) have a look at /etc/ttys, and add an entry for /dev/ttyU0 (or whatever device identifier has been attributed to the USB-FTDI device). You want to take the entry of /dev/ttyu0 (small letter ‚u‘) as a template.

Then restart the box.

On the host machine (the one which is the terminal of the serial console), you would enter the following command:
`cu -s 115200 -l /dev/ttyU0`, then 2times enter and you should see the login prompt.


----------

