PHP Classes

PHP Serial: Communicate with a serial port

Recommend this page to a friend!

  Author Author  
Name: Rémy Sanchez is available for providing paid consulting. Contact Rémy Sanchez .
Classes: 4 packages by
Country: France France
Age: 27
All time rank: 1109 in France France
Week rank: 40 Up2 in France France Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to communicate with a serial port under Linux or Windows.

It takes the path (like "/dev/ttyS0" for linux or "COM1" for windows) of serial device and checks whether it is valid before opening a connection to it.

Once the connection is opened, it can send data to the serial port, and read answers (reading is only implemented for Linux).

The class may also change connection parameters for the given serial device.

The class is working with Linux for read and write operations, but under Windows it only works for write operations. Under Windiws try accessing the serial port through network with serproxy instead.

The class have been reported to work fine with Mac OS X, but it was not tested it.

  Classes of Rémy Sanchez  >  PHP Serial  >  Download Download .zip .tar.gz  >  Support forum Support forum (37)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Serial
Base name: php_serial
Description: Communicate with a serial port
Version: 1.1
PHP version: 5.2
License: GNU General Public License (GPL)
All time users: 14948 users
All time rank: 55
Week users: 25 users
Week rank: 36 Up
  Groups   Rate classes User ratings   Dependents  
  Trackback   Applications   Related pages   Files Files  

Group folder image Unix Use of capabilities specific of POSIX, Unix like operating systems View top rated classes
Group folder image Windows Use of capabilities specific of the Windows operating systems View top rated classes
Group folder image Mac OS Use of capabilities specific of Apple Mac operating systems View top rated classes
Group folder image Hardware Communicate with computer hardware and peripheral devices View top rated classes


Get value from a machine
Get value from milk analyzer machine

What is the best PHP rs232 class?
Get data from rs232 in php for data logger

Socket connection to com port
How to communicate with a COM port?

What is the best PHP serial connection class?
Create serial connection

  Innovation Award  
PHP Programming Innovation award nominee
February 2007
Number 2

Prize: One downloadable copy of Komodo Pro
Serial ports are often used to communicate with peripheral devices, such as: modems, POS terminals, special printers, etc..

This class can be used to communicate and configure peripherals connected to a serial port under Linux, simplifying the development of applications that need access serial devices.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (83%) Good (80%) - Sufficient (77%) - - Not sure (57%) 1414
Month: Not yet rated by the users

  Other classes that need this package  
Class Why it is needed Dependency
Citizen C2202-PD Control Class Uses PHPSerial to communicate with the device Required

  Pages that reference this package  
Arduino has slowed me down!
Arduino has slowed me down! Posted on August 11th, 2009 in Arduino, August, Electronics, Hobbies Sorry folks, I know I’ve been pretty slow to update the site, it’s just that I bought an Arduino Duemilanove development board , an Ethernet shield from sparkfun electronics and some MegaBrite, ShiftBrite and OctoBrite modules from MaceTech...
Comunicación con los puertos serie en PHP
Hace tiempo nos preguntaban como leer de los puertos serie desde PHP, y ahora acabo de encontrar eso mismo y además cómo hacerlo para Windows y para Linux...
Controlar puertos serie desde php
Existen dos extensiones para conseguir comunicarnos con los puertos series del equipo en el que corre nuestra aplicación php...
Escribe mensajes en un display desde cualquier parte del mundo
Hoy, navegando me encontré con una página muy interesante, es un proyecto muy “geek”...
Escribiendo mensajes en un display, a Km de distancia!
Es una curiosa idea que vi hace tiempo y dejé pasar, pero ahora le he visto por tantos blogs que no podía dejar de escribir aquí de ella. Un chico joven ha conectado un display de leds de 120×7pixels y tricolor a un ordenador por el puerto serie (RS232)....
Handy Link: PHP Serial Class
Need a way to talk to your serial devices (Arduino, PIC Micro, etc) using PHP?...
Howto Send/Read SMSs using a GSM modem, AT+ commands and PHP
I need to send/read SMS with PHP...
Interfacing PHP with the Arduino (with a splash OS X)
A while ago I bought an Arduino Diecimila, which is an open-source electronics prototyping platform...
Leer y escribir el puerto serie con php
Buenas, aca hay algo muchachos pero por lo q ví, con esa clase, en windows se puede escribir nomás el puerto, pero en linux se puede escribir y leer el puerto serie...
Nouvelle version de phpSerial
Vous pourrez trouver la nouvelle version de phpSerial, ma classe pour lire/écrire sur le port série depuis linux ou windows (sauf que windows gère pas la lecture) en PHP sur le site PHP Classes.
PHP and Serial Ports
Last month there were at least two enquiries at the Bangalore PHP UG on how to get PHP to communicate with the server’s serial port...
PHP and Serial Ports
In a recent post to his blog, Vinu Thomas posted about a PHP extension that allows your scripts to directly interact with the serial ports on the web server its running on...
PHP and the Arduino - Followup
I’ve had a bit of interest on the original entry, asking for more detail on the code used in the video demonstation at the end...
PHP ile COM balantysy
Asagıda ki linkleri bir incele istersen...
PHP Serial Class for OSX
Below is an archive of my PHP Serial Class page from my old site.
PHP Serial port
Just searching for php serial port class came up with this link.
PHP ve Serial Port
PHP ve Serial Port
vakti zamaninda kendim yazmıstim ama ticari bir is oldugu için o kodları koyamiyorum buraya... ama altta verdigim classin çalistıgını biliyorum.
PHP: Your imagination is your limit
Do you think PHP was only developed for write Web-Sites?...
Possible way to control Parallel port through ID php
Possible, use this class...
Tarificador de llamadas telefónicas en PHP
Se me ocurren dos soluciones: Puedes usar una clase llamada PHP Serial que creo seria la mejor forma...

Latest pages that reference packages Latest pages that reference packages

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Related pages  
Homesite of setserial, used by phpSerial

  Files folder image Files  
File Role Description
Files folder imageexamples (3 files)
Files folder imagesrc (1 file)
Accessible without login Plain text file php_serial.class.php Class The class itself
Plain text file composer.json Data Sync with GitHub
Plain text file CONTRIBUTORS Data Sync with GitHub
Plain text file COPYING Data Sync with GitHub
Accessible without login Plain text file example.php Example A small example
Plain text file Data Sync with GitHub

  Files folder image Files  /  examples  
File Role Description
  Plain text file dummy.php Example Sync with GitHub
  Plain text file sms.php Example Sync with GitHub
  Plain text file VS421CPNTA.php Example Sync with GitHub

  Files folder image Files  /  src  
File Role Description
  Plain text file PhpSerial.php Class Sync with GitHub

Install with Composer Install with Composer - Download Download all files: php_serial.tar.gz
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.