It would help if you post the code and the invocation of the component on 
pastebin.com


what you would want to do is:
- pass the device *name* as an command line argument to the component
- open the device 
- use the resulting *file descriptor*

for examples how to pass command line arguments in a C userspace component, see 
the drivers in src/hal/user_comps

what exactly is a 'socket server'?

-m


Am 04.07.2012 um 18:22 schrieb Schooner:

> Hi
> I have been playing with a C userspace component to pass values from 
> Linuxcnc to an arduino for display on a pendant LCD.
> 
> The code works perfectly from a commandline program but when inserted 
> into a component, it compiles and runs but each
> write(fd, buff, sizeof(buff)) goes to stdout / stderr instead of the
> place fd points to, which is /dev/ttyUSB0
> 
> I can connect to a socket server from within the userspace component
> and pass the values indirectly, but it is bugging me to distraction that 
> perfectly normal serial comms code which can be shown to work elsewhere 
> will not work properly in the component.
> 
> If anyone has any ideas why this should be, I would be grateful!
> 
> regards
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to