[clug] device driver writing to serial port

Jepri jepri at webone.com.au
Fri Mar 5 07:27:34 GMT 2004


caloykoy_one at pacific.net.ph wrote:

>guys i'm really sorry if i only got to mail now. i'm caloy, the one
>inquiring about device 
>drivers for my project for the rv-m1 robot arm. 
>  
>

No worries.  The net is like that.

> 
>may i ask how a device driver can write to the serial port? my device
>driver needs to 
>access/write data to the serial port, how would i go about that? 
>  
>
If you are planning on hooking it up to the serial port, there might be 
an easier way than writing a kernel device driver.   The linux-y way to 
do it so other programs can give commands to your robot arm is:

1) write a library that will print out the right commands for the serial 
port
2) write a little command line program to access the library so users 
can type e.g.

jepri at luciole:~$ command_robot "flex 30" > /dev/ttyS0

This is just one of many ways, but it is how I would (and have in the 
past) approached the issue of controlling serial port devices.


> 
>i haven't had sufficient sleep lately, so apologies for this rather
>straightforward mail or (if 
>it reflected) a sort of mood that's not really good. sorry for that. 
>  
>

Well, I hope that helps a bit.


More information about the linux mailing list