CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
opening 2 device files

 



FPeter
Novice

Feb 24, 2013, 6:46 AM

Post #1 of 2 (770 views)
opening 2 device files Can't Post

Hi All!

I met with a problem during opening the following 2 devices from separate perl programs (running on OpenWrt):

# /dev/ttyACM0 USB virtual serial port GPS receiver - read-only
open (SERGPS, $devfile) or die $!;

# /dev/hidraw0 custom mikroe HID device - read-write
open (HIDRAW, '+>'.$devfile) or die $!;

both works well one by one, but when i try to start both of them, then the HID program stops reading / reads nothing from the device file, and the GPS reader runs onward well. a byte should be sent to the hidraw device, then the answer is the required data. when i open the hidraw device with cat, then i send a byte from separate ssh window to the device file, it works well. but when the other GPS reader program is running, i got the following error message:

root@OpenWrt:~# echo "1" > /dev/hidraw0
ash: write error: No space left on device

do You have any idea, where is the problem? what am i missing? device files should be opened on a different way?


rovf
Veteran

Feb 28, 2013, 3:15 AM

Post #2 of 2 (753 views)
Re: [FPeter] opening 2 device files [In reply to] Can't Post

Did you try to switch of buffering?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives