Solved

PHP Serial port + baud rate in linux

Posted on 2007-04-10
2
1,908 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

627 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