Hello everyone,
i have a BananaPi (in fact its a Banana Pi R1) and i want to use it with homegear to control my MAX-Devices through a CC1101 via SPI.
The system on my BananaPi is a
Armbian 5.31 stable Debian GNU/Linux 8 (jessie) 4.9.7-sunxi
On this OS the SPI is disabled by default but i managed to enable it by adding the following device-tree-overlay (or at least i hope that i have enabled it now):
DT Overlay for BananaPi A20
/dts-v1/;
/plugin/;
{
compatible = "allwinner,sun7i-a20";
fragment@0 {
target-path = "/aliases";
__overlay__ {
spi0 = "/soc@01c00000/spi@01c05000";
spi1 = "/soc@01c00000/spi@01c06000";
spi2 = "/soc@01c00000/spi@01c17000";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
spidev {
compatible = "spidev";
status = "okay";
reg = <0>;
spi-max-frequency = <1000000>;
};
};
};
fragment@2 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
spidev {
compatible = "spidev";
status = "disabled";
reg = <0>;
spi-max-frequency = <1000000>;
};
};
};
fragment@3 {
target = <&spi2>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
spidev {
compatible = "spidev";
status = "disabled";
reg = <0>;
spi-max-frequency = <1000000>;
};
};
};
};
Now i have at least a /dev/spidev0.0, so I connected my CC1101 to the bananaPi-PinHeader like here and added the following sequence to /etc/homegear/families/max.conf
[TI CC1101 Module]
id = My-C1101-Module
default = true
deviceType = cc1100
device = /dev/spidev0.0
responseDelay = 100
interruptPin = 0
gpio1 = 25
I know that BananaPi and Rasperry Pi are different bords but i could not find an example for the bananaPi with CC1101 and the corresponding GPIO-Busnumbers.
When i restart my system i get the following error message:
homegear.log
06/15/19 00:46:45.562 Starting Homegear…
06/15/19 00:46:45.563 Homegear version 0.7.39-2773
06/15/19 00:46:45.563 Git commit SHA of libhomegear-base: -
06/15/19 00:46:45.563 Git branch of libhomegear-base: -
06/15/19 00:46:45.563 Git commit SHA of Homegear: -
06/15/19 00:46:45.563 Git branch of Homegear: -
06/15/19 00:46:45.565 Info: Setting allowed core file size to “4294967295” for user with id 0 and group with id 0.
06/15/19 00:46:45.565 Info: Core file size now is “4294967295”.
06/15/19 00:46:45.565 Info: Setting maximum thread priority to “4294967295” for user with id 0 and group with id 0.
06/15/19 00:46:45.565 Info: Maximum thread priority now is “4294967295”.
06/15/19 00:46:45.678 Info: Backing up database…
06/15/19 00:46:46.640 Initializing database…
06/15/19 00:46:46.732 Info: Loading family module (type 1) mod_homematicbidcos.so
06/15/19 00:46:46.933 Info: Loading settings from /etc/homegear/families/homematicbidcos.conf
06/15/19 00:46:47.033 Info: Loading family module (type 1) mod_miscellaneous.so
06/15/19 00:46:47.140 Info: Loading settings from /etc/homegear/families/miscellaneous.conf
06/15/19 00:46:47.144 Info: Loading family module (type 1) mod_max.so
06/15/19 00:46:47.292 Info: Loading settings from /etc/homegear/families/max.conf
06/15/19 00:46:47.342 Info: Setting up physical interfaces and GPIOs…
06/15/19 00:46:47.343 Error: Could not set owner for GPIO value file /sys/class/gpio/gpio25/edge: No such file or directory
06/15/19 00:46:47.344 Error: Could not set permissions for GPIO value file /sys/class/gpio/gpio25/edge: No such file or di$
06/15/19 00:46:47.344 Info: Dropping privileges to user homegear (110) and group homegear (117)
06/15/19 00:46:47.348 Info: Homegear is (now) running as user with id 110 and group with id 117.
06/15/19 00:46:47.913 Starting script engine server…
06/15/19 00:46:48.091 Initializing licensing controller…
06/15/19 00:46:48.091 Loading licensing controller data…
06/15/19 00:46:48.091 Loading devices…
06/15/19 00:46:48.092 Loading XML RPC devices…
06/15/19 00:46:55.049 Loading device 2
06/15/19 00:46:55.049 Module HomeMatic BidCoS: Info: Central address set to 0xFD5A74.
06/15/19 00:46:55.066 Loading XML RPC devices…
06/15/19 00:46:55.524 Loading device 3
06/15/19 00:46:55.525 Module MAX: Info: Central address set to 0xFD81F8.
06/15/19 00:46:55.529 Loading XML RPC devices…
06/15/19 00:46:55.541 Loading device 1
06/15/19 00:46:55.542 Initializing RPC client…
06/15/19 00:46:55.542 Starting XML RPC server FamilyRPCServer listening on ::1:2000…
06/15/19 00:46:55.737 RPC Server (Port 2000): Info: Enabling basic authentication for WebSockets.
06/15/19 00:46:55.738 Starting XML RPC server RPCServer1 listening on :::2001…
06/15/19 00:46:55.751 RPC Server (Port 2000): Info: RPC Server started listening on address ::1 and port 2000
06/15/19 00:46:55.930 RPC Server (Port 2001): Warning: SSL is not enabled for this RPC server. It is strongly recommended $
06/15/19 00:46:55.930 RPC Server (Port 2001): Warning: RPC server has no authorization enabled. Everybody on your local ne$
06/15/19 00:46:55.931 RPC Server (Port 2001): Info: Enabling session authentication for WebSockets.
06/15/19 00:46:55.932 Starting XML RPC server RPCServer2 listening on :::2002, SSL enabled…
06/15/19 00:46:55.950 RPC Server (Port 2001): Info: RPC Server started listening on address :: and port 2001
06/15/19 00:46:56.114 RPC Server (Port 2002): Warning: RPC server has no authorization enabled. Everybody on your local ne$
06/15/19 00:46:56.114 RPC Server (Port 2002): Info: Enabling session authentication for WebSockets.
06/15/19 00:46:56.231 Starting XML RPC server RPCServer3 listening on :::2003, SSL enabled, authentication enabled…
06/15/19 00:46:56.241 RPC Server (Port 2002): Info: RPC Server started listening on address :: and port 2002
06/15/19 00:46:56.411 RPC Server (Port 2003): Info: Enabling basic authentication.
06/15/19 00:46:56.411 RPC Server (Port 2003): Info: Enabling client certificate authentication.
06/15/19 00:46:56.411 RPC Server (Port 2003): Info: Enabling session authentication for WebSockets.
06/15/19 00:46:56.510 Initializing event handler…
06/15/19 00:46:56.511 Loading events…
06/15/19 00:46:56.512 Start listening for packets…
06/15/19 00:46:56.528 Could not write to direction file “/sys/class/gpio/gpio25/direction”: Unknown error 517
06/15/19 00:46:56.529 Could not write to edge file (/sys/class/gpio/gpio25/edge) of GPIO with index 1: No such file or dir$
06/15/19 00:46:56.530 Starting Node-BLUE server…
06/15/19 00:46:56.753 Starting IPC server…
06/15/19 00:46:56.774 Startup complete. Waiting for physical interfaces to connect.
06/15/19 00:46:56.774 Info: Waiting for physical interfaces to connect (0 of 180s).
06/15/19 00:46:56.774 All physical interfaces are connected now.
I don’t really know how to get this GPIO-Error fixed. Does anyone have an idea?
Previous topics in this forum about the banana-Pi and CC1101 are several years old and a lot of the sunxi-Kernel seems to have changed since then, so perhaps someone has managed to configure a banana-Pi to work with CC1101 on SPI sucessfully on Armbian.
Additional I also have a short question about the homegear-max-Plugin:
Is it possible to simple check the SPI-connection to the CC1101. So can i get some feedback from the CC1101 even without understanding how the pairing works? (Just to test if the SPI-connection is working)
best regards,
flashbanger