May 25, 2019

1046 words 5 mins read



With PJON you build networks of devices for free with no need of a cloud service or a centralised platform you dont fully control.

repo name gioblu/PJON
repo link
language C++
size (curr.) 5458 kB
stars (curr.) 1920
created 2014-12-01
license Other


PJON 12.0

PJON® (Padded Jittering Operative Network) is an arduino-compatible, multi-master, multi-media network protocol. It proposes a new Open Standard, it is designed as a framework and implements a totally software-defined network protocol stack that can be easily cross-compiled on many MCUs and architectures like ATtiny, ATmega, SAMD, ESP8266, ESP32, STM32, Teensy, Raspberry Pi, Linux, Windows x86, Apple and Android. PJON operates on a wide range of media and protocols like TCP, UDP, MQTT, ESPNOW, USB, Serial, RS485, LoRa, PJDL, PJDLR and PJDLS.

Get PJON bus id Join the chat at

PJON is used in thousands of devices and its community has spread worldwide because of the following 5 key factors:

  • New technology: PJON is an experimental network protocol stack crafted in 10 years of research and experimentation. It was originally developed as an open-source alternative to i2c and 1-Wire but during development its scope and features have been extended to cover use cases where IP is generally applied. PJON has been engineered to have a variable footprint (4.2-8.2 kB program memory) and overhead (5-22 bytes per packet) depending on its configuration.
  • Multi-media support: PJON operates on a wide range of media and protocols like TCP, UDP, MQTT, ESPNOW, USB, Serial, RS485 and LoRa. The PJON network protocol stack specifies and implements also PJDL able to communicate data over a single wire shared by up to 255 devices, PJDLR able to operate with many ASK/FSK/OOK radio modules and also PJDLS, able to communicate wirelessly with light pulses using off the shelf LEDs and laser diodes.
  • Increased reliability: Many protocols massively applied worldwide expose dangerous vulnerabilities, have weak error detection algorithms and are not resilient to interference. PJON is based on years of analysis and study not to make the same mistakes present in most alternatives and provide with a set of simpler and more efficient solutions.
  • High flexibility: PJON is totally software-defined and its implementation is designed to be easily extensible. it builds out-of-the-box in all supported devices and operates transparently on top of any supported protocol or medium.
  • Low cost: Without any additional hardware needed to operate, minimal network wiring requirements and direct pin-to-pin or LED-to-LED communication, PJON is extremely energy efficient, cheap to be implemented and maintained. This implementation is kept updated and meticulously tested thanks to the strong commitment of its growing community of end users, testers and developers.


  • Cross-compilation support with the interfaces system calls abstraction
  • Multi-media support with the strategies data link layer abstraction
  • Hot-swap support, no need of system reset or shut down when replacing or adding devices
  • Configurable synchronous and/or asynchronous acknowledgement
  • Configurable 2 level addressing (device and bus id) for scalable applications
  • Configurable 1 or 2 bytes packet length (max 255 or 65535 bytes)
  • Configurable CRC8 or CRC32 table-less cyclic redundancy check
  • Packet manager to handle, track and if necessary retransmit a packet sending in background
  • Error handling



Academic studies

Researchers are active in many universities worldwide using PJON in different environments. The following list contains all the known published academic studies about PJON:


Feel free to send a pull request sharing something you have made that could help, if you want to support this project you can also try to solve an issue. Thanks to support, expertise, kindness and talent of the following contributors, the protocol’s documentation, specification and implementation have been strongly tested, enhanced and verified:

Fred Larsen, Zbigniew Zasieczny, Matheus Garbelini, sticilface, Felix Barbalet, Oleh Halitskiy, fabpolli, Adrian Sławiński, Osman Selçuk Aktepe, Jorgen-VikingGod, drtrigon, Endre Karlson, Wilfried Klaas, budaics, ibantxo, gonnavis, maxidroms83, Evgeny Dontsov, zcattacz, Valerii Koval, Ivan Kravets, Esben Soeltoft, Alex Grishin, Andrew Grande, Michael Teeww, Paolo Paolucci, per1234, Santiago Castro, pacproduct, elusive-code, Emanuele Iannone, Christian Pointner, Fabian Gärtner, Mauro Mombelli, Remo Kallio, hyndruide, sigmaeo, filogranaf, Maximiliano Duarte, Viktor Szépe, Shachar Limor, Pantovich, Mauro Zancarlin, Franketto, jzobac, DanRoad, fcastrovilli, Andrei Volkau, maniekq, DetAtHome, Michael Branson, chestwood96, Mattze96, Steven Bense and Jack Anderson.

Compliant tools

  • ModuleInterface - easy config and value sync between IoT modules by Fred Larsen
  • PJON-cython - cython PJON wrapper by xlfe github user
  • PJON-piper - command line wrapper by Zbigniew Zasieczny
  • PJON-python - python interface by Zbigniew Zasieczny
  • PJON-gRPC - gRPC server-client by Oleh Halytskyi


All the software included in this project is experimental and it is distributed “AS IS” without any warranty, use it at your own risk. Licensed under the Apache License, Version 2.0. PJON® and its brand are registered trademarks, property of Giovanni Blu Mitolo

Safety warning

When installing or maintaining a PJON network, extreme care must be taken to avoid any danger. If devices are connected to AC power you are exposed to a high chance of being electrocuted if hardware is not installed carefully and properly. If you are not experienced enough ask the support of a skilled technician and consider that many countries prohibit uncertified installations. When a SoftwareBitBang bus is installed interference mitigation and protective circuitry guidelines must be followed. When working with an AnalogSampling LED or laser based setup safety glasses must be worn and transceivers must be operated cautiously to avoid potential eye injuries. Before any practical test or a hardware purchase for a wireless OverSampling, ThroughSerial or ThroughLoRa radio setup, compliance with government requirements and regulations must be ensured. When connecting a local bus to the internet all devices must be considered potentially compromised, manipulated or remotely actuated against your will. It should be considered a good practice not to connect to the internet systems that may create a damage (fire, flood, data-leak) if hacked.

comments powered by Disqus