Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PHP Serial port + baud rate in linux

Posted on 2007-04-10
2
Medium Priority
?
1,910 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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 look for a specific file type in a local or remote server directory using PHP.

670 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