Find Jobs
Hire Freelancers

serial port (ttyS0 / ttyUSB0) - Permission denied

$10-30 USD

Fermé
Publié il y a presque 8 ans

$10-30 USD

Payé lors de la livraison
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
N° de projet : 10403843

Concernant le projet

5 propositions
Projet à distance
Actif à il y a 8 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux
5 freelances proposent en moyenne $28 USD pour ce travail
Avatar de l'utilisateur
Hello! I have experience with linux server administration and will be happy to debug and fix your problem. Thanks!
$30 USD en 1 jour
5,0 (164 commentaires)
5,9
5,9
Avatar de l'utilisateur
Hello! I can help you. .
$30 USD en 1 jour
4,9 (54 commentaires)
5,3
5,3
Avatar de l'utilisateur
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 en 1 jour
5,0 (8 commentaires)
2,9
2,9
Avatar de l'utilisateur
Hello contact me to see it and solve
$35 USD en 1 jour
5,0 (2 commentaires)
2,0
2,0
Avatar de l'utilisateur
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 en 10 jours
5,0 (2 commentaires)
1,8
1,8

À propos du client

Drapeau de
Juara,
0,0
0
Méthode de paiement vérifiée
Membre depuis mars 16, 2011

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.