ARCHIVE: May, 2018

CC2531 based router (firmware)

I’ve replaced my old coordinator hardware with CC2530 with an external antenna and therefore one of CC2531 was not used.

The guys on GitHub asked me to make a router firmware for СС2531 too. I’ve spent some time and prepared 3 variants:

  1. CC2531-router.hex – just a router, without diagnostics and a USB serial port.
  2. CC2531-router-diag.hex – a router with diagnostic reports and without a USB serial port.
  3. CC2531-router-diag-usb.hex – a router with diagnostic reports and a USB serial port. The firmware dumps diagnostic reports to the serial port too.

CC2530 based Zigbee coordinator and router


My smart home infrastructure contains several Xiaomi humidity/temperature and door sensors. I’ve used these sensors with the corresponding Xiaomi gateway. The gateway was connected with my BananaPi M2U and Pimatic. But my home is long and tall. One gateway does not cover all rooms and therefore far sensors disappear periodically.

I’ve googled and found I can use Xiaomi sockets (Zigbee edition) like Zigbee routers. This socket is less expensive than a new gateway and it has a smaller size. I’ve purchased tow sockets and used it about a month. This socket has a big problem (from my point of view). It can go into the deep sleep mode and cannot forward data packets from sensors.

Analog input with ADS1115 in Python

Python has the pretty good library “WiringPi-Python“, but it depends on WiringPi2 for Raspberry Pi and cannot be installed automatically through pip. Here is a solution.

In my project I want to control a battery voltage and a charging state for my LiPo battery. Therefore I’ve added the ADS1115 board.

I’ve installed WiringPi2 for BPi and tried to read analog inputs through the gpio command line utility.

$ gpio -x ads1115:200:0x48 aread 200

The main disadvantage of this method for me is the default analog reading settings: 128 samples per second and +/-4.096V range (my battery voltage is 4.2V). You cannot change these setting in the command line utility.

There are no more results.