Skip to main content

XBee

XBee provides an implementation of the XBee serial communication API. It allows one to easily access advanced features of one or more XBee devices from an application written in Python. An example use case might look like this:

#! /usr/bin/python

# Import and init a XBee Series 1 device
from xbee import XBee1
import serial

ser = serial.Serial('/dev/ttyUSB0', 9600)
xbee = XBee1(ser)

# Set remote DIO pin 2 to low (mode 4)
xbee.remote_at(
  dest_addr='\x56\x78',
  command='D2',
  parameter='\x04')

xbee.remote_at(
  dest_addr='\x56\x78',
  command='WR')

Usage

Series 1

To use this library with an XBee Series 1 device, import the class XBee1 and call its constructor with a serial port object.

In order to send commands via the API, call a method with the same name as the command which you would like to send with words separated by _’s. For example, to send a Remote AT command, one would call remote_at().

The arguments to be given to each method depend upon the command to be sent. For more information concerning the names of the arguments which are expected and the proper data types for each argument, consult the API manual for the XBee Series 1 device, or consult the source code.

Series 2

At this time, Series 2 API commands have not yet been translated from the API documentation into the library.

Contributors

Paul Malmsten <pmalmsten@gmail.com>

Special Thanks

Amit Synderman, Marco Sangalli

Metadata

Release files for XBee 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for XBee 1.5.0
File Size Uploaded Provenance Actions
XBee-1.5.0.tar.gz 14.8 kB Without provenance Details for XBee-1.5.0.tar.gz

Release files / XBee-1.5.0.tar.gz

Download URL XBee-1.5.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
034e55dacedf2cbf83779da8f8787471456e1d70fd1270d9c72109a6a69ee489
BLAKE2b-256 checksum
How to use checksums
ad10a5b557556abe4a85f8ecfc492bbc701e5e18ebb1756e618757f059fb1938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for XBee 1.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page