Mysensors Gateway on OrangePi (Zero) (opi)
-
Hi Guys,
Sure, just let me know what to test.... The OPI is up and running :)Sofar this is what i did:
Install the NRF24 driver:
oot@orangepizero:~# git clone https://github.com/TMRh20/RF24.git
Cloning into 'RF24'...
remote: Counting objects: 3041, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 3041 (delta 2), reused 0 (delta 0), pack-reused 3033
Receiving objects: 100% (3041/3041), 1.32 MiB | 835.00 KiB/s, done.
Resolving deltas: 100% (1795/1795), done.
Checking connectivity... done.
root@orangepizero:~# cd RF24/
root@orangepizero:~/RF24# ./configure
[SECTION] Detecting arm compilation environment.
[OK] arm-linux-gnueabihf-gcc detected.
[OK] arm-linux-gnueabihf-g++ detected.
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[SECTION] Detecting DRIVER
[OK] DRIVER detected:SPIDEV.
[SECTION] Detecting OS.
[INFO] OS detected:LINUX.
[SECTION] Preparing configuration.
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.
root@orangepizero:~/RF24# make
arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c RF24.cpp
/tmp/ccMd5F0g.s: Assembler messages:
/tmp/ccMd5F0g.s:3924: Warning: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/spi.cpp
arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/gpio.cpp
arm-linux-gnueabihf-gcc -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/compatibility.c
arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/interrupt.c
[Linking]
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-soname,librf24.so.1 -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -o librf24.so.1.2.0 RF24.o spi.o gpio.o compatibility.o interrupt.oroot@orangepizero:~/RF24# make install
[Installing Libs to /usr/local/lib]
[Installing Headers to /usr/local/include/RF24]MySensors:
root@orangepizero:~# git clone https://github.com/mysensors/MySensors.git
Cloning into 'MySensors'...
remote: Counting objects: 13768, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 13768 (delta 1), reused 0 (delta 0), pack-reused 13754
Receiving objects: 100% (13768/13768), 9.61 MiB | 3.08 MiB/s, done.
Resolving deltas: 100% (8248/8248), done.
Checking connectivity... done.root@orangepizero:~# cd MySensors/
root@orangepizero:~/MySensors# ./configure
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[OK] init system detected: systemd
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.root@orangepizero:~/MySensors# make
gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log.c -o build/drivers/Linux/log.o
g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
In file included from examples_linux/mysgw.cpp:74:0:
./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
#error No support for nRF24 radio on this platform
^
In file included from ./drivers/RF24/RF24.cpp:23:0,
from ./MySensors.h:294,
from examples_linux/mysgw.cpp:74:
./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
#include <SPI.h>
^
compilation terminated.
Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
make: *** [build/examples_linux/mysgw.o] Error 1
root@orangepizero:~/MySensors#Followed the manual you pointed out to install for RPI
Seems i use the beta software:
root@orangepizero:~/MySensors# more README.md
MySensors Library v2.2.0-betaArmbian:
root@orangepizero:~# uname -a
Linux orangepizero 3.4.113-sun8i #50 SMP PREEMPT Mon Nov 14 08:41:55 CET 2016 armv7l GNU/LinuxARMBIAN Debian GNU/Linux 8 (jessie) 3.4.113-sun8i
Hope it helps!
-
Not sure if this is useful but, checked this one:https://github.com/mysensors/MySensors/issues/719
root@orangepizero:~/test# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
Cloning into 'marceloaqno-spidev'...
remote: Counting objects: 13825, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
Receiving objects: 100% (13825/13825), 9.65 MiB | 3.27 MiB/s, done.
Resolving deltas: 100% (8284/8284), done.
Checking connectivity... done.root@orangepizero:~/test# cd marceloaqno-spidev/
root@orangepizero:~/test/marceloaqno-spidev# git checkout spidev
Branch spidev set up to track remote branch spidev from origin.
Switched to a new branch 'spidev'
root@orangepizero:~/test/marceloaqno-spidev# ;s
-bash: syntax error near unexpected token `;'
root@orangepizero:~/test/marceloaqno-spidev# ls
configure Doxyfile initscripts Makefile README.md
CONTRIBUTING.md drivers keywords.txt MyConfig.h tests
core examples library.json MySensors.h
Documentation examples_linux library.properties projectsroot@orangepizero:~/test/marceloaqno-spidev# ./configure
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[SECTION] Detecting GPIO driver.
[OK] GPIO driver detected:SPIDEV.
[SECTION] Detecting init system.
[OK] init system detected: systemd.
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.root@orangepizero:~/test/marceloaqno-spidev# make
gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
In file included from drivers/Linux/Stream.cpp:24:0:
./drivers/Linux/Arduino.h:17:18: fatal error: GPIO.h: No such file or directory
#include "GPIO.h"
^
compilation terminated.
Makefile:114: recipe for target 'build/drivers/Linux/Stream.o' failed
make: *** [build/drivers/Linux/Stream.o] Error 1
root@orangepizero:~/test/marceloaqno-spidev# -
Not sure if this is useful but, checked this one:https://github.com/mysensors/MySensors/issues/719
root@orangepizero:~/test# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
Cloning into 'marceloaqno-spidev'...
remote: Counting objects: 13825, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
Receiving objects: 100% (13825/13825), 9.65 MiB | 3.27 MiB/s, done.
Resolving deltas: 100% (8284/8284), done.
Checking connectivity... done.root@orangepizero:~/test# cd marceloaqno-spidev/
root@orangepizero:~/test/marceloaqno-spidev# git checkout spidev
Branch spidev set up to track remote branch spidev from origin.
Switched to a new branch 'spidev'
root@orangepizero:~/test/marceloaqno-spidev# ;s
-bash: syntax error near unexpected token `;'
root@orangepizero:~/test/marceloaqno-spidev# ls
configure Doxyfile initscripts Makefile README.md
CONTRIBUTING.md drivers keywords.txt MyConfig.h tests
core examples library.json MySensors.h
Documentation examples_linux library.properties projectsroot@orangepizero:~/test/marceloaqno-spidev# ./configure
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[SECTION] Detecting GPIO driver.
[OK] GPIO driver detected:SPIDEV.
[SECTION] Detecting init system.
[OK] init system detected: systemd.
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.root@orangepizero:~/test/marceloaqno-spidev# make
gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
In file included from drivers/Linux/Stream.cpp:24:0:
./drivers/Linux/Arduino.h:17:18: fatal error: GPIO.h: No such file or directory
#include "GPIO.h"
^
compilation terminated.
Makefile:114: recipe for target 'build/drivers/Linux/Stream.o' failed
make: *** [build/drivers/Linux/Stream.o] Error 1
root@orangepizero:~/test/marceloaqno-spidev#Hi @Tag
We ( I and @pansen ) talked about that fork over mysensors github that @marceloaqno are doing to support Bananapi.
Banana have same soc than OPI, so the issues are the same on both boards for compile mysensors at least at that point. Maybe own OPI GPIO library (If I remeber Wiringpi or similar name or so) will be needed added to the mysensors software, but hope this can be easily do it like one last point.
Can you give a try on your OPI board and post results doing same commands than @eyesoft are doing for Banana on the forked github?
Then we can see if the same solution than @marceloaqno are building for Banana can be directly applied to our OPI.I mean do this steps:
git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
git checkout spidev...
then..../configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119
....
and lastmake
-
Hi @Tag
We ( I and @pansen ) talked about that fork over mysensors github that @marceloaqno are doing to support Bananapi.
Banana have same soc than OPI, so the issues are the same on both boards for compile mysensors at least at that point. Maybe own OPI GPIO library (If I remeber Wiringpi or similar name or so) will be needed added to the mysensors software, but hope this can be easily do it like one last point.
Can you give a try on your OPI board and post results doing same commands than @eyesoft are doing for Banana on the forked github?
Then we can see if the same solution than @marceloaqno are building for Banana can be directly applied to our OPI.I mean do this steps:
git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
git checkout spidev...
then..../configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119
....
and lastmake
Sure!, here you go:
root@orangepizero:~# rm -r MySensors/
root@orangepizero:~# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
Cloning into 'marceloaqno-spidev'...
remote: Counting objects: 13825, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
Receiving objects: 100% (13825/13825), 9.65 MiB | 3.01 MiB/s, done.
Resolving deltas: 100% (8284/8284), done.
Checking connectivity... done.root@orangepizero:~# cd marceloaqno-spidev/
root@orangepizero:~/marceloaqno-spidev# git checkout spidev
Branch spidev set up to track remote branch spidev from origin.
Switched to a new branch 'spidev'root@orangepizero:~/marceloaqno-spidev# ./configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[SECTION] Detecting GPIO driver.
[OK] GPIO driver detected:SPIDEV.
[SECTION] Detecting init system.
[OK] init system detected: systemd.
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.root@orangepizero:~/marceloaqno-spidev# make
gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
In file included from examples_linux/mysgw.cpp:74:0:
./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
#error No support for nRF24 radio on this platform
^
In file included from ./drivers/RF24/RF24.cpp:23:0,
from ./MySensors.h:294,
from examples_linux/mysgw.cpp:74:
./drivers/RF24/RF24.h:76:2: error: #error RF24 IRQ usage requires transactional SPI support
#error RF24 IRQ usage requires transactional SPI support
^
In file included from ./MySensors.h:294:0,
from examples_linux/mysgw.cpp:74:
./drivers/RF24/RF24.cpp:39:11: error: Not supported on linux-generic
hwDigitalWrite(MY_RF24_CS_PIN, level);
^
./drivers/RF24/RF24.cpp:44:11: error: Not supported on linux-generic
hwDigitalWrite(MY_RF24_CE_PIN, level);
^
./drivers/RF24/RF24.cpp:388:11: error: Not supported on linux-generic
hwPinMode(MY_RF24_CE_PIN,OUTPUT);
^
./drivers/RF24/RF24.cpp:389:11: error: Not supported on linux-generic
hwPinMode(MY_RF24_CS_PIN,OUTPUT);
^
./drivers/RF24/RF24.cpp:391:11: error: Not supported on linux-generic
hwPinMode(MY_RF24_IRQ_PIN,INPUT);
^
./drivers/RF24/RF24.cpp:37:32: warning: unused parameter ‘level’ [-Wunused-parameter]
LOCAL void RF24_csn(const bool level)
^
./drivers/RF24/RF24.cpp:42:31: warning: unused parameter ‘level’ [-Wunused-parameter]
LOCAL void RF24_ce(const bool level)
^
./drivers/RF24/RF24.cpp: In function ‘bool RF24_initialize()’:
./drivers/RF24/RF24.cpp:403:75: error: ‘FALLING’ was not declared in this scope
attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
^
./drivers/RF24/RF24.cpp:403:82: error: ‘attachInterrupt’ was not declared in this scope
attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
^
In file included from ./MySensors.h:346:0,
from examples_linux/mysgw.cpp:74:
./core/MyMainLinux.cpp: In function ‘void handle_sigint(int)’:
./core/MyMainLinux.cpp:44:33: error: ‘detachInterrupt’ was not declared in this scope
detachInterrupt(MY_RF24_IRQ_PIN);
^
Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
make: *** [build/examples_linux/mysgw.o] Error 1
root@orangepizero:~/marceloaqno-spidev#Thanks for all the time you guys put into this!! really appreciate it!!
-
Sure!, here you go:
root@orangepizero:~# rm -r MySensors/
root@orangepizero:~# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
Cloning into 'marceloaqno-spidev'...
remote: Counting objects: 13825, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
Receiving objects: 100% (13825/13825), 9.65 MiB | 3.01 MiB/s, done.
Resolving deltas: 100% (8284/8284), done.
Checking connectivity... done.root@orangepizero:~# cd marceloaqno-spidev/
root@orangepizero:~/marceloaqno-spidev# git checkout spidev
Branch spidev set up to track remote branch spidev from origin.
Switched to a new branch 'spidev'root@orangepizero:~/marceloaqno-spidev# ./configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[SECTION] Detecting GPIO driver.
[OK] GPIO driver detected:SPIDEV.
[SECTION] Detecting init system.
[OK] init system detected: systemd.
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.root@orangepizero:~/marceloaqno-spidev# make
gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
In file included from examples_linux/mysgw.cpp:74:0:
./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
#error No support for nRF24 radio on this platform
^
In file included from ./drivers/RF24/RF24.cpp:23:0,
from ./MySensors.h:294,
from examples_linux/mysgw.cpp:74:
./drivers/RF24/RF24.h:76:2: error: #error RF24 IRQ usage requires transactional SPI support
#error RF24 IRQ usage requires transactional SPI support
^
In file included from ./MySensors.h:294:0,
from examples_linux/mysgw.cpp:74:
./drivers/RF24/RF24.cpp:39:11: error: Not supported on linux-generic
hwDigitalWrite(MY_RF24_CS_PIN, level);
^
./drivers/RF24/RF24.cpp:44:11: error: Not supported on linux-generic
hwDigitalWrite(MY_RF24_CE_PIN, level);
^
./drivers/RF24/RF24.cpp:388:11: error: Not supported on linux-generic
hwPinMode(MY_RF24_CE_PIN,OUTPUT);
^
./drivers/RF24/RF24.cpp:389:11: error: Not supported on linux-generic
hwPinMode(MY_RF24_CS_PIN,OUTPUT);
^
./drivers/RF24/RF24.cpp:391:11: error: Not supported on linux-generic
hwPinMode(MY_RF24_IRQ_PIN,INPUT);
^
./drivers/RF24/RF24.cpp:37:32: warning: unused parameter ‘level’ [-Wunused-parameter]
LOCAL void RF24_csn(const bool level)
^
./drivers/RF24/RF24.cpp:42:31: warning: unused parameter ‘level’ [-Wunused-parameter]
LOCAL void RF24_ce(const bool level)
^
./drivers/RF24/RF24.cpp: In function ‘bool RF24_initialize()’:
./drivers/RF24/RF24.cpp:403:75: error: ‘FALLING’ was not declared in this scope
attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
^
./drivers/RF24/RF24.cpp:403:82: error: ‘attachInterrupt’ was not declared in this scope
attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
^
In file included from ./MySensors.h:346:0,
from examples_linux/mysgw.cpp:74:
./core/MyMainLinux.cpp: In function ‘void handle_sigint(int)’:
./core/MyMainLinux.cpp:44:33: error: ‘detachInterrupt’ was not declared in this scope
detachInterrupt(MY_RF24_IRQ_PIN);
^
Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
make: *** [build/examples_linux/mysgw.o] Error 1
root@orangepizero:~/marceloaqno-spidev#Thanks for all the time you guys put into this!! really appreciate it!!
Thanks to you to make the effort to try our "suppositions" ...
Mmmm...I see some interesting things on your results.
First all your results on OPI really differ from @eyesoft posted on the github. That can mean that Banana are much different (on drivers aspect) than OPI and then same solution cannot be applied to both...bad thing for us.
Then I see on make that the soc (and cpu) are bad seleected (I said this issue yesterday to @marceloaqno on general support post for mysensors gateway) because seems in the configure file have a bad selection about that specs when soc are a H3, and select a bad A53 type of cpu when is Armv7.
Then I don't know if all subsequent errors raised are significant or simply derived from that initially bad cpu selection.
Last I see that have issues on GPIO pins, but this is something we hoped would happen.
Anyway, I'm not coder so maybe are totally grong on all my observations and we need some coder (preferible @marceloaqno ) help us to deal with all that.
Regards and thanks to you !
-
Thanks to you to make the effort to try our "suppositions" ...
Mmmm...I see some interesting things on your results.
First all your results on OPI really differ from @eyesoft posted on the github. That can mean that Banana are much different (on drivers aspect) than OPI and then same solution cannot be applied to both...bad thing for us.
Then I see on make that the soc (and cpu) are bad seleected (I said this issue yesterday to @marceloaqno on general support post for mysensors gateway) because seems in the configure file have a bad selection about that specs when soc are a H3, and select a bad A53 type of cpu when is Armv7.
Then I don't know if all subsequent errors raised are significant or simply derived from that initially bad cpu selection.
Last I see that have issues on GPIO pins, but this is something we hoped would happen.
Anyway, I'm not coder so maybe are totally grong on all my observations and we need some coder (preferible @marceloaqno ) help us to deal with all that.
Regards and thanks to you !
I just see than on your previous compilation for NRF24 build from Tmr24h that you confirm is working OK, the compilation have same "bad" cpu type A53 that I figure that is a bad selection for H3 and seems that is not any problem...so now I'dont understand nothing..
Well mean only understand that we need a mysensor coder for help an guidance and if available make to it all the changes needed for OPI on mysenros.So we need help for all.
Regards
-
I just see than on your previous compilation for NRF24 build from Tmr24h that you confirm is working OK, the compilation have same "bad" cpu type A53 that I figure that is a bad selection for H3 and seems that is not any problem...so now I'dont understand nothing..
Well mean only understand that we need a mysensor coder for help an guidance and if available make to it all the changes needed for OPI on mysenros.So we need help for all.
Regards
-
@Tag The RF24 won't work on the OPi out of the box. Since the GPIO numbering is different it will work but only after some tweaks. I'm not sure if you're familiar with:
http://linux-sunxi.org/GPIO
Once you get the pin numbering figured out you can use the TMRh20 library. I confirm that it works on my OPi PC. Didn't unboxed my OPi Zero yet :yum:
However it's not very clear what sort of gateway you're trying to build. My project will have an OPi Zero running MyController, hooked up to an ATmega328 running the GatewaySerial sketch. The radio will be be connected to the ATmega328 chip. This way I wouldn't have to worry about GPIO pin numbering. -
I'm using a orangepi one and with your help I can compile it.
I tried it with a serial gateway. I connected a arduino nano with the gateway serial scath on it through USB to my orangepi one. DMESG say to me, that it is attached to ttyUSB0
So i tried to build the gateway with:
./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200make has no errors
after that, i tried to start it with:
sudo ./bin/mysgw -dIs started but i get this problem:
(
Do you know whats wrong with it?
-
@hausinger: try to change
./configure --my-gateway=serial --my-serial-port=/dev/USB0 --my-serial-baudrate=115200
to
./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200Be aware that USB devices are enumerated in the order they have been plugged in, so you cannot rely 100% on the arduino being "0".
@mihai-aldea: haha I didn't even consider this. are there any disadvantages except for the increased power consumption? (and slightly higher cost)
-
I'm using a orangepi one and with your help I can compile it.
I tried it with a serial gateway. I connected a arduino nano with the gateway serial scath on it through USB to my orangepi one. DMESG say to me, that it is attached to ttyUSB0
So i tried to build the gateway with:
./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200make has no errors
after that, i tried to start it with:
sudo ./bin/mysgw -dIs started but i get this problem:
(
Do you know whats wrong with it?
Hi again to all OPI users.
I like see that are great movements here.
I think main goal here is achieve that OPI board can run mysensors for herself connected radio boards.
Of course that can work OPI (or any board) if we attach over some port the radio board, because use of any "conventional" port (means usb, serial, eth) is the same for any hardware from the software view.Said this, I would simplificate (and reduce all hardware to minimum) all things I can and with a powerful board I can concentrate much of the roles needed.
Attach directly (means through GPIO) all hardware the board can manage without issues is my goal, and I think other much people.I think the error posted @hausinger for run mysgw seems derived from de main problem we see when try compile mysensors on OPI, and is that the need (maybe although not always necessary) that SPIDEV driver are up and working properly and mysensors software can not detect SPI bus (then fail SPIDEV) on OPI while is not being adapted all software stuff from some mysensor coder.
I hope some mysensors coder hear our call and soon can help here.
Regards
-
@hausinger: try to change
./configure --my-gateway=serial --my-serial-port=/dev/USB0 --my-serial-baudrate=115200
to
./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200Be aware that USB devices are enumerated in the order they have been plugged in, so you cannot rely 100% on the arduino being "0".
@mihai-aldea: haha I didn't even consider this. are there any disadvantages except for the increased power consumption? (and slightly higher cost)
@pansen said:
@hausinger: try to change
./configure --my-gateway=serial --my-serial-port=/dev/USB0 --my-serial-baudrate=115200
to
./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200Be aware that USB devices are enumerated in the order they have been plugged in, so you cannot rely 100% on the arduino being "0".
@mihai-aldea: haha I didn't even consider this. are there any disadvantages except for the increased power consumption? (and slightly higher cost)
ooh sorry. Sure, i wrote "ttyUSB0". It was a typing mistake here on the forum. In my configuration I already typed ttyUSB0
I edited my last post.But the issue is still the same.
-
@Tag The RF24 won't work on the OPi out of the box. Since the GPIO numbering is different it will work but only after some tweaks. I'm not sure if you're familiar with:
http://linux-sunxi.org/GPIO
Once you get the pin numbering figured out you can use the TMRh20 library. I confirm that it works on my OPi PC. Didn't unboxed my OPi Zero yet :yum:
However it's not very clear what sort of gateway you're trying to build. My project will have an OPi Zero running MyController, hooked up to an ATmega328 running the GatewaySerial sketch. The radio will be be connected to the ATmega328 chip. This way I wouldn't have to worry about GPIO pin numbering.Indeed good info about GPIO port.
I will be aware about your progress...seems your approach is a sure win.
Thanks
-
Hi again to all OPI users.
I like see that are great movements here.
I think main goal here is achieve that OPI board can run mysensors for herself connected radio boards.
Of course that can work OPI (or any board) if we attach over some port the radio board, because use of any "conventional" port (means usb, serial, eth) is the same for any hardware from the software view.Said this, I would simplificate (and reduce all hardware to minimum) all things I can and with a powerful board I can concentrate much of the roles needed.
Attach directly (means through GPIO) all hardware the board can manage without issues is my goal, and I think other much people.I think the error posted @hausinger for run mysgw seems derived from de main problem we see when try compile mysensors on OPI, and is that the need (maybe although not always necessary) that SPIDEV driver are up and working properly and mysensors software can not detect SPI bus (then fail SPIDEV) on OPI while is not being adapted all software stuff from some mysensor coder.
I hope some mysensors coder hear our call and soon can help here.
Regards
@jirm said:
Hi again to all OPI users.
I like see that are great movements here.
I think main goal here is achieve that OPI board can run mysensors for herself connected radio boards.
Of course that can work OPI (or any board) if we attach over some port the radio board, because use of any "conventional" port (means usb, serial, eth) is the same for any hardware from the software view.Said this, I would simplificate (and reduce all hardware to minimum) all things I can and with a powerful board I can concentrate much of the roles needed.
Attach directly (means through GPIO) all hardware the board can manage without issues is my goal, and I think other much people.I think the error posted @hausinger for run mysgw seems derived from de main problem we see when try compile mysensors on OPI, and is that the need (maybe although not always necessary) that SPIDEV driver are up and working properly and mysensors software can not detect SPI bus (then fail SPIDEV) on OPI while is not being adapted all software stuff from some mysensor coder.
I hope some mysensors coder hear our call and soon can help here.
Regards
In my case, why should it be necessary to have a working spi bus? I wanted to connect a working arduino with the mysensors gw scetch on it throug USB to the OPI and use this as a ethernet gateway.
My last goal is to use a USB to RS485 converter on my OPI (works as a Gateway) without a connected arduino, because my whole mysensors communication should be over RS485.
-
@jirm said:
Hi again to all OPI users.
I like see that are great movements here.
I think main goal here is achieve that OPI board can run mysensors for herself connected radio boards.
Of course that can work OPI (or any board) if we attach over some port the radio board, because use of any "conventional" port (means usb, serial, eth) is the same for any hardware from the software view.Said this, I would simplificate (and reduce all hardware to minimum) all things I can and with a powerful board I can concentrate much of the roles needed.
Attach directly (means through GPIO) all hardware the board can manage without issues is my goal, and I think other much people.I think the error posted @hausinger for run mysgw seems derived from de main problem we see when try compile mysensors on OPI, and is that the need (maybe although not always necessary) that SPIDEV driver are up and working properly and mysensors software can not detect SPI bus (then fail SPIDEV) on OPI while is not being adapted all software stuff from some mysensor coder.
I hope some mysensors coder hear our call and soon can help here.
Regards
In my case, why should it be necessary to have a working spi bus? I wanted to connect a working arduino with the mysensors gw scetch on it throug USB to the OPI and use this as a ethernet gateway.
My last goal is to use a USB to RS485 converter on my OPI (works as a Gateway) without a connected arduino, because my whole mysensors communication should be over RS485.
Of course you dont need any SPI bus.
And so sorry but before I checked so badly the error you posted.Not seems any related working error for mysgw. I think you have mysgw working fine, seems only they can not connect/work with sensor node.
You seems only need check node communication and adjust node configuration to have your mysgw working.
I don't see you found so much trouble to make working from usb-rs485 adapter if you can do it with usb/serial node, it's only matter that the driver of adapter can work with mysgw without so much issues.
Regards
-
Of course you dont need any SPI bus.
And so sorry but before I checked so badly the error you posted.Not seems any related working error for mysgw. I think you have mysgw working fine, seems only they can not connect/work with sensor node.
You seems only need check node communication and adjust node configuration to have your mysgw working.
I don't see you found so much trouble to make working from usb-rs485 adapter if you can do it with usb/serial node, it's only matter that the driver of adapter can work with mysgw without so much issues.
Regards
@jirm said:
Of course you dont need any SPI bus.
And so sorry but before I checked so badly the error you posted.Not seems any related working error for mysgw. I think you have mysgw working fine, seems only they can not connect/work with sensor node.
You seems only need check node communication and adjust node configuration to have your mysgw working.
I don't see you found so much trouble to make working from usb-rs485 adapter if you can do it with usb/serial node, it's only matter that the driver of adapter can work with mysgw without so much issues.
Regards
Thank you for your fast answer.
I try to answer it as best as I can.I tried it once again:
connected the arduino to the USB port on my OPI
DMESG says it is port ttyUSB0If i start the Gateway with:
sudo ./bin/mysgw -dI got the same result as posted before. My CPU Usage is at 100% on one core.
if I kill the process of mysgw and start openhab2 (my used controller) it can connect direct to the Arduino (connected as USB as before) and it worked fine.
So my configuration of my nodes (currently only 1 for testing) is working fine through rs485.
Summary:
Connection node -> Arduino Gateway = OK
Connetion from openhab2 to Arduino Gateway = OK (openhab2 on same OPI as Arduino)
OPI as a Ethernet - Serial Gateway = NOT OK, Problem is shown on my screenshot.USB-RS485:
I also tried this, but after my configuration:
./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
I can do the "make" command.
After that I start it with:
sudo ./bin/mysgw -d
I only get this:

I can now type a new command in the console (Gateway quit itself) -
Hi All,
Collected some info on the OPI zero CPU:root@orangepizero:/proc# more cpuinfo
Processor : ARMv7 Processor rev 5 (v7l)
processor : 0
BogoMIPS : 2400.00processor : 1
BogoMIPS : 2400.00processor : 2
BogoMIPS : 2400.00processor : 3
BogoMIPS : 2400.00Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5Hardware : sun8i
Revision : 0000
Serial : 2467783d034e20000098
root@orangepizero:/proc#Dmesg Output:
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.4.113-sun8i (root@xenial) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) ) #50 SMP PREEMPT Mon Nov
14 08:41:55 CET 2016
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: sun8iIt should be a H2+, but I have seen H3 (think that was with an FTDI interface on the debug port....
-
@jirm said:
Of course you dont need any SPI bus.
And so sorry but before I checked so badly the error you posted.Not seems any related working error for mysgw. I think you have mysgw working fine, seems only they can not connect/work with sensor node.
You seems only need check node communication and adjust node configuration to have your mysgw working.
I don't see you found so much trouble to make working from usb-rs485 adapter if you can do it with usb/serial node, it's only matter that the driver of adapter can work with mysgw without so much issues.
Regards
Thank you for your fast answer.
I try to answer it as best as I can.I tried it once again:
connected the arduino to the USB port on my OPI
DMESG says it is port ttyUSB0If i start the Gateway with:
sudo ./bin/mysgw -dI got the same result as posted before. My CPU Usage is at 100% on one core.
if I kill the process of mysgw and start openhab2 (my used controller) it can connect direct to the Arduino (connected as USB as before) and it worked fine.
So my configuration of my nodes (currently only 1 for testing) is working fine through rs485.
Summary:
Connection node -> Arduino Gateway = OK
Connetion from openhab2 to Arduino Gateway = OK (openhab2 on same OPI as Arduino)
OPI as a Ethernet - Serial Gateway = NOT OK, Problem is shown on my screenshot.USB-RS485:
I also tried this, but after my configuration:
./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
I can do the "make" command.
After that I start it with:
sudo ./bin/mysgw -d
I only get this:

I can now type a new command in the console (Gateway quit itself)@hausinger That shouldn't happen (gateway quitting itself). Could you submit the debug log with MY_DEBUG_VERBOSE_RF24 enabled?
-
@hausinger That shouldn't happen (gateway quitting itself). Could you submit the debug log with MY_DEBUG_VERBOSE_RF24 enabled?
@marceloaqno said:
@hausinger That shouldn't happen (gateway quitting itself). Could you submit the debug log with MY_DEBUG_VERBOSE_RF24 enabled?
Yes i can check that, but how?
I tried it to enable it in "example_linux" => mysgw.cpp (added the line "#define MY_DEBUG_VERBOSE_RF24")
I also tried it in the file: "MyConfig.h" (also added the line "#define MY_DEBUG_VERBOSE_RF24")But my output is still the same in the console.