Accessing serial port from TinyX
Ping Cheng
pinglinux at gmail.com
Thu Jan 21 22:26:04 PST 2010
I still need more suggestions since the problem is still there.
Please share your serial device hacking experience on embedded system
with me if you have any.
Ping
On Wed, Jan 20, 2010 at 7:15 PM, Greg KH <greg at kroah.com> wrote:
> On Wed, Jan 20, 2010 at 05:53:43PM -0800, Ping Cheng wrote:
>> This may not be the proper list to post a TinyX question. But I see a
>> few names in the source that are members of X.Org now. It should be a
>> simple one for those who worked on the code.
>>
>> I am trying to let my driver communicate with a serial device
>> (specifically, a Wacom serial device). This device works with my X.Org
>> driver, which uses xf86SerialOpen and other related xf86 serial calls
>> to communicate with the device. However, TinyX doesn't support those
>> calls. So, I have to "hack" into the original ones. The driver always
>> fails at the tcsetattr() call with errno=25. Man page tells me:
>> ENOTTY Inapporatriate fd.
>>
>> What does this mean to me? How do I fix it? Or at least, how do I
>> trace into the problem.
>
> That means that you tried to do a tty ioctl on a non-tty device node.
I know what the error message means. But I don't understand why I get
that message. The port I opened is a Wacom device and I can see the
raw data coming out by "cat /dev/ttyS1" when I touch the device inside
tinyx. I feel it might be a setup or configuration issue somewhere.
But where?
> Perhaps you are not opening the correct device?
I hard coded the port in the driver for testing purpose. I am lost in
that tiny world now.
More information about the xorg-devel
mailing list