MySensors on sunxi kernel. A10 Cubieboard.
-
Hi ! Does anybode run mySensors gateway on sunxi boards? It seem to be Orange pi but in my distro Pins have another definition:
0 lrwxrwxrwx 1 root root 0 Nov 18 17:01 gpio1_ph7 -> ../../devices/platform/gpio-sunxi/gpio/gpio1_ph7
If i set in config like this: -my-rf24-ce-pin=gpio1_ph7
i have a error: ./drivers/RF24/RF24.cpp:52:17: note: in expansion of macro 'MY_RF24_CE_PIN'
hwDigitalWrite(MY_RF24_CE_PIN, level);
if i set simple: --my-rf24-ce-pin=1 mySensors build is ok but i have another error in runtime -
ERROR Could not open /sys/class/gpio/gpio1/direction i suppouse i need to use sunxi headers for correct pin definition but i do not know do it.
-
@артем-тихонович which os with which kernel version do You run on the cubieboard ?
check if You can do this in the console:echo 1 > /sys/class/gpio/export cat /sys/class/gpio/gpio1/direction
there may be also permission problems so try also as root
-
@rozpruwacz i run ArchLinuxArm:
uname -a
Linux Archey 3.4.103-ARCH+ #4 PREEMPT Mon Dec 22 19:54:28 UTC 2014 armv7l GNU/LinuxThis is output:
cat /sys/class/gpio/gpio1_ph7/direction
outMay be problem in names of GPIO pin number + port_pin.
Few years ago i find RF24 library for my Cubieboard A10 but i cant up it.
In this lib gpio defined with macros:
RF24 radio(SUNXI_GPI(14), SUNXI_GPI(15), "/dev/spidev2.0");./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=1 --my-rf24-cs-pin=2 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 ./mysgw Nov 24 17:31:26 INFO Starting gateway... Nov 24 17:31:26 INFO Protocol version - 2.3.0 Nov 24 17:31:26 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,VER=2.3.0 Nov 24 17:31:26 DEBUG TSF:LRT:OK Nov 24 17:31:26 DEBUG TSM:INIT Nov 24 17:31:26 DEBUG TSF:WUR:MS=0 Nov 24 17:31:37 ERROR Could not open /sys/class/gpio/gpio1/direction[
if i set --my-rf24-ce-pin=gpio1_ph7 i got an compile error:
./drivers/RF24/RF24.cpp:52:17: note: in expansion of macro 'MY_RF24_CE_PIN'
hwDigitalWrite(MY_RF24_CE_PIN, level);
-
@артем-тихонович the 3.4 kernel is the "legacy" kernel and is not compatible with mainline kernel. I would suggest to install os with the mainline kernel. Otherwise you need to change mysensors code.
-
@rozpruwacz thank you! I just try to build and install mainline kernel. for my board. Now a10 supprot ok in mainline.
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 12 Mar 2025, 23:39 -
Saving last known good state, but not in EEPROM
Development • 30 Jan 2024, 18:46 • OldSurferDude 15 Jan 2025, 08:51 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14