Download the PHP package zeran/async-serial-port without Composer

On this page you can find all versions of the php package zeran/async-serial-port. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package async-serial-port

Zeran SerialPort

An asynchronous PHP library for serial port communication built on ReactPHP.

Introduction

Zeran SerialPort is a modern PHP library that provides asynchronous serial port communication using ReactPHP's event loop. It supports various baud rates, parity settings, and platform-specific configurations for both Linux and Windows systems.

This library is ideal for applications that need to communicate with hardware devices through serial ports, such as:

Requirements

Installation

You can install the package via composer:

Basic Usage

Here's a simple example of how to use the library:

Configuration

The SerialPortConfiguration class allows you to configure various aspects of the serial port:

Required Parameters

Optional Parameters

Supported Baud Rates

The library supports the following baud rates through the BaudRateEnum:

Example:

Events

The library provides event-based communication through a callback function. The following events are available:

API Reference

AsyncSerialPort

Main class for serial port communication.

Methods

SerialPortConfiguration

Class for configuring the serial port parameters.

Properties

Advanced Usage

Using with PSR-3 Logger

The library supports PSR-3 logging through the LoggerAwareTrait:

Platform-Specific Considerations

Linux

On Linux, you may need to add your user to the dialout group to access serial ports without root privileges:

You'll need to log out and log back in for the changes to take effect.

Windows

On Windows, you need to use COM port names (e.g., COM1, COM2, etc.) for the device path.

Troubleshooting

Common Issues

  1. Permission denied: Ensure your user has permission to access the serial port.
  2. Device not found: Verify the device path is correct. Use ls /dev/tty* on Linux or Device Manager on Windows.
  3. Invalid configuration: Check that your baud rate, parity, and other settings match your device requirements.

Debugging

Enable debugging by setting a logger:

License

The MIT License (MIT). Please see License File for more information.


All versions of async-serial-port with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
react/stream Version ^1.4
react/event-loop Version ^1.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zeran/async-serial-port contains the following files

Loading the files please wait ....