CH341 driver

balanga

Son of Beastie

Reaction score: 137
Messages: 3,059

I have a couple of USB to serial adapters which when plugged in show that CH341 has been detected. I use one of these adapters which has an RS232 DB9 plug to connect to an X10 unit. When I use this adapter on Linux it talks to the unit but on FreeBSD it doesn't. Presumably the driver for these devices is built into the kernel since I didn't to install it. Where would I find the source for the driver? I'm wondering if there could be any Linuxisms which make it work differently on FreeBSD.

It has been suggested that I get a different adapter, ie one which uses an FDTI chip. Would that use a different driver?
 
OP
OP
B

balanga

Son of Beastie

Reaction score: 137
Messages: 3,059

On further rummaging I see that support for this device is provided by uchcom().

It says specifically that you need to load it at boot time, which I didn't. It also says what needs to be done to compile it into the kernel, but there is no indication that it is already included, although it must be.

It also says:-
BUGS
Actually, this chip seems unable to drive other than 8 data bits and 1
stop bit line.
Not exactly sure what that means but maybe this bug stops my USB serial adapter working.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,684
Messages: 30,622

The explanation is right here:
Code:
 Alternatively, to load the	driver as a module at boot time, place the
     following line in loader.conf(5):

	   uchcom_load="YES"
Not exactly sure what that means but maybe this bug stops my USB serial adapter working.
No, this only refers to the serial protocol used, not how you drive it from software. No parity, 8 data bits and 1 stop bit is fairly common, most serial communication happens with those settings.
https://en.wikipedia.org/wiki/8-N-1
 
OP
OP
B

balanga

Son of Beastie

Reaction score: 137
Messages: 3,059

From what I'm told I need a USB serial adapter which use an FTDI chip.... Presumably when that is inserted I would see a msg such as
uftdi0: FTDI detected
... I'm guessing here.

If that is the case then would one of these do? And how would I connect it to a DB9 plug? Maybe using this ...
 
Top