Solved

PHP Serial port + baud rate in linux

Posted on 2007-04-10
2
1,905 Views
Last Modified: 2007-12-19
Hi,

I am about to start writing a php script which accesses the serial port on my PC, (/dev/ttyS0) - however, I cannot seem to find out where to configure the baud rate before I open the stream?
any help will be appreciated!
0
Comment
Question by:skaap2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 18880957
AFAIk php does not support sending ioctl-commands to an open file-descriptior you will need to set thoses settings via external command. On linux use setserial like:

exec('setserial /dev/ttyS0 ..');
fopen('/dev/ttyS0');
0
 
LVL 5

Author Comment

by:skaap2k
ID: 18880976
Perfect! thanks :)
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL limit and not so limited 13 62
PHP processing webform 25 45
Php variable to be sent back 3 35
Ordering displaying data in a drop down 3 10
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question