Solved

PHP Serial port + baud rate in linux

Posted on 2007-04-10
2
1,896 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
2 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
Comment Utility
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
Comment Utility
Perfect! thanks :)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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…
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now