PHPackages                             themainframe/serially - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. themainframe/serially

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

themainframe/serially
=====================

Talk to serial devices in PHP

219PHP

Since Feb 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/themainframe/serially)[ Packagist](https://packagist.org/packages/themainframe/serially)[ RSS](/packages/themainframe-serially/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Serially
========

[](#serially)

Talk to serial devices in PHP from various\* platforms.

Getting It
----------

[](#getting-it)

Get [Composer](https://getcomposer.org/). Make your project require Serially.

```
composer require themainframe/serially dev-master

```

Examples
--------

[](#examples)

The `ConnectionManager` class enables you to write platform-portable code against Serially by abstracting the platform detection process away from your code.

The `getConnection` method returns an connection instance implementing `ConnectionInterface` suitable for the current platform.

```
$manager = new ConnectionManager;
$connection = $manager->getConnection('/dev/ttyS0');
$connection->writeLine('Hello from PHP');

```

Logging
-------

[](#logging)

Debugging serial devices and the communication between them can be difficult. Serially logs to a [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)-conformant `LoggerInterface` to make the process easier.

```
// $myLogger implements LoggerInterface
// Connections created with this manager will be logged to $myLogger
$manager->setLogger($myLogger);

```

Limitations
-----------

[](#limitations)

**Reading** bytes from serial ports is a challenge in PHP. Depending on the platform, you may observe that data received before `readLine()` or `readByte()` is called may or may not be available.

**Platform** agility is a work-in-progress. The `PlatformSpecific` namespace contains platform-specific connection implementations (of `ConnectionInterface`) for Mac OS X (Darwin) and Linux. A Windows one may emerge soon.

Attributions &amp; Thanks
-------------------------

[](#attributions--thanks)

- Heavilly inspired by rubberneck's [php-serial](https://github.com/rubberneck/php-serial/).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/40a4be840299140a2175e89e9267141d636c841edac19717bb5d05b9cff3db9a?d=identicon)[themainframe](/maintainers/themainframe)

---

Top Contributors

[![themainframe](https://avatars.githubusercontent.com/u/54750?v=4)](https://github.com/themainframe "themainframe (17 commits)")

### Embed Badge

![Health badge](/badges/themainframe-serially/health.svg)

```
[![Health](https://phpackages.com/badges/themainframe-serially/health.svg)](https://phpackages.com/packages/themainframe-serially)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
