I just see for another app using nrf24 on cubieboard
and funcrtion to use nrf24 have GPIO defining is RF24 radio(SUNXI_GPB(10), SUNXI_GPB(11), "/dev/spidev0.0");
GPIO set using this style: SUNXI_GPB(10), this type of gpio defined in #include "gpio_sun4i.h" file. Maybe this specific defining in ARCHLINUX ARM distro.
Артем ТИхонович
@Артем ТИхонович
Best posts made by Артем ТИхонович
-
RE: 💬 Building a Raspberry Pi Gateway
Latest posts made by Артем ТИхонович
-
RE: MySensors on sunxi kernel. A10 Cubieboard.
@rozpruwacz thank you! I just try to build and install mainline kernel. for my board. Now a10 supprot ok in mainline.
-
RE: MySensors on sunxi kernel. A10 Cubieboard.
@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); -
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. -
RE: 💬 Building a Raspberry Pi Gateway
I just see for another app using nrf24 on cubieboard
and funcrtion to use nrf24 have GPIO defining is RF24 radio(SUNXI_GPB(10), SUNXI_GPB(11), "/dev/spidev0.0");
GPIO set using this style: SUNXI_GPB(10), this type of gpio defined in #include "gpio_sun4i.h" file. Maybe this specific defining in ARCHLINUX ARM distro. -
RE: 💬 Building a Raspberry Pi Gateway
Thank you, @mfalkvidd. Ihave a little troubles with correct defining gpios from Cubie. In fex file the gpios defines is:
[gpio_para]
gpio_used = 1
gpio_num = 2
gpio_pin_1 = port:PH07<0><default><default><default>
gpio_pin_2 = port:PH15<6><default><default><default>
in sys/gpio:
[root@Archey boot]# ls -ls /sys/class/gpio/
total 0
0 --w------- 1 root root 4096 Nov 21 11:58 export
0 lrwxrwxrwx 1 root root 0 Nov 18 17:01 gpio1_ph7 -> ../../devices/platform/gpio-sunxi/gpio/gpio1_ph7
0 lrwxrwxrwx 1 root root 0 Nov 21 11:54 gpio2_ph15 -> ../../devices/platform/gpio-sunxi/gpio/gpio2_ph15
0 lrwxrwxrwx 1 root root 0 Nov 18 10:45 gpiochip1 -> ../../devices/platform/gpio-sunxi/gpio/gpiochip1
0 --w------- 1 root root 4096 Nov 18 16:52 unexportWhen i define in configure: --my-rf24-ce-pin=1 --my-rf24-cs-pin=2 build is ok, but test failed with error:
Nov 21 11:58:15 ERROR Could not open /sys/class/gpio/gpio1/direction[root@Archey MySensors]#
when i define --my-transport=nrf24 --my-rf24-ce-pin=gpio1_ph7 the build failed wirh error:
./drivers/RF24/RF24.cpp: In function 'void RF24_ce(bool)':
<command-line>:0:16: error: 'gpio1_ph7' was not declared in this scope
./drivers/RF24/RF24.cpp:52:17: note: in expansion of macro 'MY_RF24_CE_PIN'
hwDigitalWrite(MY_RF24_CE_PIN, level);How can i resolve this problem? Please help.
-
RE: 💬 Building a Raspberry Pi Gateway
This is my old dream to connect directly nrf to Cubieboard GPIOs. Few years ago i try to do this without success using this lib - https://github.com/bearpawmaxim/librf24-sunxi
-
RE: 💬 Building a Raspberry Pi Gateway
Hi! Does anybody test Cubieboard as Gateway? I have a cubieboard runing archlinux with spi enabled in kernel. How i define pins for nrf24 gateway connection? Or i need to make big changes in code to star work with different bord than Rpi?
Best regards