PHPackages                             kba-team/serial-port - 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. kba-team/serial-port

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

kba-team/serial-port
====================

Connect to serial ports using TCP connections.

v1.0.0(5y ago)0181MITPHPPHP ^7.2

Since Dec 17Pushed 5y ago2 watchersCompare

[ Source](https://github.com/the-kbA-team/SerialPort)[ Packagist](https://packagist.org/packages/kba-team/serial-port)[ RSS](/packages/kba-team-serial-port/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

SerialPort
==========

[](#serialport)

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![Build Status](https://camo.githubusercontent.com/cda6e4eb8c0fd24a4f31b617496b69e2e76128c805d4f37284bf0b0f2cc7eb61/68747470733a2f2f7472617669732d63692e6f72672f7468652d6b62412d7465616d2f53657269616c506f72742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/the-kbA-team/SerialPort)[![Maintainability](https://camo.githubusercontent.com/78de770860a170b436cb650efb950c9287cbdd8e52149a3192b5b5c13fd6b0c2/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62336262653066316435313864626561636330372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/the-kbA-team/SerialPort/maintainability)[![Test Coverage](https://camo.githubusercontent.com/f27605361b206fb3d86c25c308e15a5211f3b3ef01445804a1f2bfa31eddd85c/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62336262653066316435313864626561636330372f746573745f636f766572616765)](https://codeclimate.com/github/the-kbA-team/SerialPort/test_coverage)

PHP class `\kbATeam\SerialPort\SerialPort` to connect to serial ports using streams. Nothing more. Only socket (TCP) streams are implemented at the moment.

You need to create classes implementing `\kbATeam\SerialPort\Interfaces\Communication\Command`, `\kbATeam\SerialPort\Interfaces\Communication\Container` and `\kbATeam\SerialPort\Interfaces\Communication\Value`. The implementations of these interfaces depend on the device you want to communicate with.

Usage
-----

[](#usage)

Use [pySerial](https://pyserial.readthedocs.io/en/latest/examples.html) to map a serial device to a TCP port.

Use `Streams\Socket` to create a connection to a `SerialPort` use `SerialPort->invoke()` to invoke a *`Communication\Command`* and get either `NULL` or a *`Communication\Container`* containing at least one *`Communication\Value`*.

A *`Communication\Command`* instance is a string sent to a `SerialPort` instance. The `SerialPort` instance invokes the *`Communication\Command`* using its *`Stream`* instance.

Your implementation of *`Communication\Command`* needs to define how to read the string returned by the device and either return a *`Communication\Container`* containing at least one `Communication\Value`, or `NULL`.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1969d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d94e4890bfd0a94f6f14f3930fcf8e4de63eb681a0e7b6a24b876ee31d4a8527?d=identicon)[grej](/maintainers/grej)

---

Top Contributors

[![gregor-j](https://avatars.githubusercontent.com/u/17705875?v=4)](https://github.com/gregor-j "gregor-j (39 commits)")

---

Tags

phpserial-portserial-portsstreamstreams

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kba-team-serial-port/health.svg)

```
[![Health](https://phpackages.com/badges/kba-team-serial-port/health.svg)](https://phpackages.com/packages/kba-team-serial-port)
```

###  Alternatives

[paulredmond/html-to-amp

A PHP Library to Convert HTML to AMP HTML

6826.0k](/packages/paulredmond-html-to-amp)[mageprince/module-buynow

Magento2 Buy Now Module

829.7k](/packages/mageprince-module-buynow)[netzmacht/php-leaflet

PHP leaflet definition and javascript generator

1927.2k2](/packages/netzmacht-php-leaflet)[edofre/laravel-fullcalendar-scheduler

Laravel component for fullcalendar scheduler module

251.5k](/packages/edofre-laravel-fullcalendar-scheduler)

PHPackages © 2026

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