Find Jobs
Hire Freelancers

serial port (ttyS0 / ttyUSB0) - Permission denied

$10-30 USD

Closed
Posted about 8 years ago

$10-30 USD

Paid on delivery
Hello I need a simple script to read the information from a serial port (ttyS0 / ttyUSB0) using PHP on CentosLinux. I have tried th following code but the code hangs and no results are returned. <?php $myFile = "/dev/ttyUSB0"; $handle = fopen($myFile, 'rb+'); $Data = fread($handle, 15); fclose($handle); echo $Data; ?> Information from the serial port could come at anytime so there needs to be some sort of continuous polling waiting to receive the data from serial port. Warning: fopen(/dev/ttyUSB0): failed to open stream: Permission denied in /var/www/html/scripts/[login to view URL] on line 2
Project ID: 10403843

About the project

5 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
5 freelancers are bidding on average $28 USD for this job
User Avatar
Hello! I have experience with linux server administration and will be happy to debug and fix your problem. Thanks!
$30 USD in 1 day
5.0 (164 reviews)
5.9
5.9
User Avatar
Hello! I can help you. .
$30 USD in 1 day
4.9 (54 reviews)
5.3
5.3
User Avatar
my proposal is using c/c++ languege to create a listener of events from the port, and write the outup into file. then your script php can read data from the file. i did something like this for another client. contact me on private to talk about details. thank you
$30 USD in 1 day
5.0 (8 reviews)
2.9
2.9
User Avatar
Hello contact me to see it and solve
$35 USD in 1 day
5.0 (2 reviews)
2.0
2.0
User Avatar
hi, you tested with minicom the /dev/ttyUSB0 first? which user run the script, you have tester with root. give me more info via freelancer chat. regards
$25 USD in 10 days
5.0 (2 reviews)
1.8
1.8

About the client

Flag of
Juara,
0.0
0
Payment method verified
Member since Mar 16, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.