Hi,
I use this code to read from serial device:
fd = open("/dev/ttyS2", O_RDWR | O_NOCTTY | O_NDELAY);
Could you help me about how this is when reading USB devices?
Thanks...
Hi,
I use this code to read from serial device:
fd = open("/dev/ttyS2", O_RDWR | O_NOCTTY | O_NDELAY);
Could you help me about how this is when reading USB devices?
Thanks...
What is the device installed as (perhaps /dev/usb/xxx?) - once you know that, you should be able to read it. Obviously, the NEXT problem is to make sense out of what you read, which may or may not be easy. What USB device is it?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Firstly, I have these problems:
1.I have a USB mouse and want to read data on it.
2.I have a USB keyboard and want it to connect to my computer, although I connect but automatically, data which I sent to PC is seen on screen as keyboard actions, so ASCII characters. What I mean that, when I want to connect USB keyboard on an embedded computer how can I use it? Thanks...
And I will use Linux 2.6.21 and higher.
Last edited by yildiz.a; 04-28-2009 at 06:45 AM. Reason: syntax error
I'm pretty sure that if you enable USB in your Linux Kernel, it will work with your USB mouse and USB keyboard.
Note the keyboard output from the USB is NOT straightforward ASCII codes. The USB mouse will probably send packets that resemble what you'd get from a serial mouse - but not necessarily THE SAME as a serial mouse.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.