Orange PI zero. Problem running the gateway
-
Have followed the instructions on creating the orange pi zero gateway.
The only difference - i am running a dietPi OS (couldn't install armbian).
Wired all as recommended and also have added the IRQ pin (GPIO10)Strangely enough didn't have to alter the bin2fex /boot/script.bin /tmp/orange.fex as it already contained the necessary information.
Ran the config with the following options
./configure --spi-spidev-device=/dev/spidev1.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 --my-rf24-irq-pin=10 --my-gateway=ethernet --my-port=5003Everything compiled but upon launching got the
# sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG--Q-,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: Could not open /sys/class/gpio/gpio10/directionTried
#echo "10" |sudo tee /sys/class/gpio/export 10 tee: /sys/class/gpio/export: Device or resource busyAny ideas on this would be much appreciated...
-
Tried to compile without IRQ pin. So there is no communication with the radio (tried different radio modules).
Seems some problem with GPIO pins on DietPI?
-
# gpio readall +-----+-----+----------+------+---+-Orange Pi+---+---+------+---------+-----+--+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 12 | 8 | SDA.0 | ALT5 | 0 | 3 || 4 | | | 5V | | | | 11 | 9 | SCL.0 | ALT5 | 0 | 5 || 6 | | | 0v | | | | 6 | 7 | GPIO.7 | ALT3 | 0 | 7 || 8 | 1 | OUT | TxD3 | 15 | 13 | | | | 0v | | | 9 || 10 | 0 | ALT5 | RxD3 | 16 | 14 | | 1 | 0 | RxD2 | ALT5 | 0 | 11 || 12 | 0 | ALT3 | GPIO.1 | 1 | 110 | | 0 | 2 | TxD2 | ALT5 | 0 | 13 || 14 | | | 0v | | | | 3 | 3 | CTS2 | ALT3 | 0 | 15 || 16 | 0 | ALT3 | GPIO.4 | 4 | 68 | | | | 3.3v | | | 17 || 18 | 0 | ALT3 | GPIO.5 | 5 | 71 | | 64 | 12 | MOSI | ALT4 | 0 | 19 || 20 | | | 0v | | | | 65 | 13 | MISO | ALT4 | 0 | 21 || 22 | 0 | OUT | RTS2 | 6 | 2 | | 66 | 14 | SCLK | ALT4 | 0 | 23 || 24 | 0 | ALT4 | CE0 | 10 | 67 | | | | 0v | | | 25 || 26 | 0 | ALT3 | GPIO.11 | 11 | 21 | | 19 | 30 | SDA.1 | ALT4 | 0 | 27 || 28 | 0 | ALT4 | SCL.1 | 31 | 18 | | 7 | 21 | GPIO.21 | ALT3 | 0 | 29 || 30 | | | 0v | | | | 8 | 22 | GPIO.22 | ALT3 | 0 | 31 || 32 | 0 | ALT3 | RTS1 | 26 | 200 | | 9 | 23 | GPIO.23 | ALT3 | 0 | 33 || 34 | | | 0v | | | | 10 | 24 | GPIO.24 | OUT | 1 | 35 || 36 | 0 | ALT3 | CTS1 | 27 | 201 | | 20 | 25 | GPIO.25 | OUT | 1 | 37 || 38 | 0 | ALT5 | TxD1 | 28 | 198 | | | | 0v | | | 39 || 40 | 0 | ALT5 | RxD1 | 29 | 199 | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+-Orange Pi+---+------+----------+-----+-----+
-
try reinstalling wiringPi if you have updated the firmware after it was installed
-
I took the plunge. And now ready to give up.
Got out another sd card. Installed fresh armbian.
Ubuntu server β legacy kernel
Did nothing else to the installation. Than followed the guide step by step. No deviations. The only part that it is not clear in the manual - about configure options. I believe some will first run
./configure --spi-spidev-device=/dev/spidev1.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13and then run
./configure --my-gateway=ethernet --my-port=5003Won't this overwrite the first config file? So just ran the first one.
And no success.
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG----,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:DIS mysgw: TSF:TDI:TSL mysgw: TSM:FAIL:RE-INIT mysgw: TSM:INIT mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=2 mysgw: TSM:FAIL:DIS mysgw: TSF:TDI:TSL ^Cmysgw: Received SIGINTPut some more solder on the connectors of OrangePi. No success. Put a 10uF 50V capacitor on the nrf24 - no success.
Maybe something has change in the inner workings?P.S. On fresh armbian
root@orangepizero:~/MySensors# gpio readall
-bash: gpio: command not found
-
you have to enable SPI in the dietconfig I think, the ./configure needs to be one single command and you need to add wiringPi in the dietpi-software
-
@gohan Thanks for helping out. Is SPI supposed to be enabled? Doesn't state it anywhere. Will try it out.
Yes i also believe ./configure shoul be one line - it's just that documentation is not that clear for not tech guys like me. So if maintainer of the page is reading this - it should be better done like for the Raspberry gateway page. It's more clear.Will try the SPI - hope it helps.
P.S. Have just reconnected the radio to my RPi3... So it's not necessary problem with myself
Will try to update the topic with OrangePi struggleRPI3 output
sudo ./bin/mysgw -d mysgw: Config file /etc/mysensors.dat does not exist, creating new config file. mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG----,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: Listening for connections on 0.0.0.0:5003 mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1
-
Since you are using a SPI device, you need to enable SPI on the operating system, that's what I did for my rpi3 so I'm expecting the same for the orange pi
-
@moskovskiy82 said in Orange PI zero. Problem running the gateway:
Yes i also believe ./configure shoul be one line - it's just that documentation is not that clear for not tech guys like me. So if maintainer of the page is reading this - it should be better done like for the Raspberry gateway page. It's more clear.
I've updated the Orange Pi page. Thanks for catching this.