ucom driver, device/tty problems for new driver

SAMUEL ISAAC LAWRANCE samuel.lawrance at studentmail.newcastle.edu.au
Sat Jun 21 02:35:27 PDT 2003


Hi,

I'm a kernel-internals newbie in the middle of creating a serial over usb
driver to connect Pocket PCs to FreeBSD.

Presently the driver works, although I'm trying to figure out some behaviour
regarding the ucom tty device that I don't understand.

The driver is ucom-based. All it does is fire of a couple of 'magic' requests
to the Pocket PC to kick off serial mode. After that everything coming in and 
going out of the pipes is all data, so ucom is able to handle the rest.
I've done enough debugging to know that the ucom driver is handing off
incoming data to its tty correctly.

The problem:
The first thing that should come out of ucom0 when it is opened is the string
'CLIENT'. This happens correctly when I open the device with userlevel ppp.
In fact once user ppp opens the device it does everything I want it to.

It fails however if I do a 'cat /dev/ucom0' or 'cu -l /dev/ucom0'.
Using either of these commands, I can see the ucom driver giving the data
to the tty; but nothing shows up at the user end.

I'm wondering whether I should be setting some sort of state on the
ucom tty to 'make it go'. PPP must do something to it, but I just can't
figure out what.

Any help appreciated.
Cheers,
Sam Lawrance.




More information about the freebsd-hackers mailing list