How to select a CC2530 board
eBay and Aliexpress offer several boards with the CC2530 chip (keyword: CC2530). You may select any board, but use the following criteria:
eBay and Aliexpress offer several boards with the CC2530 chip (keyword: CC2530). You may select any board, but use the following criteria:
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:
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 two sockets and used them for about a month. This socket has a big problem (from my standpoint). It can go into the deep sleep mode and cannot forward data packets from sensors.
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.
1 | $ 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.
I need to connect the DHT22 temperature and humidity sensor to BPi. Obviously, the kernel does not include the corresponding kernel module, but this module exists in sequent releases.
I’ve found and tried this user-mode C code (dht22). It uses the WiringPi library and can be compiled on Banana Pi BPI-M2U.
Banana Pi BPI-M2U has the Allwinner R40 chip. This chip does not include a hardware 1-wire interface. But we can implement this data exchange protocol at the software level using the bit bang method. The default Linux kernel (Raspbian Jiessie, 3.10.107) does not include the w1-gpio kernel module. I’ve tried to compile it, but it has many dependencies. I’ve found w1-gpio-cl. This is a Linux kernel-mode driver substitutes w1-gpio 1-wire bus master driver. Contrary to the standard driver, w1-gpio-cl doesn’t need many other kernel modules. Also you may configure this kernel module using command line parameters.
Using BPi for kernel (re)compilation is quite painful because it is very slow for this task. So I configured a virtual machine (VMWare in my case). Now, the kernel can be compiled in 50-80 seconds on my i7-4770. The configuration is easy if you read the following tutorial. I’ve tried several options before and selected this one.
Some time ago I’ve purchased RPi2 and built my first smart home server (powered by Pimatic). Everything is good with this solution but currently I need more: