💬 Building a Orange Pi Gateway
-
@Reza
Your GW is OK, so exit debug mode by use Ctrl + C command, then follow the end of the procedure to install and auto start GW services.Regards.
-
@Tag i am using similar to zero . i dont know how configure GPIO for orange pi one
i thought orange one is similar to zero for configure....
-
@SdeWeb so now my problem is related to GPIO and configure this ? can you help me that how i can configure this ?
-
I do not have the OPI One HW available..... so that will be a problem.
you need to start reading the OPI documentation, and see if the pinout you are using is correct, I know for example that OPI Zero used the SPI1 channel since SPI0 is used for the NAND flash. now it might be that the OPI One does not have the NAND flash so you can use the SPI0 channel.Try to start here
or here
If you read carefully you will see that pin 19-21-23 are on the opi ONE SPI0, and on the OPI Zero SPI1.....
This is the OPI Zero page: http://linux-sunxi.org/Orange_Pi_Zero#Orientation_of_the_GPIO_header
ANd the OPI One page:
http://linux-sunxi.org/Orange_Pi_One#Orientation_of_the_GPIO_header@marceloaqno helped build this for the OPI Zero.... and SPI was an important part to get this working...
Try this:
./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=3
worth a try if you use SPI0, and GPIO3 for the CE pin (on the ONE the ce SPI0 pin is 3 according to the wiki page)
-
@Tag thank you. but i can not setup this . very complicated perhaps @marceloaqno can setup this.
thank you
-
@Tag
GPIO3 is pin 15? so change wiring? CE to pin15 ?
-
Can imagine that it is complicated, assuming you used the OPI zero pinout, try the configure example from my previous post. might work.
Another option you have is get an arduino with the radio attached and just plug it into usb, your messages will appear on i.e /dev/ttyUSB0
-
try this:
./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=3
See this page for your header pinout: http://linux-sunxi.org/Orange_Pi_One#Orientation_of_the_GPIO_header
the --my-rf24-cs-pin= is key to have it right on your system
-
-
@Tag my-rf24-cs-pin=3 . 3 is pin15 ? i do it. cs is connect to pin15 (GPIO3) and configre again .but dont work
-
@Reza Try to connect like mine, look above in this thread, then use my own ./configure setup.
If it's not work, try to use the .fex file for your Orange PI download it here :
http://linux-sunxi.org/Orange_Pi_One#Sunxi.2FLegacy_Kernel
-
@SdeWeb said in Building a Orange Pi Gateway:
If it's not work, try to use the .fex file for your Orange PI download it here :
sorry i cannot understand what is say in this link. thank you .perhaps other friend can found this for orange pi one or lite . i cannot understand really.
-
Did you also change the SPI channel?
--spi-spidev-device=/dev/spidev0.0
if you use the OPIzero pinout, SPI1 will be SPI0 on the OPI one......
Your other option will be using a serial gateway: https://www.mysensors.org/build/serial_gateway
This works for sure on the OPI One
-
@Tag i change this but dont work, i am useing serial gateway now.but i want use a orangepi gateway:(
-
@Reza
Hi,
Tell us how you connect your NRF24 module on your Orange PI.On this guide https://www.mysensors.org/build/orange do you followed the section "configure spidev" ?
The main things are :
1 - install sunxy-tools
2 - install MySensors.gitBut the pinout of the GPIO on your Orange PI is different of the Orange PI zero explained here : https://www.mysensors.org/build/orange
So you need to modify the script.bin file, with the command "bin2fex / fex2bin" as explained in the "configure spidev" chapter, if you fail to find the right configuration, try to use the .fex file that you can download here :
If you have a Orange PI lite :
https://github.com/igorpecovnik/lib/blob/master/config/fex/orangepilite.fexOr if you have a Orange PI One :
https://github.com/igorpecovnik/lib/blob/master/config/fex/orangepione.fexthen "fex2bin" the file you downloaded, to replace your own script.bin as described in the tuto at the chapter "configure spidev".
I think that the pinout of your Orange PI is the same than mine, i got a Orange PI Plus 2E, so look my setup as explained above in this forum, then connect your NRF24 module like mine and use my "./configure" setup.
If you succes your gateway setup, dont forget than the next step it's to install a controler to drive it, so you'll need to read guide about setup a controler : https://www.mysensors.org/controller
Regards.
-
@SdeWeb
this is my levels:sudo apt-get update sudo apt-get install sunxi-tools bin2fex /boot/script.bin /tmp/orange.fex nano /tmp/orange.fex
and replace
https://github.com/igorpecovnik/lib/blob/master/config/fex/orangepione.fex
and save .
so:sudo fex2bin /tmp/orange.fex /boot/script.bin sudo reboot root@orangepione:~# ls -l /dev/spidev* crw------- 1 root root 153, 0 Mar 16 12:00 /dev/spidev0.0 sudo modprobe gpio-sunxi echo "gpio-sunxi" >> /etc/modules git clone https://github.com/mysensors/MySensors.git cd MySensors ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 make sudo ./bin/mysgw -d
so i see :
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT
wiring is similar to zero...
-
@Reza
Try to wire like mine and apply my configure setup, here is the copy/paste of the famous previous post from me :I connected my NRF24L01 on OPI P2E like this :
NRF24L01 Port Name / (Pin N°) ----- OPI Port (Pin N°) / Name GND (1) <-----------> (20) / GND VCC (2) <-----------> (17) / 3.3V PWR CE (3) <-----------> (22) / (PA2 / GPIO2) CSN (4) <-----------> (24) / (PC3 / GPIO67) SCK (5) <-----------> (23) MOSI (6) <-----------> (19) MOSI MISO (7) <-----------> (21) MISO IRQ (8) <-----------> NC
So "MySensors" setup is :
./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67
Then
./bin/mysgw -d
Return :
root@orangepiplus2e:~/MySensors# ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta 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
Best.
Seb.
-
@SdeWeb
i do wiring true and do your levels... but there is same problem...root@orangepione:~/MySensors# ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 [SECTION] Detecting target machine. [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l. [SECTION] Checking GPIO Sysfs. [OK] /sys/class/gpio/export found [SECTION] Detecting SPI driver. [OK] SPI driver detected:SPIDEV. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@orangepione:~/MySensors# ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 [SECTION] Detecting target machine. [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l. [SECTION] Checking GPIO Sysfs. [OK] /sys/class/gpio/export found [SECTION] Detecting SPI driver. [OK] SPI driver detected:SPIDEV. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@orangepione:~/MySensors# make gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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/GPIO.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.o g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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/interrupt.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o g++ -MT build/drivers/Linux/SerialSimulator.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialSimulator.cpp -o build/drivers/Linux/SerialSimulator.o g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o examples_linux/mysgw.cpp:31:0: warning: "MY_RADIO_NRF24" redefined #define MY_RADIO_NRF24 ^ <command-line>:0:0: note: this is the location of the previous definition g++ -MT build/drivers/SPIDEV/SPI.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/SPIDEV/SPI.cpp -o build/drivers/SPIDEV/SPI.o g++ -pthread -o bin/mysgw build/drivers/Linux/log.o build/drivers/Linux/noniso.o build/drivers/Linux/GPIO.o build/drivers/Linux/Print.o build/drivers/Linux/EthernetClient.o build/drivers/Linux/SerialPort.o build/drivers/Linux/Stream.o build/drivers/Linux/IPAddress.o build/drivers/Linux/compatibility.o build/drivers/Linux/interrupt.o build/drivers/Linux/SerialSimulator.o build/drivers/Linux/SoftEeprom.o build/drivers/Linux/EthernetServer.o build/examples_linux/mysgw.o build/drivers/SPIDEV/SPI.o root@orangepione:~/MySensors# sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT mysgw: TSM:FAIL:RE-INIT mysgw: TSM:INIT mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=2 mysgw: TSM:FAIL:PDT
-
this is all my steps
root@orangepione:~# sudo apt-get update Hit:1 http://ports.ubuntu.com xenial InRelease Hit:2 http://apt.armbian.com xenial InRelease Hit:3 http://ports.ubuntu.com xenial-security InRelease Hit:4 http://ports.ubuntu.com xenial-updates InRelease Hit:5 http://ports.ubuntu.com xenial-backports InRelease Reading package lists... Done root@orangepione:~# bin2fex /boot/script.bin /tmp/orange.fex fexc-bin: /boot/script.bin: version: 1.2 fexc-bin: /boot/script.bin: size: 34704 (81 sections), header value: 34704 root@orangepione:~# nano /tmp/orange.fex root@orangepione:~# ls -l /dev/spidev* crw------- 1 root root 153, 0 Mar 19 11:17 /dev/spidev0.0 root@orangepione:~# sudo modprobe gpio-sunxi root@orangepione:~# echo "gpio-sunxi" >> /etc/modules root@orangepione:~# vncserver New 'X' desktop is orangepione:1 Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/orangepione:1.log root@orangepione:~# *** Error in `pasystray': corrupted double-linked list (not small): 0x01cdb908 *** git clone https://github.com/mysensors/MySensors.git Cloning into 'MySensors'... remote: Counting objects: 13985, done. remote: Compressing objects: 100% (45/45), done. remote: Total 13985 (delta 8), reused 0 (delta 0), pack-reused 13940 Receiving objects: 100% (13985/13985), 9.70 MiB | 181.00 KiB/s, done. Resolving deltas: 100% (8436/8436), done. Checking connectivity... done. root@orangepione:~# cd MySensors root@orangepione:~/MySensors# ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 [SECTION] Detecting target machine. [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l. [SECTION] Checking GPIO Sysfs. [OK] /sys/class/gpio/export found [SECTION] Detecting SPI driver. [OK] SPI driver detected:SPIDEV. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@orangepione:~/MySensors# ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 [SECTION] Detecting target machine. [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l. [SECTION] Checking GPIO Sysfs. [OK] /sys/class/gpio/export found [SECTION] Detecting SPI driver. [OK] SPI driver detected:SPIDEV. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@orangepione:~/MySensors# make gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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/GPIO.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.o g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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/interrupt.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o g++ -MT build/drivers/Linux/SerialSimulator.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialSimulator.cpp -o build/drivers/Linux/SerialSimulator.o g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o g++ -MT build/drivers/SPIDEV/SPI.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/SPIDEV/SPI.cpp -o build/drivers/SPIDEV/SPI.o g++ -pthread -o bin/mysgw build/drivers/Linux/log.o build/drivers/Linux/noniso.o build/drivers/Linux/GPIO.o build/drivers/Linux/Print.o build/drivers/Linux/EthernetClient.o build/drivers/Linux/SerialPort.o build/drivers/Linux/Stream.o build/drivers/Linux/IPAddress.o build/drivers/Linux/compatibility.o build/drivers/Linux/interrupt.o build/drivers/Linux/SerialSimulator.o build/drivers/Linux/SoftEeprom.o build/drivers/Linux/EthernetServer.o build/examples_linux/mysgw.o build/drivers/SPIDEV/SPI.o root@orangepione:~/MySensors# sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG----,VER=2.2.0-beta mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT mysgw: TSM:FAIL:RE-INIT mysgw: TSM:INIT mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=2 mysgw: TSM:FAIL:PDT mysgw: TSM:FAIL:RE-INIT mysgw: TSM:INIT mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=3 mysgw: TSM:FAIL:PDT
-
Can you post a picture of your wiring?
-
@Reza Hello,
Did you modifying the .Fex file before applying the 'configure' setup ?
What did you do with nano ?Regards.
-
@pansen
red is 3.3
brown is GND
green is CE
orange is SCK
yellow is MISO
violet is CS
blue is MOSI
IRQ is empty
-
@SdeWeb
yes. use:sudo nano /tmp/orange.fex
and remove all line and copy , paste your link and save this.
now orange.fex is:[product] version = "100" machine = "Xunlong Orange Pi One" [platform] debug_mode = 1 eraseflag = 1 next_work = 2 [target] boot_clock = 1008 storage_type = -1 [key_detect_en] keyen_flag = 0 [fel_key] fel_key_max = 7 fel_key_min = 2 [card_boot] logical_start = 40960 sprite_work_delay = 500 sprite_err_delay = 200 sprite_gpio0 = port:PL10<1><default><default><default> next_work = 3 [box_start_os] used = 1 start_type = 1 irkey_used = 1 pmukey_used = 1 pmukey_num = 3 led_power = 0 led_state = 0 [boot_init_gpio] used = 1 gpio0 = port:PL10<1><default><default><1> gpio1 = port:PG11<1><default><default><1> [recovery_para] used = 1 mode = 2 recovery_key = port:PL04<0><default><default><default> [pm_para] standby_mode = 1 [card0_boot_para] card_ctrl = 0 card_high_speed = 1 card_line = 4 sdc_d1 = port:PF00<2><1><2><default> sdc_d0 = port:PF01<2><1><2><default> sdc_clk = port:PF02<2><1><2><default> sdc_cmd = port:PF03<2><1><2><default> sdc_d3 = port:PF04<2><1><2><default> sdc_d2 = port:PF05<2><1><2><default> [card2_boot_para] card_ctrl = 2 card_high_speed = 1 card_line = 8 sdc_cmd = port:PC06<3><1><2><default> sdc_clk = port:PC05<3><1><2><default> sdc_d0 = port:PC08<3><1><2><default> sdc_d1 = port:PC09<3><1><2><default> sdc_d2 = port:PC10<3><1><2><default> sdc_d3 = port:PC11<3><1><2><default> sdc_d4 = port:PC12<3><1><2><default> sdc_d5 = port:PC13<3><1><2><default> sdc_d6 = port:PC14<3><1><2><default> sdc_d7 = port:PC15<3><1><2><default> sdc_2xmode = 1 sdc_ddrmode = 1 [twi_para] twi_port = 0 twi_scl = port:PA11<2><default><default><default> twi_sda = port:PA12<2><default><default><default> [uart_para] uart_debug_port = 0 uart_debug_tx = port:PA04<2><1><default><default> uart_debug_rx = port:PA05<2><1><default><default> [force_uart_para] force_uart_port = 0 force_uart_tx = port:PF02<3><1><default><default> force_uart_rx = port:PF04<3><1><default><default> [jtag_para] jtag_enable = 0 jtag_ms = port:PA00<3><default><default><default> jtag_ck = port:PA01<3><default><default><default> jtag_do = port:PA02<3><default><default><default> jtag_di = port:PA03<3><default><default><default> [clock] pll_video = 297 pll_ve = 402 pll_periph0 = 600 pll_gpu = 576 pll_periph1 = 600 pll_de = 864 [dram_para] dram_clk = 624 dram_type = 3 dram_zq = 0x3b3bfb dram_odt_en = 1 dram_para1 = 283377664 dram_para2 = 0 dram_mr0 = 6208 dram_mr1 = 64 dram_mr2 = 24 dram_mr3 = 2 dram_tpr0 = 0x48a192 dram_tpr1 = 0x1c2418d dram_tpr2 = 0x76051 dram_tpr3 = 0x0 dram_tpr4 = 0x0 dram_tpr5 = 0x0 dram_tpr6 = 0x64 dram_tpr7 = 0x0 dram_tpr8 = 0x0 dram_tpr9 = 0x0 dram_tpr10 = 0x0 dram_tpr11 = 0x6aaa0000 dram_tpr12 = 0x7979 dram_tpr13 = 0x800800 [wakeup_src_para] cpu_en = 0 cpu_freq = 48 pll_ratio = 273 dram_selfresh_en = 1 dram_freq = 36 wakeup_src0 = wakeup_src_wl = port:PG10<4><default><default><0> wakeup_src_bt = port:PL03<6><default><default><0> [twi0] twi_used = 1 twi_scl = port:PA11<2><default><default><default> twi_sda = port:PA12<2><default><default><default> [twi1] twi_used = 1 twi_scl = port:PA18<3><default><default><default> twi_sda = port:PA19<3><default><default><default> [twi2] twi_used = 0 twi_scl = port:PE12<3><default><default><default> twi_sda = port:PE13<3><default><default><default> [uart0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PA04<2><1><default><default> uart_rx = port:PA05<2><1><default><default> [uart1] uart_used = 0 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> uart_rts = port:PG08<2><1><default><default> uart_cts = port:PG09<2><1><default><default> [uart2] uart_used = 0 uart_port = 2 uart_type = 4 uart_tx = port:PA00<2><1><default><default> uart_rx = port:PA01<2><1><default><default> uart_rts = port:PA02<2><1><default><default> uart_cts = port:PA03<2><1><default><default> [uart3] uart_used = 0 uart_port = 3 uart_type = 4 uart_tx = port:PA13<3><1><default><default> uart_rx = port:PA14<3><1><default><default> uart_rts = port:PA15<3><1><default><default> uart_cts = port:PA16<3><1><default><default> [spi0] spi_used = 1 spi_cs_bitmap = 1 spi_mosi = port:PC00<3><default><default><default> spi_miso = port:PC01<3><default><default><default> spi_sclk = port:PC02<3><default><default><default> spi_cs0 = port:PC03<3><1><default><default> [spi1] spi_used = 0 spi_cs_bitmap = 1 spi_cs0 = port:PA13<2><1><default><default> spi_sclk = port:PA14<2><default><default><default> spi_mosi = port:PA15<2><default><default><default> spi_miso = port:PA16<2><default><default><default> [spi_devices] spi_dev_num = 1 [spi_board0] modalias = "spidev" max_speed_hz = 33000000 bus_num = 0 chip_select = 0 mode = 0 full_duplex = 1 manual_cs = 0 ; NOTE: This section is necessary only for "gpio_sunxi" driver ; which is obsolete for H3 boards [gpio_para] gpio_used = 0 gpio_num = 0 ;[led_assign] ;normal_led = "gpio_pin_2" ;standby_led = "gpio_pin_1" [leds_para] leds_used = 1 green_led = port:PL10<1><default><default><1> green_led_active_low = 0 red_led = port:PA15<1><default><default><0> red_led_active_low = 0 [ths_para] ths_used = 1 ths_trip1_count = 6 ths_trip1_0 = 75 ths_trip1_1 = 80 ths_trip1_2 = 85 ths_trip1_3 = 90 ths_trip1_4 = 95 ths_trip1_5 = 105 ths_trip1_6 = 0 ths_trip1_7 = 0 ths_trip1_0_min = 0 ths_trip1_0_max = 1 ths_trip1_1_min = 1 ths_trip1_1_max = 2 ths_trip1_2_min = 2 ths_trip1_2_max = 3 ths_trip1_3_min = 3 ths_trip1_3_max = 4 ths_trip1_4_min = 4 ths_trip1_4_max = 5 ths_trip1_5_min = 5 ths_trip1_5_max = 7 ths_trip1_6_min = 0 ths_trip1_6_max = 0 ths_trip2_count = 1 ths_trip2_0 = 105 [cooler_table] cooler_count = 8 cooler0 = "1200000 4 4294967295 0" cooler1 = "912000 4 4294967295 0" cooler2 = "768000 4 4294967295 0" cooler3 = "648000 4 4294967295 0" cooler4 = "480000 4 4294967295 0" cooler5 = "480000 3 4294967295 0" cooler6 = "480000 2 4294967295 0" cooler7 = "480000 1 4294967295 0" [nand0_para] nand_support_2ch = 0 nand0_used = 0 nand0_we = port:PC00<2><default><default><default> nand0_ale = port:PC01<2><default><default><default> nand0_cle = port:PC02<2><default><default><default> nand0_ce1 = port:PC03<2><default><default><default> nand0_ce0 = port:PC04<2><default><default><default> nand0_nre = port:PC05<2><default><default><default> nand0_rb0 = port:PC06<2><default><default><default> nand0_rb1 = port:PC07<2><default><default><default> nand0_d0 = port:PC08<2><default><default><default> nand0_d1 = port:PC09<2><default><default><default> nand0_d2 = port:PC10<2><default><default><default> nand0_d3 = port:PC11<2><default><default><default> nand0_d4 = port:PC12<2><default><default><default> nand0_d5 = port:PC13<2><default><default><default> nand0_d6 = port:PC14<2><default><default><default> nand0_d7 = port:PC15<2><default><default><default> nand0_ndqs = port:PC16<2><default><default><default> [boot_disp] advert_disp = 0 auto_hpd = 1 output_type = 4 hdmi_channel = 0 hdmi_mode = 4 cvbs_channel = 1 cvbs_mode = 11 output_full = 1 hdmi_mode_check = 1 [disp_init] disp_init_enable = 1 disp_mode = 0 screen0_output_type = 3 screen0_output_mode = 5 screen1_output_type = 3 screen1_output_mode = 5 fb0_format = 0 fb0_width = 0 fb0_height = 0 fb1_format = 0 fb1_width = 0 fb1_height = 0 [hdmi_para] hdmi_used = 1 hdmi_power = "vcc-hdmi-18" [tv_para] tv_used = 0 tv_dac_used = 1 tv_dac_src0 = 0 [pwm0_para] pwm_used = 0 pwm_positive = port:PA05<3><0><default><default> ; If set gamc_phy to use = 2 [gmac0] gmac_used = 2 gmac_power1 = [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00<2><default><default><default> vip_csi_mck = port:PE01<2><default><default><default> vip_csi_hsync = port:PE02<2><default><default><default> vip_csi_vsync = port:PE03<2><default><default><default> vip_csi_d0 = port:PE04<2><default><default><default> vip_csi_d1 = port:PE05<2><default><default><default> vip_csi_d2 = port:PE06<2><default><default><default> vip_csi_d3 = port:PE07<2><default><default><default> vip_csi_d4 = port:PE08<2><default><default><default> vip_csi_d5 = port:PE09<2><default><default><default> vip_csi_d6 = port:PE10<2><default><default><default> vip_csi_d7 = port:PE11<2><default><default><default> vip_csi_sck = port:PE12<2><default><default><default> vip_csi_sda = port:PE13<2><default><default><default> vip_dev0_mname = "gc2035" vip_dev0_pos = "front" vip_dev0_lane = 1 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 120 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 0 vip_dev0_vflip = 1 vip_dev0_hflip = 1 vip_dev0_iovdd = "" vip_dev0_iovdd_vol = 2800000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 2800000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1800000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 2800000 vip_dev0_power_en = port:PA17<1><default><default><1> vip_dev0_reset = port:PE14<1><default><default><1> vip_dev0_pwdn = port:PE15<1><default><default><0> vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = vip_dev0_act_used = 0 vip_dev0_act_name = "ad5820_act" vip_dev0_act_slave = 24 vip_dev1_mname = "" vip_dev1_pos = "rear" vip_dev1_lane = 1 vip_dev1_twi_id = 0 vip_dev1_twi_addr = vip_dev1_isp_used = 0 vip_dev1_fmt = 1 vip_dev1_stby_mode = 0 vip_dev1_vflip = 0 vip_dev1_hflip = 0 vip_dev1_iovdd = "" vip_dev1_iovdd_vol = 2800000 vip_dev1_avdd = "" vip_dev1_avdd_vol = 2800000 vip_dev1_dvdd = "" vip_dev1_dvdd_vol = 1500000 vip_dev1_afvdd = "" vip_dev1_afvdd_vol = 2800000 vip_dev1_power_en = vip_dev1_reset = vip_dev1_pwdn = vip_dev1_flash_en = vip_dev1_flash_mode = vip_dev1_af_pwdn = [tvout_para] tvout_used = 0 tvout_channel_num = tv_en = 0 [tvin_para] tvin_used = 0 tvin_channel_num = [di_para] di_used = 1 [mmc0_para] sdc_used = 1 sdc_detmode = 3 sdc_buswidth = 4 sdc_clk = port:PF02<2><1><2><default> sdc_cmd = port:PF03<2><1><2><default> sdc_d0 = port:PF01<2><1><2><default> sdc_d1 = port:PF00<2><1><2><default> sdc_d2 = port:PF05<2><1><2><default> sdc_d3 = port:PF04<2><1><2><default> sdc_det = port:PF06<0><1><2><default> sdc_use_wp = 0 sdc_wp = sdc_isio = 0 sdc_regulator = "none" sdc_power_supply = "none" [mmc1_para] sdc_used = 1 sdc_detmode = 4 sdc_buswidth = 4 sdc_clk = port:PG00<2><1><3><default> sdc_cmd = port:PG01<2><1><3><default> sdc_d0 = port:PG02<2><1><3><default> sdc_d1 = port:PG03<2><1><3><default> sdc_d2 = port:PG04<2><1><3><default> sdc_d3 = port:PG05<2><1><3><default> sdc_det = sdc_use_wp = 0 sdc_wp = sdc_isio = 1 sdc_regulator = "none" sdc_power_supply = "none" sdc_2xmode = 1 sdc_ddrmode = 1 [mmc2_para] sdc_used = 0 sdc_detmode = 3 sdc_buswidth = 8 sdc_clk = port:PC05<3><1><2><default> sdc_cmd = port:PC06<3><1><2><default> sdc_d0 = port:PC08<3><1><2><default> sdc_d1 = port:PC09<3><1><2><default> sdc_d2 = port:PC10<3><1><2><default> sdc_d3 = port:PC11<3><1><2><default> sdc_d4 = port:PC12<3><1><2><default> sdc_d5 = port:PC13<3><1><2><default> sdc_d6 = port:PC14<3><1><2><default> sdc_d7 = port:PC15<3><1><2><default> emmc_rst = port:PC16<3><1><2><default> sdc_det = sdc_use_wp = 0 sdc_wp = sdc_isio = 0 sdc_regulator = "none" sdc_power_supply = "none" sdc_2xmode = 1 sdc_ddrmode = 1 [smc_para] smc_used = 0 smc_rst = port:PA09<2><default><default><default> smc_vppen = port:PA20<3><default><default><default> smc_vppp = port:PA21<3><default><default><default> smc_det = port:PA10<2><default><default><default> smc_vccen = port:PA06<2><default><default><default> smc_sck = port:PA07<2><default><default><default> smc_sda = port:PA08<2><default><default><default> [usbc0] usb_used = 1 usb_port_type = 2 usb_detect_type = 0 usb_id_gpio = port:PG12<0><1><default><default> usb_det_vbus_gpio = port:PG12<0><1><default><default> usb_drv_vbus_gpio = port:PL02<1><0><default><0> usb_host_init_state = 1 usb_restrict_gpio = usb_restric_flag = 0 usb_restric_voltage = 3550000 usb_restric_capacity = 5 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc1] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc2] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc3] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usb_feature] vendor_id = 6353 mass_storage_id = 1 adb_id = 2 manufacturer_name = "USB Developer" product_name = "Android" serial_number = "20080411" [msc_feature] vendor_name = "USB 2.0" product_name = "USB Flash Driver" release = 100 luns = 3 [serial_feature] serial_unique = 0 [module_para] module_num = 7 module_power0 = "vcc-wifi-33" module_power0_vol = 0 module_power1 = module_power1_vol = module_power2 = module_power2_vol = module_power3 = module_power3_vol = chip_en = lpo_use_apclk = [wifi_para] wifi_used = 0 wifi_sdc_id = 1 wifi_usbc_id = 5 wifi_usbc_type = 1 wl_reg_on = port:PL07<1><default><default><0> wl_host_wake = port:PG10<0><default><default><0> wl_host_wake_invert = 0 [bt_para] bt_used = 0 bt_uart_id = 1 bt_rst_n = bt_wake = bt_host_wake = bt_host_wake_invert = 0 [pcm0] daudio_used = 0 daudio_master = 4 daudio_select = 1 audio_format = 1 signal_inversion = 1 mclk_fs = 128 sample_resolution = 16 slot_width_select = 32 pcm_lrck_period = 32 pcm_lrckr_period = 1 msb_lsb_first = 0 sign_extend = 0 slot_index = 0 slot_width = 32 frame_width = 0 tx_data_mode = 0 rx_data_mode = 0 i2s_mclk = port:PA18<2><1><default><default> i2s_bclk = port:PA19<2><1><default><default> i2s_dout0 = port:PA20<2><1><default><default> i2s_din = port:PA21<2><1><default><default> [pcm1] daudio_used = 0 daudio_master = 4 daudio_select = 1 audio_format = 1 signal_inversion = 1 mclk_fs = 128 sample_resolution = 16 slot_width_select = 32 pcm_lrck_period = 32 pcm_lrckr_period = 1 msb_lsb_first = 0 sign_extend = 0 slot_index = 0 slot_width = 32 frame_width = 0 tx_data_mode = 0 rx_data_mode = 0 i2s_mclk = port:PG10<2><1><default><default> i2s_bclk = port:PG11<2><1><default><default> i2s_dout0 = port:PG12<2><1><default><default> i2s_din = port:PG13<2><1><default><default> [audio0] audio_used = 1 lineout_vol = 31 cap_vol = 5 audio_hp_ldo = "none" adcagc_used = 0 adcdrc_used = 0 dacdrc_used = 0 adchpf_used = 0 dachpf_used = 0 audio_pa_ctrl = port:PA16<1><default><default><0> [spdif0] spdif_used = 0 spdif_dout = port:PA17<2><1><default><default> [audiohub] hub_used = 0 codec_used = 1 spdif_used = 1 hdmi_used = 1 [s_cir0] ir_used = 0 ir_rx = port:PL11<2><1><default><default> ir_power_key_code0 = 87 ir_addr_code0 = 40704 ir_power_key_code1 = 26 ir_addr_code1 = 64260 ir_power_key_code2 = 20 ir_addr_code2 = 32640 ir_power_key_code3 = 21 ir_addr_code3 = 32640 ir_power_key_code4 = 11 ir_addr_code4 = 63240 ir_power_key_code5 = 3 ir_addr_code5 = 239 ir_power_key_code6 = 159 ir_addr_code6 = 19635 ir_power_key_code7 = 10 ir_addr_code7 = 30536 ir_power_key_code8 = 69 ir_addr_code8 = 48386 ir_power_key_code9 = 77 ir_addr_code9 = 56865 ir_power_key_code10 = 24 ir_addr_code10 = 65025 ir_power_key_code11 = 87 ir_addr_code11 = 65280 ir_power_key_code12 = 77 ir_addr_code12 = 65344 [cir] ir_used = 1 ir_tx = port:PH07<2><default><default><default> ;---------------------------------------------------------------------------------- ; dvfs voltage-frequency table configuration ; ; pmuic_type:0:none, 1:gpio, 2:i2c ; pmu_gpio0: gpio config. ; pmu_levelx: 0~9999: voltage(mV), 10000~90000:gpio0 state. voltage form high to low. ; ; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk ; 1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator ; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz ; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz ; ; LV_count: count of LV_freq/LV_volt, must be < 16 ; ; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz, 1536Mhz] ; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz, 1296Mhz] ; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz, 1200Mhz] ; LV4: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz] ; LV5: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz] ; LV6: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] ; LV7: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] ; LV8: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] ; ;---------------------------------------------------------------------------------- [dvfs_table] pmuic_type = 1 pmu_gpio0 = port:PL06<1><1><2><1> pmu_level0 = 11300 pmu_level1 = 1100 max_freq = 1200000000 min_freq = 480000000 LV_count = 5 LV1_freq = 1200000000 LV1_volt = 1300 LV2_freq = 1008000000 LV2_volt = 1300 LV3_freq = 912000000 LV3_volt = 1100 LV4_freq = 648000000 LV4_volt = 1100 LV5_freq = 480000000 LV5_volt = 1100 [gpu_dvfs_table] G_LV_count = 3 G_LV0_freq = 312000000 G_LV0_volt = 1200000 G_LV1_freq = 384000000 G_LV1_volt = 1200000 G_LV2_freq = 456000000 G_LV2_volt = 1200000 [Vdevice] Vdevice_used = 0 Vdevice_0 = port:PH10<5><1><2><default> Vdevice_1 = port:PH11<5><1><2><default> [s_uart0] s_uart_used = 0 s_uart_tx = port:PL02<2><default><default><default> s_uart_rx = port:PL03<2><default><default><default> [s_rsb0] s_rsb_used = 1 s_rsb_sck = port:PL00<2><1><2><default> s_rsb_sda = port:PL01<2><1><2><default> [s_jtag0] s_jtag_used = 0 s_jtag_tms = port:PL04<2><1><2><default> s_jtag_tck = port:PL05<2><1><2><default> s_jtag_tdo = port:PL06<2><1><2><default> s_jtag_tdi = port:PL07<2><1><2><default> [s_powchk] s_powchk_used = -2147483648 s_power_reg = 0 s_system_power = 50 [sim0] scr_used = 0 scr_vccen = port:PA06<2><default><default><default> scr_slk = port:PA07<2><default><default><default> scr_sda = port:PA08<2><default><default><default> scr_rst = port:PA09<2><default><default><default> scr_det = port:PA10<2><default><default><default> [ts0] tsc_used = 0 tsc_clk = port:PE00<3><default><default><default> tsc_err = port:PE01<3><default><default><default> tsc_sync = port:PE02<3><default><default><default> tsc_dvld = port:PE03<3><default><default><default> tsc_d0 = port:PE04<3><default><default><default> tsc_d1 = port:PE05<3><default><default><default> tsc_d2 = port:PE06<3><default><default><default> tsc_d3 = port:PE07<3><default><default><default> tsc_d4 = port:PE08<3><default><default><default> tsc_d5 = port:PE09<3><default><default><default> tsc_d6 = port:PE10<3><default><default><default> tsc_d7 = port:PE11<3><default><default><default> [gpio_power_key] key_used = 1 key_io = port:PL03<6><default><default><0> [key_para] key_used = 0 key_cnt = 5 key1_vol = 222 key2_vol = 444 key3_vol = 666 key4_vol = 857 key5_vol = 2000 [d7s_para] d7s_used = 0 din_gpio = port:PD00<1><default><default><1> clk_gpio = port:PD01<1><default><default><1> stb_gpio = port:PD02<1><default><default><1> ;---------------------------------------------------------------------------------- ;mali parameters ;---------------------------------------------------------------------------------- [mali_para] mali_used = 1 mali_clkdiv = 1 mali_extreme_freq = 600 mali_extreme_vol = 1400 ;---------------------------------------------------------------------------------- ;1wire parameters (default - PA20) ;---------------------------------------------------------------------------------- [w1_para] w1_used = 1 gpio = 20 [corekeeper] corekeeper_enabled = 1
-
@Reza
Hello, it seems when i read your previous post, that you forgot to reverse your custom .fex file in the system.
In fact, after modifying the .fex in nano, you must do "fex2bin" your .fex file to replace in the system the script.bin file.
If you didn't to that, your .fex file is not used, is useless until you "fex2bin" it.Your pinout seems OK, a option is to use Pin 17 (3.3V) an Pin 20 (GND) to powering your NRF module.
Regards.
Seb.
-
@SdeWeb sorry i am worng in typing.but i do all steps but there is problem for me.
pin 1 and 6 is 3.3v and gnd .what is defference between 1 & 17 and 6 & 20?this is all steps that i was follow:
root@orangepione:~# sudo apt-get update Hit:1 http://ports.ubuntu.com xenial InRelease Hit:2 http://ports.ubuntu.com xenial-security InRelease Hit:3 http://apt.armbian.com xenial InRelease Hit:4 http://ports.ubuntu.com xenial-updates InRelease Hit:5 http://ports.ubuntu.com xenial-backports InRelease Reading package lists... Done root@orangepione:~# sudo apt-get install sunxi-tools Reading package lists... Done Building dependency tree Reading state information... Done sunxi-tools is already the newest version (1.4.2-1~armbian5.25+1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@orangepione:~# bin2fex /boot/script.bin /tmp/orange.fex fexc-bin: /boot/script.bin: version: 1.2 fexc-bin: /boot/script.bin: size: 34704 (81 sections), header value: 34704 root@orangepione:~# nano /tmp/orange.fex
and in orange.fex :
[product] version = "100" machine = "Xunlong Orange Pi One" [platform] debug_mode = 1 eraseflag = 1 next_work = 2 [target] boot_clock = 1008 storage_type = -1 [key_detect_en] keyen_flag = 0 [fel_key] fel_key_max = 7 fel_key_min = 2 [card_boot] logical_start = 40960 sprite_work_delay = 500 sprite_err_delay = 200 sprite_gpio0 = port:PL10<1><default><default><default> next_work = 3 [box_start_os] used = 1 start_type = 1 irkey_used = 1 pmukey_used = 1 pmukey_num = 3 led_power = 0 led_state = 0 [boot_init_gpio] used = 1 gpio0 = port:PL10<1><default><default><1> gpio1 = port:PG11<1><default><default><1> [recovery_para] used = 1 mode = 2 recovery_key = port:PL04<0><default><default><default> [pm_para] standby_mode = 1 [card0_boot_para] card_ctrl = 0 card_high_speed = 1 card_line = 4 sdc_d1 = port:PF00<2><1><2><default> sdc_d0 = port:PF01<2><1><2><default> sdc_clk = port:PF02<2><1><2><default> sdc_cmd = port:PF03<2><1><2><default> sdc_d3 = port:PF04<2><1><2><default> sdc_d2 = port:PF05<2><1><2><default> [card2_boot_para] card_ctrl = 2 card_high_speed = 1 card_line = 8 sdc_cmd = port:PC06<3><1><2><default> sdc_clk = port:PC05<3><1><2><default> sdc_d0 = port:PC08<3><1><2><default> sdc_d1 = port:PC09<3><1><2><default> sdc_d2 = port:PC10<3><1><2><default> sdc_d3 = port:PC11<3><1><2><default> sdc_d4 = port:PC12<3><1><2><default> sdc_d5 = port:PC13<3><1><2><default> sdc_d6 = port:PC14<3><1><2><default> sdc_d7 = port:PC15<3><1><2><default> sdc_2xmode = 1 sdc_ddrmode = 1 [twi_para] twi_port = 0 twi_scl = port:PA11<2><default><default><default> twi_sda = port:PA12<2><default><default><default> [uart_para] uart_debug_port = 0 uart_debug_tx = port:PA04<2><1><default><default> uart_debug_rx = port:PA05<2><1><default><default> [force_uart_para] force_uart_port = 0 force_uart_tx = port:PF02<3><1><default><default> force_uart_rx = port:PF04<3><1><default><default> [jtag_para] jtag_enable = 0 jtag_ms = port:PA00<3><default><default><default> jtag_ck = port:PA01<3><default><default><default> jtag_do = port:PA02<3><default><default><default> jtag_di = port:PA03<3><default><default><default> [clock] pll_video = 297 pll_ve = 402 pll_periph0 = 600 pll_gpu = 576 pll_periph1 = 600 pll_de = 864 [dram_para] dram_clk = 624 dram_type = 3 dram_zq = 0x3b3bfb dram_odt_en = 1 dram_para1 = 283377664 dram_para2 = 0 dram_mr0 = 6208 dram_mr1 = 64 dram_mr2 = 24 dram_mr3 = 2 dram_tpr0 = 0x48a192 dram_tpr1 = 0x1c2418d dram_tpr2 = 0x76051 dram_tpr3 = 0x0 dram_tpr4 = 0x0 dram_tpr5 = 0x0 dram_tpr6 = 0x64 dram_tpr7 = 0x0 dram_tpr8 = 0x0 dram_tpr9 = 0x0 dram_tpr10 = 0x0 dram_tpr11 = 0x6aaa0000 dram_tpr12 = 0x7979 dram_tpr13 = 0x800800 [wakeup_src_para] cpu_en = 0 cpu_freq = 48 pll_ratio = 273 dram_selfresh_en = 1 dram_freq = 36 wakeup_src0 = wakeup_src_wl = port:PG10<4><default><default><0> wakeup_src_bt = port:PL03<6><default><default><0> [twi0] twi_used = 1 twi_scl = port:PA11<2><default><default><default> twi_sda = port:PA12<2><default><default><default> [twi1] twi_used = 1 twi_scl = port:PA18<3><default><default><default> twi_sda = port:PA19<3><default><default><default> [twi2] twi_used = 0 twi_scl = port:PE12<3><default><default><default> twi_sda = port:PE13<3><default><default><default> [uart0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PA04<2><1><default><default> uart_rx = port:PA05<2><1><default><default> [uart1] uart_used = 0 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> uart_rts = port:PG08<2><1><default><default> uart_cts = port:PG09<2><1><default><default> [uart2] uart_used = 0 uart_port = 2 uart_type = 4 uart_tx = port:PA00<2><1><default><default> uart_rx = port:PA01<2><1><default><default> uart_rts = port:PA02<2><1><default><default> uart_cts = port:PA03<2><1><default><default> [uart3] uart_used = 0 uart_port = 3 uart_type = 4 uart_tx = port:PA13<3><1><default><default> uart_rx = port:PA14<3><1><default><default> uart_rts = port:PA15<3><1><default><default> uart_cts = port:PA16<3><1><default><default> [spi0] spi_used = 1 spi_cs_bitmap = 1 spi_mosi = port:PC00<3><default><default><default> spi_miso = port:PC01<3><default><default><default> spi_sclk = port:PC02<3><default><default><default> spi_cs0 = port:PC03<3><1><default><default> [spi1] spi_used = 0 spi_cs_bitmap = 1 spi_cs0 = port:PA13<2><1><default><default> spi_sclk = port:PA14<2><default><default><default> spi_mosi = port:PA15<2><default><default><default> spi_miso = port:PA16<2><default><default><default> [spi_devices] spi_dev_num = 1 [spi_board0] modalias = "spidev" max_speed_hz = 33000000 bus_num = 0 chip_select = 0 mode = 0 full_duplex = 1 manual_cs = 0 ; NOTE: This section is necessary only for "gpio_sunxi" driver ; which is obsolete for H3 boards [gpio_para] gpio_used = 0 gpio_num = 0 ;[led_assign] ;normal_led = "gpio_pin_2" ;standby_led = "gpio_pin_1" [leds_para] leds_used = 1 green_led = port:PL10<1><default><default><1> green_led_active_low = 0 red_led = port:PA15<1><default><default><0> red_led_active_low = 0 [ths_para] ths_used = 1 ths_trip1_count = 6 ths_trip1_0 = 75 ths_trip1_1 = 80 ths_trip1_2 = 85 ths_trip1_3 = 90 ths_trip1_4 = 95 ths_trip1_5 = 105 ths_trip1_6 = 0 ths_trip1_7 = 0 ths_trip1_0_min = 0 ths_trip1_0_max = 1 ths_trip1_1_min = 1 ths_trip1_1_max = 2 ths_trip1_2_min = 2 ths_trip1_2_max = 3 ths_trip1_3_min = 3 ths_trip1_3_max = 4 ths_trip1_4_min = 4 ths_trip1_4_max = 5 ths_trip1_5_min = 5 ths_trip1_5_max = 7 ths_trip1_6_min = 0 ths_trip1_6_max = 0 ths_trip2_count = 1 ths_trip2_0 = 105 [cooler_table] cooler_count = 8 cooler0 = "1200000 4 4294967295 0" cooler1 = "912000 4 4294967295 0" cooler2 = "768000 4 4294967295 0" cooler3 = "648000 4 4294967295 0" cooler4 = "480000 4 4294967295 0" cooler5 = "480000 3 4294967295 0" cooler6 = "480000 2 4294967295 0" cooler7 = "480000 1 4294967295 0" [nand0_para] nand_support_2ch = 0 nand0_used = 0 nand0_we = port:PC00<2><default><default><default> nand0_ale = port:PC01<2><default><default><default> nand0_cle = port:PC02<2><default><default><default> nand0_ce1 = port:PC03<2><default><default><default> nand0_ce0 = port:PC04<2><default><default><default> nand0_nre = port:PC05<2><default><default><default> nand0_rb0 = port:PC06<2><default><default><default> nand0_rb1 = port:PC07<2><default><default><default> nand0_d0 = port:PC08<2><default><default><default> nand0_d1 = port:PC09<2><default><default><default> nand0_d2 = port:PC10<2><default><default><default> nand0_d3 = port:PC11<2><default><default><default> nand0_d4 = port:PC12<2><default><default><default> nand0_d5 = port:PC13<2><default><default><default> nand0_d6 = port:PC14<2><default><default><default> nand0_d7 = port:PC15<2><default><default><default> nand0_ndqs = port:PC16<2><default><default><default> [boot_disp] advert_disp = 0 auto_hpd = 1 output_type = 4 hdmi_channel = 0 hdmi_mode = 4 cvbs_channel = 1 cvbs_mode = 11 output_full = 1 hdmi_mode_check = 1 [disp_init] disp_init_enable = 1 disp_mode = 0 screen0_output_type = 3 screen0_output_mode = 5 screen1_output_type = 3 screen1_output_mode = 5 fb0_format = 0 fb0_width = 0 fb0_height = 0 fb1_format = 0 fb1_width = 0 fb1_height = 0 [hdmi_para] hdmi_used = 1 hdmi_power = "vcc-hdmi-18" [tv_para] tv_used = 0 tv_dac_used = 1 tv_dac_src0 = 0 [pwm0_para] pwm_used = 0 pwm_positive = port:PA05<3><0><default><default> ; If set gamc_phy to use = 2 [gmac0] gmac_used = 2 gmac_power1 = [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00<2><default><default><default> vip_csi_mck = port:PE01<2><default><default><default> vip_csi_hsync = port:PE02<2><default><default><default> vip_csi_vsync = port:PE03<2><default><default><default> vip_csi_d0 = port:PE04<2><default><default><default> vip_csi_d1 = port:PE05<2><default><default><default> vip_csi_d2 = port:PE06<2><default><default><default> vip_csi_d3 = port:PE07<2><default><default><default> vip_csi_d4 = port:PE08<2><default><default><default> vip_csi_d5 = port:PE09<2><default><default><default> vip_csi_d6 = port:PE10<2><default><default><default> vip_csi_d7 = port:PE11<2><default><default><default> vip_csi_sck = port:PE12<2><default><default><default> vip_csi_sda = port:PE13<2><default><default><default> vip_dev0_mname = "gc2035" vip_dev0_pos = "front" vip_dev0_lane = 1 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 120 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 0 vip_dev0_vflip = 1 vip_dev0_hflip = 1 vip_dev0_iovdd = "" vip_dev0_iovdd_vol = 2800000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 2800000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1800000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 2800000 vip_dev0_power_en = port:PA17<1><default><default><1> vip_dev0_reset = port:PE14<1><default><default><1> vip_dev0_pwdn = port:PE15<1><default><default><0> vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = vip_dev0_act_used = 0 vip_dev0_act_name = "ad5820_act" vip_dev0_act_slave = 24 vip_dev1_mname = "" vip_dev1_pos = "rear" vip_dev1_lane = 1 vip_dev1_twi_id = 0 vip_dev1_twi_addr = vip_dev1_isp_used = 0 vip_dev1_fmt = 1 vip_dev1_stby_mode = 0 vip_dev1_vflip = 0 vip_dev1_hflip = 0 vip_dev1_iovdd = "" vip_dev1_iovdd_vol = 2800000 vip_dev1_avdd = "" vip_dev1_avdd_vol = 2800000 vip_dev1_dvdd = "" vip_dev1_dvdd_vol = 1500000 vip_dev1_afvdd = "" vip_dev1_afvdd_vol = 2800000 vip_dev1_power_en = vip_dev1_reset = vip_dev1_pwdn = vip_dev1_flash_en = vip_dev1_flash_mode = vip_dev1_af_pwdn = [tvout_para] tvout_used = 0 tvout_channel_num = tv_en = 0 [tvin_para] tvin_used = 0 tvin_channel_num = [di_para] di_used = 1 [mmc0_para] sdc_used = 1 sdc_detmode = 3 sdc_buswidth = 4 sdc_clk = port:PF02<2><1><2><default> sdc_cmd = port:PF03<2><1><2><default> sdc_d0 = port:PF01<2><1><2><default> sdc_d1 = port:PF00<2><1><2><default> sdc_d2 = port:PF05<2><1><2><default> sdc_d3 = port:PF04<2><1><2><default> sdc_det = port:PF06<0><1><2><default> sdc_use_wp = 0 sdc_wp = sdc_isio = 0 sdc_regulator = "none" sdc_power_supply = "none" [mmc1_para] sdc_used = 1 sdc_detmode = 4 sdc_buswidth = 4 sdc_clk = port:PG00<2><1><3><default> sdc_cmd = port:PG01<2><1><3><default> sdc_d0 = port:PG02<2><1><3><default> sdc_d1 = port:PG03<2><1><3><default> sdc_d2 = port:PG04<2><1><3><default> sdc_d3 = port:PG05<2><1><3><default> sdc_det = sdc_use_wp = 0 sdc_wp = sdc_isio = 1 sdc_regulator = "none" sdc_power_supply = "none" sdc_2xmode = 1 sdc_ddrmode = 1 [mmc2_para] sdc_used = 0 sdc_detmode = 3 sdc_buswidth = 8 sdc_clk = port:PC05<3><1><2><default> sdc_cmd = port:PC06<3><1><2><default> sdc_d0 = port:PC08<3><1><2><default> sdc_d1 = port:PC09<3><1><2><default> sdc_d2 = port:PC10<3><1><2><default> sdc_d3 = port:PC11<3><1><2><default> sdc_d4 = port:PC12<3><1><2><default> sdc_d5 = port:PC13<3><1><2><default> sdc_d6 = port:PC14<3><1><2><default> sdc_d7 = port:PC15<3><1><2><default> emmc_rst = port:PC16<3><1><2><default> sdc_det = sdc_use_wp = 0 sdc_wp = sdc_isio = 0 sdc_regulator = "none" sdc_power_supply = "none" sdc_2xmode = 1 sdc_ddrmode = 1 [smc_para] smc_used = 0 smc_rst = port:PA09<2><default><default><default> smc_vppen = port:PA20<3><default><default><default> smc_vppp = port:PA21<3><default><default><default> smc_det = port:PA10<2><default><default><default> smc_vccen = port:PA06<2><default><default><default> smc_sck = port:PA07<2><default><default><default> smc_sda = port:PA08<2><default><default><default> [usbc0] usb_used = 1 usb_port_type = 2 usb_detect_type = 0 usb_id_gpio = port:PG12<0><1><default><default> usb_det_vbus_gpio = port:PG12<0><1><default><default> usb_drv_vbus_gpio = port:PL02<1><0><default><0> usb_host_init_state = 1 usb_restrict_gpio = usb_restric_flag = 0 usb_restric_voltage = 3550000 usb_restric_capacity = 5 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc1] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc2] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc3] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usb_feature] vendor_id = 6353 mass_storage_id = 1 adb_id = 2 manufacturer_name = "USB Developer" product_name = "Android" serial_number = "20080411" [msc_feature] vendor_name = "USB 2.0" product_name = "USB Flash Driver" release = 100 luns = 3 [serial_feature] serial_unique = 0 [module_para] module_num = 7 module_power0 = "vcc-wifi-33" module_power0_vol = 0 module_power1 = module_power1_vol = module_power2 = module_power2_vol = module_power3 = module_power3_vol = chip_en = lpo_use_apclk = [wifi_para] wifi_used = 0 wifi_sdc_id = 1 wifi_usbc_id = 5 wifi_usbc_type = 1 wl_reg_on = port:PL07<1><default><default><0> wl_host_wake = port:PG10<0><default><default><0> wl_host_wake_invert = 0 [bt_para] bt_used = 0 bt_uart_id = 1 bt_rst_n = bt_wake = bt_host_wake = bt_host_wake_invert = 0 [pcm0] daudio_used = 0 daudio_master = 4 daudio_select = 1 audio_format = 1 signal_inversion = 1 mclk_fs = 128 sample_resolution = 16 slot_width_select = 32 pcm_lrck_period = 32 pcm_lrckr_period = 1 msb_lsb_first = 0 sign_extend = 0 slot_index = 0 slot_width = 32 frame_width = 0 tx_data_mode = 0 rx_data_mode = 0 i2s_mclk = port:PA18<2><1><default><default> i2s_bclk = port:PA19<2><1><default><default> i2s_dout0 = port:PA20<2><1><default><default> i2s_din = port:PA21<2><1><default><default> [pcm1] daudio_used = 0 daudio_master = 4 daudio_select = 1 audio_format = 1 signal_inversion = 1 mclk_fs = 128 sample_resolution = 16 slot_width_select = 32 pcm_lrck_period = 32 pcm_lrckr_period = 1 msb_lsb_first = 0 sign_extend = 0 slot_index = 0 slot_width = 32 frame_width = 0 tx_data_mode = 0 rx_data_mode = 0 i2s_mclk = port:PG10<2><1><default><default> i2s_bclk = port:PG11<2><1><default><default> i2s_dout0 = port:PG12<2><1><default><default> i2s_din = port:PG13<2><1><default><default> [audio0] audio_used = 1 lineout_vol = 31 cap_vol = 5 audio_hp_ldo = "none" adcagc_used = 0 adcdrc_used = 0 dacdrc_used = 0 adchpf_used = 0 dachpf_used = 0 audio_pa_ctrl = port:PA16<1><default><default><0> [spdif0] spdif_used = 0 spdif_dout = port:PA17<2><1><default><default> [audiohub] hub_used = 0 codec_used = 1 spdif_used = 1 hdmi_used = 1 [s_cir0] ir_used = 0 ir_rx = port:PL11<2><1><default><default> ir_power_key_code0 = 87 ir_addr_code0 = 40704 ir_power_key_code1 = 26 ir_addr_code1 = 64260 ir_power_key_code2 = 20 ir_addr_code2 = 32640 ir_power_key_code3 = 21 ir_addr_code3 = 32640 ir_power_key_code4 = 11 ir_addr_code4 = 63240 ir_power_key_code5 = 3 ir_addr_code5 = 239 ir_power_key_code6 = 159 ir_addr_code6 = 19635 ir_power_key_code7 = 10 ir_addr_code7 = 30536 ir_power_key_code8 = 69 ir_addr_code8 = 48386 ir_power_key_code9 = 77 ir_addr_code9 = 56865 ir_power_key_code10 = 24 ir_addr_code10 = 65025 ir_power_key_code11 = 87 ir_addr_code11 = 65280 ir_power_key_code12 = 77 ir_addr_code12 = 65344 [cir] ir_used = 1 ir_tx = port:PH07<2><default><default><default> ;---------------------------------------------------------------------------------- ; dvfs voltage-frequency table configuration ; ; pmuic_type:0:none, 1:gpio, 2:i2c ; pmu_gpio0: gpio config. ; pmu_levelx: 0~9999: voltage(mV), 10000~90000:gpio0 state. voltage form high to low. ; ; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk ; 1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator ; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz ; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz ; ; LV_count: count of LV_freq/LV_volt, must be < 16 ; ; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz, 1536Mhz] ; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz, 1296Mhz] ; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz, 1200Mhz] ; LV4: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz] ; LV5: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz] ; LV6: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] ; LV7: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] ; LV8: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] ; ;---------------------------------------------------------------------------------- [dvfs_table] pmuic_type = 1 pmu_gpio0 = port:PL06<1><1><2><1> pmu_level0 = 11300 pmu_level1 = 1100 max_freq = 1200000000 min_freq = 480000000 LV_count = 5 LV1_freq = 1200000000 LV1_volt = 1300 LV2_freq = 1008000000 LV2_volt = 1300 LV3_freq = 912000000 LV3_volt = 1100 LV4_freq = 648000000 LV4_volt = 1100 LV5_freq = 480000000 LV5_volt = 1100 [gpu_dvfs_table] G_LV_count = 3 G_LV0_freq = 312000000 G_LV0_volt = 1200000 G_LV1_freq = 384000000 G_LV1_volt = 1200000 G_LV2_freq = 456000000 G_LV2_volt = 1200000 [Vdevice] Vdevice_used = 0 Vdevice_0 = port:PH10<5><1><2><default> Vdevice_1 = port:PH11<5><1><2><default> [s_uart0] s_uart_used = 0 s_uart_tx = port:PL02<2><default><default><default> s_uart_rx = port:PL03<2><default><default><default> [s_rsb0] s_rsb_used = 1 s_rsb_sck = port:PL00<2><1><2><default> s_rsb_sda = port:PL01<2><1><2><default> [s_jtag0] s_jtag_used = 0 s_jtag_tms = port:PL04<2><1><2><default> s_jtag_tck = port:PL05<2><1><2><default> s_jtag_tdo = port:PL06<2><1><2><default> s_jtag_tdi = port:PL07<2><1><2><default> [s_powchk] s_powchk_used = -2147483648 s_power_reg = 0 s_system_power = 50 [sim0] scr_used = 0 scr_vccen = port:PA06<2><default><default><default> scr_slk = port:PA07<2><default><default><default> scr_sda = port:PA08<2><default><default><default> scr_rst = port:PA09<2><default><default><default> scr_det = port:PA10<2><default><default><default> [ts0] tsc_used = 0 tsc_clk = port:PE00<3><default><default><default> tsc_err = port:PE01<3><default><default><default> tsc_sync = port:PE02<3><default><default><default> tsc_dvld = port:PE03<3><default><default><default> tsc_d0 = port:PE04<3><default><default><default> tsc_d1 = port:PE05<3><default><default><default> tsc_d2 = port:PE06<3><default><default><default> tsc_d3 = port:PE07<3><default><default><default> tsc_d4 = port:PE08<3><default><default><default> tsc_d5 = port:PE09<3><default><default><default> tsc_d6 = port:PE10<3><default><default><default> tsc_d7 = port:PE11<3><default><default><default> [gpio_power_key] key_used = 1 key_io = port:PL03<6><default><default><0> [key_para] key_used = 0 key_cnt = 5 key1_vol = 222 key2_vol = 444 key3_vol = 666 key4_vol = 857 key5_vol = 2000 [d7s_para] d7s_used = 0 din_gpio = port:PD00<1><default><default><1> clk_gpio = port:PD01<1><default><default><1> stb_gpio = port:PD02<1><default><default><1> ;---------------------------------------------------------------------------------- ;mali parameters ;---------------------------------------------------------------------------------- [mali_para] mali_used = 1 mali_clkdiv = 1 mali_extreme_freq = 600 mali_extreme_vol = 1400 ;---------------------------------------------------------------------------------- ;1wire parameters (default - PA20) ;---------------------------------------------------------------------------------- [w1_para] w1_used = 1 gpio = 20 [corekeeper] corekeeper_enabled = 1
then:
root@orangepione:~# sudo fex2bin /tmp/orange.fex /boot/script.bin root@orangepione:~# sudo reboot
then:
root@orangepione:~# ls -l /dev/spidev* crw------- 1 root root 153, 0 Mar 19 22:57 /dev/spidev0.0 root@orangepione:~# sudo modprobe gpio-sunxi root@orangepione:~# echo "gpio-sunxi" >> /etc/modules
then:
root@orangepione:~# git clone https://github.com/mysensors/MySensors.git Cloning into 'MySensors'... remote: Counting objects: 13985, done. remote: Compressing objects: 100% (45/45), done. remote: Total 13985 (delta 8), reused 0 (delta 0), pack-reused 13940 Receiving objects: 100% (13985/13985), 9.70 MiB | 310.00 KiB/s, done. Resolving deltas: 100% (8436/8436), done. Checking connectivity... done. root@orangepione:~# cd MySensors root@orangepione:~/MySensors# ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 [SECTION] Detecting target machine. [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l. [SECTION] Checking GPIO Sysfs. [OK] /sys/class/gpio/export found [SECTION] Detecting SPI driver. [OK] SPI driver detected:SPIDEV. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@orangepione:~/MySensors# ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 [SECTION] Detecting target machine. [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l. [SECTION] Checking GPIO Sysfs. [OK] /sys/class/gpio/export found [SECTION] Detecting SPI driver. [OK] SPI driver detected:SPIDEV. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@orangepione:~/MySensors# make gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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/GPIO.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.o g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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/interrupt.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o g++ -MT build/drivers/Linux/SerialSimulator.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialSimulator.cpp -o build/drivers/Linux/SerialSimulator.o g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -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=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o g++ -MT build/drivers/SPIDEV/SPI.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/SPIDEV/SPI.cpp -o build/drivers/SPIDEV/SPI.o g++ -pthread -o bin/mysgw build/drivers/Linux/log.o build/drivers/Linux/noniso.o build/drivers/Linux/GPIO.o build/drivers/Linux/Print.o build/drivers/Linux/EthernetClient.o build/drivers/Linux/SerialPort.o build/drivers/Linux/Stream.o build/drivers/Linux/IPAddress.o build/drivers/Linux/compatibility.o build/drivers/Linux/interrupt.o build/drivers/Linux/SerialSimulator.o build/drivers/Linux/SoftEeprom.o build/drivers/Linux/EthernetServer.o build/examples_linux/mysgw.o build/drivers/SPIDEV/SPI.o root@orangepione:~/MySensors# sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG----,VER=2.2.0-beta mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT mysgw: TSM:FAIL:RE-INIT mysgw: TSM:INIT mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=2 mysgw: TSM:FAIL:PDT mysgw: TSM:FAIL:RE-INIT mysgw: TSM:INIT mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=3 mysgw: TSM:FAIL:PDT ^Z [1]+ Stopped sudo ./bin/mysgw -d root@orangepione:~/MySensors#
also i change 3.3v and gnd to 17 and 20 but . . .
-
Hi all
I have problems with Orange zero to make it work as a MYS gateway.What is done:
- take Debian img from https://www.armbian.com/orange-pi-zero/
- added /dev/spidev1.0 using instructions from here: https://www.mysensors.org/build/orange
So I actually see spidev1.0 in ls -l /dev/spidev* - wired everything up as is described here: https://www.mysensors.org/build/orange
So everything is connected to the spi1 pins.
I used nrf24 with a capacitor and without - same result - ran commands
sudo modprobe gpio-sunxi echo "gpio-sunxi" >> /etc/modules git clone https://github.com/mysensors/MySensors.git cd MySensors ./configure --spi-spidev-device=/dev/spidev1.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 --my-serial-baudrate=115200 sudo make sudo make install sudo systemctl enable mysgw.service sudo systemctl start mysgw.service
sudo ./bin/mysgw -d
And I see failed logs
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG----,VER=2.2.0-beta mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT mysgw: TSM:FAIL:RE-INIT mysgw: TSM:INIT ....
Has anyone set it up for Zero?
What am I doing wrong?Thanks in advance!
-
@giran hi i don't think you can run the service and the binary standalone at the same time since hardware access is exclusive. Try to stop the service and then run the binary again.
-
@pansen Thanks for answering.
Even when I stopped the service
or when I run./configure --spi-spidev-device=/dev/spidev1.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 --my-serial-baudrate=115200 sudo make sudo ./bin/mysgw -d
I still see failed logs.
-
@giran Hi, how did you connect you NRF module on the Orange PI ?
Is you use the GPIO, you should'nt use TTY stup for MuSensors.Look above my setup in this forum, if you use the GPIO.
Regards.
-
@SdeWeb Just a minute ago everything worked )) With all steps I described, instead of the 1st one.
I faced with issues when I installed Debian Jessie (https://www.armbian.com/orange-pi-zero/)
but when I tried Ubuntu Xential - everything worked!By using this img time to time my OrangeZero stops to respond. I'll investigate this later.
But for now I'm happy I set up MYS.
Thanks everyone who was trying to help. And I believe someone would find this post useful, with trying another img.
-
Support for RFM69 has been added, check the build guide for more information.
-
Hi, everyone
I hope someone can help me, I'm lost trying to wrap my head around the proper pin numbers. I'm using a 433MHz RFM69 connected to an OrangePi PC with this configuration:
OPI PC <-----------> RFM69 17 / 3.3V <-----------> VCC 19 / PC0 <-----------> MOSI 21 / PC1 <-----------> MISO 22 / PA2 <-----------> DI00 23 / PC2 <-----------> SCK 24 / PC3 <-----------> NSS 25 / GND <-----------> GND
Pin codes were taken from this picture:
I have the most recent version of the code in the development branch:
fanta@orangepipc:~/MySensors$ git status On branch development Your branch is up-to-date with 'origin/development'. nothing to commit, working directory clean fanta@orangepipc:~/MySensors$ git log --pretty=format:'%h' -n 1 ff0953d
Although the OrangePi PC apparently does not use spidev0.0 for NAND flash like the Zero, I ended up changing the FEX. This is my current state:
[product] version = "100" machine = "orangepi-pc" [platform] debug_mode = 1 eraseflag = 1 next_work = 2 [target] boot_clock = 1008 storage_type = -1 [key_detect_en] keyen_flag = 0 [fel_key] fel_key_max = 7 fel_key_min = 2 [card_boot] logical_start = 40960 sprite_work_delay = 500 sprite_err_delay = 200 sprite_gpio0 = port:PL10<1><default><default><default> next_work = 3 [box_start_os] used = 1 start_type = 1 irkey_used = 1 pmukey_used = 1 pmukey_num = 3 led_power = 0 led_state = 0 [boot_init_gpio] used = 1 gpio0 = port:PL10<1><default><default><1> gpio1 = port:PG11<1><default><default><1> [recovery_para] used = 1 mode = 2 recovery_key = port:PL04<0><default><default><default> [pm_para] standby_mode = 1 [card0_boot_para] card_ctrl = 0 card_high_speed = 1 card_line = 4 sdc_d1 = port:PF00<2><1><2><default> sdc_d0 = port:PF01<2><1><2><default> sdc_clk = port:PF02<2><1><2><default> sdc_cmd = port:PF03<2><1><2><default> sdc_d3 = port:PF04<2><1><2><default> sdc_d2 = port:PF05<2><1><2><default> [card2_boot_para] card_ctrl = 2 card_high_speed = 1 card_line = 8 sdc_cmd = port:PC06<3><1><2><default> sdc_clk = port:PC05<3><1><2><default> sdc_d0 = port:PC08<3><1><2><default> sdc_d1 = port:PC09<3><1><2><default> sdc_d2 = port:PC10<3><1><2><default> sdc_d3 = port:PC11<3><1><2><default> sdc_d4 = port:PC12<3><1><2><default> sdc_d5 = port:PC13<3><1><2><default> sdc_d6 = port:PC14<3><1><2><default> sdc_d7 = port:PC15<3><1><2><default> sdc_2xmode = 1 sdc_ddrmode = 1 [twi_para] twi_port = 0 twi_scl = port:PA11<2><default><default><default> twi_sda = port:PA12<2><default><default><default> [uart_para] uart_debug_port = 0 uart_debug_tx = port:PA04<2><1><default><default> uart_debug_rx = port:PA05<2><1><default><default> [force_uart_para] force_uart_port = 0 force_uart_tx = port:PF02<3><1><default><default> force_uart_rx = port:PF04<3><1><default><default> [jtag_para] jtag_enable = 0 jtag_ms = port:PA00<3><default><default><default> jtag_ck = port:PA01<3><default><default><default> jtag_do = port:PA02<3><default><default><default> jtag_di = port:PA03<3><default><default><default> [clock] pll_video = 297 pll_ve = 402 pll_periph0 = 600 pll_gpu = 576 pll_periph1 = 600 pll_de = 864 [dram_para] dram_clk = 624 dram_type = 3 dram_zq = 0x3b3bfb dram_odt_en = 1 dram_para1 = 283377664 dram_para2 = 0 dram_mr0 = 6208 dram_mr1 = 64 dram_mr2 = 24 dram_mr3 = 2 dram_tpr0 = 0x48a192 dram_tpr1 = 0x1c2418d dram_tpr2 = 0x76051 dram_tpr3 = 0x0 dram_tpr4 = 0x0 dram_tpr5 = 0x0 dram_tpr6 = 0x64 dram_tpr7 = 0x0 dram_tpr8 = 0x0 dram_tpr9 = 0x0 dram_tpr10 = 0x0 dram_tpr11 = 0x6aaa0000 dram_tpr12 = 0x7979 dram_tpr13 = 0x800800 [wakeup_src_para] cpu_en = 0 cpu_freq = 48 pll_ratio = 273 dram_selfresh_en = 1 dram_freq = 36 wakeup_src0 = wakeup_src_wl = port:PG10<4><default><default><0> wakeup_src_bt = port:PL03<6><default><default><0> [twi0] twi_used = 1 twi_scl = port:PA11<2><default><default><default> twi_sda = port:PA12<2><default><default><default> [twi1] twi_used = 1 twi_scl = port:PA18<3><default><default><default> twi_sda = port:PA19<3><default><default><default> [twi2] twi_used = 0 twi_scl = port:PE12<3><default><default><default> twi_sda = port:PE13<3><default><default><default> [uart0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PA04<2><1><default><default> uart_rx = port:PA05<2><1><default><default> [uart1] uart_used = 0 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> uart_rts = port:PG08<2><1><default><default> uart_cts = port:PG09<2><1><default><default> [uart2] uart_used = 0 uart_port = 2 uart_type = 4 uart_tx = port:PA00<2><1><default><default> uart_rx = port:PA01<2><1><default><default> uart_rts = port:PA02<2><1><default><default> uart_cts = port:PA03<2><1><default><default> [uart3] uart_used = 0 uart_port = 3 uart_type = 4 uart_tx = port:PA13<3><1><default><default> uart_rx = port:PA14<3><1><default><default> uart_rts = port:PA15<3><1><default><default> uart_cts = port:PA16<3><1><default><default> [spi0] spi_used = 1 spi_cs_bitmap = 1 spi_mosi = port:PC00<3><default><default><default> spi_miso = port:PC01<3><default><default><default> spi_sclk = port:PC02<3><default><default><default> spi_cs0 = port:PC03<3><1><default><default> [spi1] spi_used = 1 spi_cs_bitmap = 1 spi_cs0 = port:PA13<2><1><default><default> spi_sclk = port:PA14<2><default><default><default> spi_mosi = port:PA15<2><default><default><default> spi_miso = port:PA16<2><default><default><default> [spi_devices] spi_dev_num = 2 [spi_board0] modalias = "spidev" max_speed_hz = 33000000 bus_num = 0 chip_select = 0 mode = 0 full_duplex = 1 manual_cs = 0 [spi_board1] modalias = "spidev" max_speed_hz = 33000000 bus_num = 1 chip_select = 0 mode = 0 full_duplex = 1 manual_cs = 0 [gpio_para] gpio_used = 1 gpio_num = 20 gpio_pin_1 = port:PA06<1><default><default><0> gpio_pin_2 = port:PA13<1><default><default><0> gpio_pin_3 = port:PA14<1><default><default><0> gpio_pin_4 = port:PA01<1><default><default><0> gpio_pin_5 = port:PD14<1><default><default><0> gpio_pin_6 = port:PA00<1><default><default><0> gpio_pin_7 = port:PA03<1><default><default><0> gpio_pin_8 = port:PC04<1><default><default><0> gpio_pin_9 = port:PC07<1><default><default><0> gpio_pin_10 = port:PA02<1><default><default><0> gpio_pin_11 = port:PA21<1><default><default><0> gpio_pin_12 = port:PA07<1><default><default><0> gpio_pin_13 = port:PA08<1><default><default><0> gpio_pin_14 = port:PG08<1><default><default><0> gpio_pin_15 = port:PA09<1><default><default><0> gpio_pin_16 = port:PA10<1><default><default><0> gpio_pin_17 = port:PG09<1><default><default><0> gpio_pin_18 = port:PG06<1><default><default><0> gpio_pin_19 = port:PG07<1><default><default><0> gpio_pin_20 = port:PC03<1><default><default><0> [leds_para] leds_used = 1 green_led = port:PL10<1><default><default><1> green_led_active_low = 0 red_led = port:PA15<1><default><default><0> red_led_active_low = 0 [ths_para] ths_used = 1 ths_trip1_count = 6 ths_trip1_0 = 75 ths_trip1_1 = 80 ths_trip1_2 = 85 ths_trip1_3 = 90 ths_trip1_4 = 95 ths_trip1_5 = 105 ths_trip1_6 = 0 ths_trip1_7 = 0 ths_trip1_0_min = 0 ths_trip1_0_max = 1 ths_trip1_1_min = 1 ths_trip1_1_max = 2 ths_trip1_2_min = 2 ths_trip1_2_max = 3 ths_trip1_3_min = 3 ths_trip1_3_max = 4 ths_trip1_4_min = 4 ths_trip1_4_max = 8 ths_trip1_5_min = 8 ths_trip1_5_max = 8 ths_trip1_6_min = 0 ths_trip1_6_max = 0 ths_trip2_count = 1 ths_trip2_0 = 105 [cooler_table] cooler_count = 9 cooler0 = "1296000 4 4294967295 0" cooler1 = "1200000 4 4294967295 0" cooler2 = "1008000 4 4294967295 0" cooler3 = "816000 4 4294967295 0" cooler4 = "648000 4 4294967295 0" cooler5 = "480000 4 4294967295 0" cooler6 = "480000 3 4294967295 0" cooler7 = "480000 2 4294967295 0" cooler8 = "480000 1 4294967295 0" [nand0_para] nand_support_2ch = 0 nand0_used = 0 nand0_we = port:PC00<2><default><default><default> nand0_ale = port:PC01<2><default><default><default> nand0_cle = port:PC02<2><default><default><default> nand0_ce1 = port:PC03<2><default><default><default> nand0_ce0 = port:PC04<2><default><default><default> nand0_nre = port:PC05<2><default><default><default> nand0_rb0 = port:PC06<2><default><default><default> nand0_rb1 = port:PC07<2><default><default><default> nand0_d0 = port:PC08<2><default><default><default> nand0_d1 = port:PC09<2><default><default><default> nand0_d2 = port:PC10<2><default><default><default> nand0_d3 = port:PC11<2><default><default><default> nand0_d4 = port:PC12<2><default><default><default> nand0_d5 = port:PC13<2><default><default><default> nand0_d6 = port:PC14<2><default><default><default> nand0_d7 = port:PC15<2><default><default><default> nand0_ndqs = port:PC16<2><default><default><default> [boot_disp] advert_disp = 0 auto_hpd = 1 output_type = 4 hdmi_channel = 0 hdmi_mode = 4 cvbs_channel = 1 cvbs_mode = 11 output_full = 1 hdmi_mode_check = 1 [disp_init] disp_init_enable = 1 disp_mode = 0 screen0_output_type = 3 screen0_output_mode = 5 screen1_output_type = 3 screen1_output_mode = 5 fb0_format = 0 fb0_width = 0 fb0_height = 0 fb1_format = 0 fb1_width = 0 fb1_height = 0 [hdmi_para] hdmi_used = 1 hdmi_power = "vcc-hdmi-18" [tv_para] tv_used = 0 tv_dac_used = 1 tv_dac_src0 = 0 [pwm0_para] pwm_used = 0 pwm_positive = port:PA05<3><0><default><default> [gmac0] gmac_used = 2 gmac_power1 = [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00<2><default><default><default> vip_csi_mck = port:PE01<2><default><default><default> vip_csi_hsync = port:PE02<2><default><default><default> vip_csi_vsync = port:PE03<2><default><default><default> vip_csi_d0 = port:PE04<2><default><default><default> vip_csi_d1 = port:PE05<2><default><default><default> vip_csi_d2 = port:PE06<2><default><default><default> vip_csi_d3 = port:PE07<2><default><default><default> vip_csi_d4 = port:PE08<2><default><default><default> vip_csi_d5 = port:PE09<2><default><default><default> vip_csi_d6 = port:PE10<2><default><default><default> vip_csi_d7 = port:PE11<2><default><default><default> vip_csi_sck = port:PE12<2><default><default><default> vip_csi_sda = port:PE13<2><default><default><default> vip_dev0_mname = "gc2035" vip_dev0_pos = "front" vip_dev0_lane = 1 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 120 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 0 vip_dev0_vflip = 1 vip_dev0_hflip = 1 vip_dev0_iovdd = "" vip_dev0_iovdd_vol = 2800000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 2800000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1800000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 2800000 vip_dev0_power_en = port:PA17<1><default><default><1> vip_dev0_reset = port:PE14<1><default><default><1> vip_dev0_pwdn = port:PE15<1><default><default><0> vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = vip_dev0_act_used = 0 vip_dev0_act_name = "ad5820_act" vip_dev0_act_slave = 24 vip_dev1_mname = "" vip_dev1_pos = "rear" vip_dev1_lane = 1 vip_dev1_twi_id = 0 vip_dev1_twi_addr = vip_dev1_isp_used = 0 vip_dev1_fmt = 1 vip_dev1_stby_mode = 0 vip_dev1_vflip = 0 vip_dev1_hflip = 0 vip_dev1_iovdd = "" vip_dev1_iovdd_vol = 2800000 vip_dev1_avdd = "" vip_dev1_avdd_vol = 2800000 vip_dev1_dvdd = "" vip_dev1_dvdd_vol = 1500000 vip_dev1_afvdd = "" vip_dev1_afvdd_vol = 2800000 vip_dev1_power_en = vip_dev1_reset = vip_dev1_pwdn = vip_dev1_flash_en = vip_dev1_flash_mode = vip_dev1_af_pwdn = [tvout_para] tvout_used = tvout_channel_num = tv_en = [tvin_para] tvin_used = tvin_channel_num = [di_para] di_used = 1 [mmc0_para] sdc_used = 1 sdc_detmode = 3 sdc_buswidth = 4 sdc_clk = port:PF02<2><1><2><default> sdc_cmd = port:PF03<2><1><2><default> sdc_d0 = port:PF01<2><1><2><default> sdc_d1 = port:PF00<2><1><2><default> sdc_d2 = port:PF05<2><1><2><default> sdc_d3 = port:PF04<2><1><2><default> sdc_det = port:PF06<0><1><2><default> sdc_use_wp = 0 sdc_wp = sdc_isio = 0 sdc_regulator = "none" sdc_power_supply = "none" [mmc1_para] sdc_used = 1 sdc_detmode = 4 sdc_buswidth = 4 sdc_clk = port:PG00<2><1><3><default> sdc_cmd = port:PG01<2><1><3><default> sdc_d0 = port:PG02<2><1><3><default> sdc_d1 = port:PG03<2><1><3><default> sdc_d2 = port:PG04<2><1><3><default> sdc_d3 = port:PG05<2><1><3><default> sdc_det = sdc_use_wp = 0 sdc_wp = sdc_isio = 1 sdc_regulator = "none" sdc_power_supply = "none" sdc_2xmode = 1 sdc_ddrmode = 1 [mmc2_para] sdc_used = 0 sdc_detmode = 3 sdc_buswidth = 8 sdc_clk = port:PC05<3><1><2><default> sdc_cmd = port:PC06<3><1><2><default> sdc_d0 = port:PC08<3><1><2><default> sdc_d1 = port:PC09<3><1><2><default> sdc_d2 = port:PC10<3><1><2><default> sdc_d3 = port:PC11<3><1><2><default> sdc_d4 = port:PC12<3><1><2><default> sdc_d5 = port:PC13<3><1><2><default> sdc_d6 = port:PC14<3><1><2><default> sdc_d7 = port:PC15<3><1><2><default> emmc_rst = port:PC16<3><1><2><default> sdc_det = sdc_use_wp = 0 sdc_wp = sdc_isio = 0 sdc_regulator = "none" sdc_power_supply = "none" sdc_2xmode = 1 sdc_ddrmode = 1 [smc_para] smc_used = 0 smc_rst = port:PA09<2><default><default><default> smc_vppen = port:PA20<3><default><default><default> smc_vppp = port:PA21<3><default><default><default> smc_det = port:PA10<2><default><default><default> smc_vccen = port:PA06<2><default><default><default> smc_sck = port:PA07<2><default><default><default> smc_sda = port:PA08<2><default><default><default> [usbc0] usb_used = 1 usb_port_type = 2 usb_detect_type = 0 usb_id_gpio = port:PG12<0><1><default><default> usb_det_vbus_gpio = port:PG12<0><1><default><default> usb_drv_vbus_gpio = port:PL02<1><0><default><0> usb_host_init_state = 1 usb_restrict_gpio = usb_restric_flag = 0 usb_restric_voltage = 3550000 usb_restric_capacity = 5 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc1] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc2] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usbc3] usb_used = 1 usb_drv_vbus_gpio = usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [usb_feature] vendor_id = 6353 mass_storage_id = 1 adb_id = 2 manufacturer_name = "USB Developer" product_name = "Android" serial_number = "20080411" [msc_feature] vendor_name = "USB 2.0" product_name = "USB Flash Driver" release = 100 luns = 3 [serial_feature] serial_unique = 0 [module_para] module_num = 7 module_power0 = "vcc-wifi-33" module_power0_vol = 0 module_power1 = module_power1_vol = module_power2 = module_power2_vol = module_power3 = module_power3_vol = chip_en = lpo_use_apclk = [wifi_para] wifi_used = 0 wifi_sdc_id = 1 wifi_usbc_id = 5 wifi_usbc_type = 1 wl_reg_on = port:PL07<1><default><default><0> wl_host_wake = port:PG10<0><default><default><0> wl_host_wake_invert = 0 [bt_para] bt_used = 0 bt_uart_id = 1 bt_rst_n = bt_wake = bt_host_wake = bt_host_wake_invert = 0 [pcm0] daudio_used = 0 daudio_master = 4 daudio_select = 1 audio_format = 1 signal_inversion = 1 mclk_fs = 128 sample_resolution = 16 slot_width_select = 32 pcm_lrck_period = 32 pcm_lrckr_period = 1 msb_lsb_first = 0 sign_extend = 0 slot_index = 0 slot_width = 32 frame_width = 0 tx_data_mode = 0 rx_data_mode = 0 i2s_mclk = port:PA18<2><1><default><default> i2s_bclk = port:PA19<2><1><default><default> i2s_dout0 = port:PA20<2><1><default><default> i2s_din = port:PA21<2><1><default><default> [pcm1] daudio_used = 0 daudio_master = 4 daudio_select = 1 audio_format = 1 signal_inversion = 1 mclk_fs = 128 sample_resolution = 16 slot_width_select = 32 pcm_lrck_period = 32 pcm_lrckr_period = 1 msb_lsb_first = 0 sign_extend = 0 slot_index = 0 slot_width = 32 frame_width = 0 tx_data_mode = 0 rx_data_mode = 0 i2s_mclk = port:PG10<2><1><default><default> i2s_bclk = port:PG11<2><1><default><default> i2s_dout0 = port:PG12<2><1><default><default> i2s_din = port:PG13<2><1><default><default> [audio0] audio_used = 1 lineout_vol = 31 cap_vol = 5 audio_hp_ldo = "none" adcagc_used = 0 adcdrc_used = 0 dacdrc_used = 0 adchpf_used = 0 dachpf_used = 0 audio_pa_ctrl = port:PA16<1><default><default><0> [spdif0] spdif_used = 0 spdif_dout = port:PA17<2><1><default><default> [audiohub] hub_used = 0 codec_used = 1 spdif_used = 1 hdmi_used = 1 [s_cir0] ir_used = 1 ir_rx = port:PL11<2><1><default><default> ir_power_key_code0 = 87 ir_addr_code0 = 40704 ir_power_key_code1 = 26 ir_addr_code1 = 64260 ir_power_key_code2 = 20 ir_addr_code2 = 32640 ir_power_key_code3 = 21 ir_addr_code3 = 32640 ir_power_key_code4 = 11 ir_addr_code4 = 63240 ir_power_key_code5 = 3 ir_addr_code5 = 239 ir_power_key_code6 = 159 ir_addr_code6 = 19635 ir_power_key_code7 = 10 ir_addr_code7 = 30536 ir_power_key_code8 = 69 ir_addr_code8 = 48386 ir_power_key_code9 = 77 ir_addr_code9 = 56865 ir_power_key_code10 = 24 ir_addr_code10 = 65025 ir_power_key_code11 = 87 ir_addr_code11 = 65280 ir_power_key_code12 = 77 ir_addr_code12 = 65344 [cir] ir_used = 1 ir_tx = port:PH07<2><default><default><default> [dvfs_table] pmuic_type = 2 pmu_gpio0 = port:PL06<1><1><2><1> pmu_level0 = 11300 pmu_level1 = 1100 extremity_freq = 1296000000 max_freq = 1200000000 min_freq = 480000000 LV_count = 7 LV1_freq = 1296000000 LV1_volt = 1320 LV2_freq = 1200000000 LV2_volt = 1240 LV3_freq = 1104000000 LV3_volt = 1180 LV4_freq = 1008000000 LV4_volt = 1140 LV5_freq = 960000000 LV5_volt = 1080 LV6_freq = 816000000 LV6_volt = 1020 LV7_freq = 480000000 LV7_volt = 980 [gpu_dvfs_table] G_LV_count = 3 G_LV0_freq = 312000000 G_LV0_volt = 1200000 G_LV1_freq = 384000000 G_LV1_volt = 1200000 G_LV2_freq = 456000000 G_LV2_volt = 1200000 [Vdevice] Vdevice_used = 0 Vdevice_0 = port:PH10<5><1><2><default> Vdevice_1 = port:PH11<5><1><2><default> [s_uart0] s_uart_used = 0 s_uart_tx = port:PL02<2><default><default><default> s_uart_rx = port:PL03<2><default><default><default> [s_rsb0] s_rsb_used = 1 s_rsb_sck = port:PL00<2><1><2><default> s_rsb_sda = port:PL01<2><1><2><default> [s_jtag0] s_jtag_used = 0 s_jtag_tms = port:PL04<2><1><2><default> s_jtag_tck = port:PL05<2><1><2><default> s_jtag_tdo = port:PL06<2><1><2><default> s_jtag_tdi = port:PL07<2><1><2><default> [s_powchk] s_powchk_used = -2147483648 s_power_reg = 0 s_system_power = 50 [sim0] scr_used = 0 scr_vccen = port:PA06<2><default><default><default> scr_slk = port:PA07<2><default><default><default> scr_sda = port:PA08<2><default><default><default> scr_rst = port:PA09<2><default><default><default> scr_det = port:PA10<2><default><default><default> [ts0] tsc_used = 0 tsc_clk = port:PE00<3><default><default><default> tsc_err = port:PE01<3><default><default><default> tsc_sync = port:PE02<3><default><default><default> tsc_dvld = port:PE03<3><default><default><default> tsc_d0 = port:PE04<3><default><default><default> tsc_d1 = port:PE05<3><default><default><default> tsc_d2 = port:PE06<3><default><default><default> tsc_d3 = port:PE07<3><default><default><default> tsc_d4 = port:PE08<3><default><default><default> tsc_d5 = port:PE09<3><default><default><default> tsc_d6 = port:PE10<3><default><default><default> tsc_d7 = port:PE11<3><default><default><default> [gpio_power_key] key_used = 1 key_io = port:PL03<6><default><default><0> [key_para] key_used = 0 key_cnt = 5 key1_vol = 222 key2_vol = 444 key3_vol = 666 key4_vol = 857 key5_vol = 2000 [d7s_para] d7s_used = 0 din_gpio = port:PD00<1><default><default><1> clk_gpio = port:PD01<1><default><default><1> stb_gpio = port:PD02<1><default><default><1> [mali_para] mali_used = 1 mali_clkdiv = 1 mali_extreme_freq = 600 mali_extreme_vol = 1400 [w1_para] w1_used = 1 gpio = 20 [corekeeper] corekeeper_enabled = 1
Note that I added a line to the gpio section in one of my attempts to make this work, in order to map PA2 to GPIO20 (or at least that was what I was trying to accomplish).
I'm trying to compile an MQTT gateway, so my configure line is:
./configure --spi-spidev-device=/dev/spidev0.0 --my-rfm69-irq-pin=10 --my-rfm69-cs-pin=20 --my-transport=rfm69 --my-rfm69-frequency=433 --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 --extra-cxxflags="-DMY_DEBUG_VERBOSE_RFM69"
And here is the core of my problem - which values to use for IRQ pin and CS pin. If I use 10 for IRQ. I compile with no problems, but when I run
sudo bin/mysgw -d
I get:
fanta@orangepipc:~/MySensors$ sudo bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RPNG----,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: RFM69:INIT mysgw: RFM69:INIT:PIN,CS=20,IQP=10,IQN=2 mysgw: RFM69:PTX:LEVEL=5 dBm mysgw: Could not open /sys/class/gpio/gpio10/direction
I have already tried enabling GPIO10:
fanta@orangepipc:~/MySensors$ echo "10" |sudo tee /sys/class/gpio/export 10 tee: /sys/class/gpio/export: Device or resource busy
My gpio readall outputs this:
fanta@orangepipc:~/MySensors$ 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 | OUT | 0 | 7 || 8 | 0 | OUT | TxD3 | 15 | 13 | | | | 0v | | | 9 || 10 | 0 | OUT | RxD3 | 16 | 14 | | 1 | 0 | RxD2 | OUT | 0 | 11 || 12 | 0 | OUT | GPIO.1 | 1 | 110 | | 0 | 2 | TxD2 | OUT | 0 | 13 || 14 | | | 0v | | | | 3 | 3 | CTS2 | OUT | 0 | 15 || 16 | 0 | OUT | GPIO.4 | 4 | 68 | | | | 3.3v | | | 17 || 18 | 0 | OUT | 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 | OUT | CE0 | 10 | 67 | | | | 0v | | | 25 || 26 | 0 | OUT | GPIO.11 | 11 | 21 | | 19 | 30 | SDA.1 | ALT4 | 0 | 27 || 28 | 0 | ALT4 | SCL.1 | 31 | 18 | | 7 | 21 | GPIO.21 | OUT | 0 | 29 || 30 | | | 0v | | | | 8 | 22 | GPIO.22 | OUT | 0 | 31 || 32 | 0 | OUT | RTS1 | 26 | 200 | | 9 | 23 | GPIO.23 | OUT | 0 | 33 || 34 | | | 0v | | | | 10 | 24 | GPIO.24 | OUT | 0 | 35 || 36 | 0 | OUT | CTS1 | 27 | 201 | | 20 | 25 | GPIO.25 | OUT | 1 | 37 || 38 | 0 | OUT | TxD1 | 28 | 198 | | | | 0v | | | 39 || 40 | 0 | OUT | RxD1 | 29 | 199 | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+-Orange Pi+---+------+----------+-----+-----+
So I tried --my-rfm69-irq-pin=2 --my-rfm69-cs-pin=67 as well, but I run into the same problem with pin 2.
Can anyone help me find out which pin numbers to use?
Thanks in advance!
-
@awilner I am in a hurry right now so I cannot go through what you wrote in detail, but maybe my post about pin numbering can help you: https://forum.mysensors.org/post/58309 It is related to an OPi Plus2e using nrf24 but the numbering formulas should still be valid.
Good luck!
-
@pansen , Thank you so much!!! I managed to find two pins that didn't give me this error, PA11 and PA12, and now at least the chip configuration and communication apparently works.
-
I wanted to build MQTT client gateway with whitelisting and encryption + 3 LEDs with Arduino UNO and Ethernet shield but it does not have enough memory.
Before going to Arduino MEGA I found this and I think this will be a better way to do it. Smaller, cheaper..just not sure if it has all the options. Can someone confirm? Whitelisting will be easier then reflashing Arduino all the time too.
I plan to use Orange Pi Zero H2+ Quad Core 256MB
-
If your conditions are
- 3 LEDs: yes through GPIO
- Ethernet: yes (d'uh)
- beefy enough for software encryption: I guess? For an IoT-low data rate scenario for sure
I'm running armbian on my Orange Pi and setting up mosquitto is a breeze. But you don't need a broker right? Don't forget you need an SD card on top and more power.
-
Thanks, I already have a broker and OpenHAB. Want this gateway to act as a client....maybe it will even support SSL MQTT. And encryption with
#define MY_RF24_ENABLE_ENCRYPTION is wanted.
In the article, there is no list of all available configurations...yea adding SD card does not make it cheaper
-
i'm sorry, i do not have experience with encryption. essentially it depends on the code you want to write, since on the pi you are kind of limited to scripting, whereas microcontroller code is closer to hardware. also, if you need things like an adc or spi you're better of with a microcontroller. if it's just about some LEDs lighting up..
-
@8667 said in Building a Orange Pi Gateway:
In the article, there is no list of all available configurations..
From the article:
For a complete list of configuration parameters, run:
./configure --help
Did you miss this or is there something I'm not understanding?
-
mysgw: Could not open /sys/class/gpio/gpio10/direction
Please help me to solve this error
-
@BAsavaraj004 could you describe what you did when you got that error?
-
@mfalkvidd
When I executed sudo ./bin/mysgw -d this command after that i'm facing error like :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: Could not open /sys/class/gpio/gpio24/direction
I followed all the steps provide in the site but still I am getting error.
-
@BAsavaraj004 thanks. Earlier posts indicate that the "Could not open" error could be caused by a problem with the pin mapping. I don't have an OrangePi myself so I don't know the details but maybe these posts can help:
https://forum.mysensors.org/post/69656
https://forum.mysensors.org/post/60943
https://forum.mysensors.org/post/56374
-
@SdeWeb said in Building a Orange Pi Gateway:
Hi,
Well done finally i used the dedicated .fex file for Orange Pi Plus 2E here :
https://linux-sunxi.org/Xunlong_Orange_Pi_Plus_2E#Expansion_Portat this point :
https://github.com/igorpecovnik/lib/blob/master/config/fex/orangepiplus2e.fexRead the .fex file in a text editor, u'll see important things about "gpio_config" for H3 cpu :
; NOTE: This section is necessary only for "gpio_sunxi" driver ; which is obsolete for H3 boards [gpio_para] gpio_used = 0 gpio_num = 0
I connected my NRF24L01 on OPI P2E like this :
NRF24L01 Port Name / (Pin N°) ----- OPI Port (Pin N°) / Name GND (1) <-----------> (20) / GND VCC (2) <-----------> (17) / 3.3V PWR CE (3) <-----------> (22) / (PA2 / GPIO2) CSN (4) <-----------> (24) / (PC3 / GPIO67) SCK (5) <-----------> (23) MOSI (6) <-----------> (19) MOSI MISO (7) <-----------> (21) MISO IRQ (8) <-----------> NC
So "MySensors" setup is :
./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67
Then
./bin/mysgw -d
Return :
root@orangepiplus2e:~/MySensors# ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta 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
Best.
Seb.This worked great on my Orange Pi Lite.
I was trying to follow the tutorial at Building a Orange Pi Gateway and I tried all sorts of things that didn't work.
IMO the main tutorial should have this as instruction to building a gateway with Orange Pi Lite/Plus.
Thanks!!
( Sorry for quoting the entire original post, but this will help anyone searching for help with their Orange Pi Lite)
-
I got the OrangeZero and was building the configuration command... can someone provide me more detailed instructions about using higher security?
- Is it possible to use SSL for the connecting to the broker?
- How whitelisting works with Pi? I moved away of Arduino as I do not want to recompile it everytime I need to include new node. So far I have
-my-signing-request-signatures --my-signing-debug --my-signing=password --my-signing-password=SOMETHING --my-rf24-encryption-enabled
but this will not allow me to exclude stolen nodes right?
-
@8667 no, it won't. As it is for the moment, whitelisting works no different compared to Arduino based devices. You will have to recompile your GW if you add new nodes as you will need to add their serials to the whitelist in the GW.
-
@Anticimex said in Building a Orange Pi Gateway:
@8667 no, it won't. As it is for the moment, whitelisting works no different compared to Arduino based devices. You will have to recompile your GW if you add new nodes as you will need to add their serials to the whitelist in the GW.
So how personalization works on the orange and how to pass the list of serials?
-
@8667 not sure. I have not been involved in the rPi port. I suggest you pass --help to the configure command. It should give a list of options.
-
This should be in the wiki
root@pi0:~/MySensors# ./configure --help configure script for MySensors gateway. Options: Help: -h, --help print this message SPI driver options: --spi-driver=[BCM|SPIDEV] --spi-spidev-device=<DEVICE> Device path. [/dev/spidev0.0] Building options: --soc=[BCM2835|BCM2836|BCM2837|AM33XX|A10|A13|A20|H3] SoC type to be used. [configure autodetected] --cpu-flags=<CPUFLAGS> CPU defining/optimizing flags to be used. [configure autodetected] --extra-cflags=<CFLAGS> Extra C flags passed to C compilation. [] --extra-cxxflags=<CXXFLAGS> Extra C++ flags passed to C++ compilation. [] --extra-ldflags=<LDFLAGS> Extra C flags passed to linking. [] --c_compiler=<CC> C compiler. [arm-linux-gnueabihf-gcc][gcc] --cxx_compiler=<CXX> C++ compiler. [arm-linux-gnueabihf-g++][g++] --build-dir=<DIR> Compiler directory to store object files. [build] --bin-dir=<DIR> Compiler directory to store binary files. [bin] --arduino-lib-dir=<DIR> Arduino library directory. --no-clean Don't clean previous build artifacts. Installation options: --prefix=<PREFIX> Installation prefix path. [/usr/local] --gateway-dir=<DIR> Gateway files installation directory. [PREFIX/bin] MySensors options: --my-debug=[enable|disable] Enables or disables MySensors core debugging. [enable] --my-config-file=<FILE> Config file path. [/etc/mysensors.dat] --my-gateway=[none|ethernet|serial|mqtt] Set the protocol used to communicate with the controller. [ethernet] --my-node-id=<ID> Disable gateway feature and run as a node with the specified id. --my-controller-url-address=<URL> Controller or MQTT broker url. --my-controller-ip-address=<IP> Controller or MQTT broker ip. --my-port=<PORT> The port to keep open on gateway mode. If gateway is set to mqtt, it sets the broker port. --my-serial-port=<PORT> Serial port. [/dev/ttyACM0] --my-serial-baudrate=<BAUD> Serial baud rate. [115200] --my-serial-is-pty Set the serial port to be a pseudo terminal. Use this if you want to connect to a controller running on the same device. --my-serial-pty=<NAME> Symlink name for the PTY device. [/dev/ttyMySensorsGateway] --my-serial-groupname=<GROUP> Grant access to the specified system group for the serial device. --my-mqtt-client-id=<ID> MQTT client id. --my-mqtt-user=<UID> MQTT user id. --my-mqtt-password=<PASS> MQTT password. --my-mqtt-publish-topic-prefix=<PREFIX> MQTT publish topic prefix. --my-mqtt-subscribe-topic-prefix=<PREFIX> MQTT subscribe topic prefix. --my-transport=[none|nrf24|rs485|rfm95|rfm69] Set the transport to be used to communicate with other nodes. [nrf24] --my-rf24-channel=<0-125> RF channel for the sensor net. [76] --my-rf24-pa-level=[RF24_PA_MAX|RF24_PA_LOW] RF24 PA level. [RF24_PA_MAX] --my-rf24-ce-pin=<PIN> Pin number to use for rf24 Chip-Enable. --my-rf24-cs-pin=<PIN> Pin number to use for rf24 Chip-Select. --my-rf24-irq-pin=<PIN> Pin number connected to nRF24L01 IRQ pin. --my-rf24-encryption-enabled Enables RF24 encryption. All nodes and gateway must have this enabled, and all must be personalized with the same AES key --my-rx-message-buffer-size=<SIZE> Buffer size for incoming messages when using rf24 interrupts. [20] --my-rfm69-frequency=[315|433|868|915] RFM69 Module Frequency. [868] --my-is-rfm69hw Enable high-powered rfm69hw. --my-rfm69-irq-pin=<PIN> Pin number connected to RFM69 IRQ pin. --my-rfm69-cs-pin=<PIN> Pin number to use for RFM69 Chip-Select. --my-rs485-serial-port=<PORT> RS485 serial port. You must provide a port. --my-rs485-baudrate=<BAUD> RS485 baudrate. [9600] --my-rs485-de-pin=<PIN> Pin number connected to RS485 driver enable pin. --my-rs485-max-msg-length=<LENGTH> The maximum message length used for RS485. [40] --my-leds-err-pin=<PIN> Error LED pin. --my-leds-rx-pin=<PIN> Receive LED pin. --my-leds-tx-pin=<PIN> Transmit LED pin. --my-leds-blinking-inverse Inverse the blinking feature. --my-signing=[none|software|password] Message signing. [none] --my-signing-debug Enable signing related debug. --my-signing-request-signatures Enable signature request from nodes that in turn requested gateway signature. --my-signing-weak_security Enable this to permit downgrade of security preferences and relaxed gateway signing requirements. --my-signing-password=<PASSWORD> If you are using password as the signature type, set your password here.
root@pi0:~/MySensors# sudo ./bin/mysgw -h mysgw: Config file /etc/mysensors.dat does not exist, creating new config file. Usage: mysgw [options] Options: -h, --help Display a short summary of all program options. -d, --debug Enable debug. -b, --background Run as a background process. --gen-soft-hmac-key Generate and print a soft hmac key. --gen-soft-serial-key Generate and print a soft serial key. --gen-aes-key Generate and print an aes encryption key. --print-soft-hmac-key Print the soft hmac key from the config file. --print-soft-serial-key Print the soft serial key from the config file. --print-aes-key Print the aes encryption key from the config file. --set-soft-hmac-key Write a soft hmac key to the config file. --set-soft-serial-key Write a soft serial key to the config file. --set-aes-key Write an aes encryption key to the config file.
-
@8667 if there is no option for the whitelist, you should still be able to set it using the same #define as mentioned in the signing documentation. The implementation is shared.
It makes sense to keep it like that since the list could be quite long.
-
@8667 a first try of making the help text available online is now available at https://ci.mysensors.org/job/MySensors/job/MySensors/job/PR-952/12/Doxygen_HTML/group__RaspberryPiGateway.html
If/when the pull request is accepted, a link can be added on the build page.
-
Hello! I followed instructions by SdeWeb on my Orange Pi Lite with Armbian, and gateway is working fine, I can see debug messages from other node. But when I try to add a serial port in node-red I can't find the gateway one. Can you help me?
-
FYI i configure like this:
./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB10 --my-serial-baudrate=115200
-
NOTE for Armbian and Orange Pi Zero.
Set static IP address or the device will lose connection on next DHCP request. I use only the LAN and was having problems for few days.
-
@8667 I didn't know it was possibe to set ip address for the Pi gateway. How did you do that?
-
Hi,
You should set your gateway as a ethernet / network gateway. By default, it run on port 5003 (ex : [gwipadresse]:5003.
If you controler is hosted on the same machine that the gateway, then you can call the ip adresse : 127.0.0.1:5003. (the localhost adress) whatever the real IP adresse of your PI.
if you got a good router on u'r network, that it running DHCP server and give IP adresses of your devices on the network, then you can define static IP adresse for the MAC adresse of your PI.Regards.
-
I had to use spidev0.0 and not spidev1.0:
+++
opilite@orangepilite:~/MySensors$ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.0-beta
mysgw: MCO:BGN:INIT GW,CP=RNNGL---,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: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
+++
opilite@orangepilite:~/MySensors$ ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
-
With mqtt gateway I got further ahead:
+++
opilite@orangepilite:~/MySensors$ ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 --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=my_mqtt_gateway
+++
opilite@orangepilite:~/MySensors$ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.0-beta
mysgw: MCO:BGN:INIT GW,CP=RNNGL---,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: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
mysgw: Attempting MQTT connection...
mysgw: connected to 127.0.0.1
mysgw: MQTT connected
mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
+++
mysensors-out/0/255/0/0/18 : msg.payload : string[10]
"2.2.0-beta"
-
Ok, now I load a sketch into an arduino nanowith nrf24l01+ and this is all I got:
+++
opilite@orangepilite:~/MySensors$ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.0-beta
mysgw: MCO:BGN:INIT GW,CP=RNNGL---,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: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
mysgw: Attempting MQTT connection...
mysgw: connected to 127.0.0.1
mysgw: MQTT connected
mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
mysgw: TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
mysgw: TSF:MSG:BC
mysgw: TSF:MSG:FPAR REQ,ID=255
mysgw: TSF:CKU:OK,FCTRL
mysgw: TSF:MSG:GWL OK
mysgw: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
mysgw: TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
mysgw: TSF:MSG:BC
mysgw: TSF:MSG:FPAR REQ,ID=255
mysgw: TSF:PNG:SEND,TO=0
mysgw: TSF:CKU:OK
mysgw: TSF:MSG:GWL OK
(...)
+++Stuck again.
-
@Ricardo-Ribeiro that looks normal. Is this different from what you expected? If so, how does it differ?
-
Had anyone succeeded using signing+encryption on OrangePi MQTT gateway? I managed to make Arduino gateway and it worked but I can not replicate the same thing with Pi. What file should be edited to enter the keys? and the whitelist?
-
Am getting this error:
ERROR Could not open /sys/class/gpio/gpio24/direction
My config is:./configure --spi-spidev-device=/dev/spidev1.0 --my-node-id=1 --my-transport=rfm95 --my-rfm95-cs-pin=13 --my-rfm95-irq-pin=10 --my-rfm69-frequency=915E6
Whole output is:
root@ttn-gateway:~/MySensors# sudo ./bin/mysgw May 23 09:37:31 INFO Starting gateway... May 23 09:37:31 INFO Protocol version - 2.3.0-alpha __ __ ____ | \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___ | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __| | | | | |_| |___| | __/ | | \__ \ _ | | \__ \ |_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/ |___/ 2.3.0-alpha May 23 09:37:31 DEBUG MCO:BGN:INIT NODE,CP=RLNNL---,VER=2.3.0-alpha May 23 09:37:31 DEBUG TSM:INIT May 23 09:37:31 DEBUG TSF:WUR:MS=0 May 23 09:37:42 ERROR Could not open /sys/class/gpio/gpio24/direction
-
- Does /sys/class/gpio/gpio24/direction exists?
- Does /sys/class/gpio/gpio24 exists?
- Can you write to them using echo?
-
@pansen No.... nothing...
/sys/class/gpio/gpio24
doesn't exist.
even "echo "24" > /sys/class/gpio/export
doesn't work.
But, yes otherwise if I try the same with 13 i.e "echo "13" > /sys/class/gpio/export
Then a directory is created and then/sys/class/gpio/gpio24/direction
do exist.
-
@pansen Thank you sooooooo much for your reply.!!! By the way, What I actually have to do is "Make an MQTT based LoRa(RA-02) receiver gateway on OrangePi Zero". And I'm stuck since whole week of course spent time trying code without solid base.
Yes, yet I'm trying to first set up a LoRa receiver(not MQTT, not gateway)
-
@pii --my-rfm95-cs-pin and --my-rfm95-irq-pin options are not currently supported by the configure script.
Until we fix this, could you please try adding the following to your examples_linux/mysgw.cpp (before the #include <MySensors.h>)#define MY_RFM95_CS_PIN 13 #define MY_RFM95_IRQ_PIN 10 #define MY_RFM95_FREQUENCY RFM95_915MHZ
and run the make command again.
-
@marceloaqno said in Building a Orange Pi Gateway:
#define MY_RFM95_CS_PIN 13
#define MY_RFM95_IRQ_PIN 10
#define MY_RFM95_FREQUENCY RFM95_915MHZThank you sooo much. I just did this. But, Now got a new error.
ERROR Could not open /sys/class/gpio/gpio10/direction
and when I tried to export pin 10 it says:
:/sys/class/gpio# echo '10' > export -bash: echo: write error: Device or resource busy
Though yes still I'm able to export/unexport pin 13(just for testing)
-
-
@pii Try to connect the IRQ pin from the radio to another GPIO on your Orange Pi, for example the GPIO2.
#define MY_RFM95_IRQ_PIN 2
-
There is an issue now with spi interfaces. With the current armbian image we are stuck at the prepare the system part, no /dev/spidev* available, the old method does not work. (There is no /boot/script.bin file, for example.) Does anyone know the solution, could this guide be updated, please?
-
-
Hi!
Installation instructions will be adjusted for Armbian Stretch?
-
I have Mysensors running with nrf24 , I wanted to upgrade Armbian to the latest Stretch. I configured DT overlays by adding
verbosity=1
console=serial
overlay_prefix=sun8i-h3
rootdev=UUID=bd0ded76-1188-4b52-a20a-64f326c1f193
rootfstype=ext4
overlays=w1-gpio uart1 i2c0 spi-spidev
param_w1_pin=PA20
param_w1_pin_int_pullup=1
param_uart1_rtscts=1
param_spidev_spi_bus=0to /boot/armbianEnv.txt. I had spidev working, but not the mysgw. It doidn't give me errors, but i was stuck at !TSM:INIT:TSP FAIL.
Maybe the problem is that there is no gpio-sunxi in Stretch... I have no idea.By the way, i noticed that the new version of Mysensors calls nrf24 transport differently, it is now called --my-transport=rf24.
Please update the guide for Armbian Stretch.
-
Made fix for Armbian Stretch https://github.com/mysensors/MySensors/pull/1200.
my settings: /boot/armbianEnv.txt
overlays=w1-gpio uart1 spi-spidev spi-add-cs1
param_spidev_spi_bus=1
param_spidev_spi_cs=0git clone https://github.com/mysensors/MySensors.git --branch development
cd MySensors
and further on the instructions
-
Hi,
for anyone creating a gateway on an Orange Pi PC using armbian mainline (4.x Kernel): The fex modifications are not necessary any more. As noted before by @Roman, the device tree needs to be modified.
If you use the exact same pins as in this guide for the Orange Pi PC, SPI0 needs to be activated instead of SPI1. (Pi Zero and PC are kind of pin compatible, but Zero only has SPI1 routed to the header, whereas the same pins on the PC have SPI0. On top, the Orange Pi PC also has SPI1 but on other pins):
verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=w1-gpio uart1 spi-spidev spi-add-cs1 param_spidev_spi_bus=0 param_spidev_spi_cs=0 rootdev=<removed> rootfstype=ext4 usbstoragequirks=<removed>
Attention: Header pin 26 is different between Pi PC and Pi Zero. On the zero it is PA10 but on the PC it is PA21. I connected the interrupt pin of the nrf24 like in the guide (header pin 26) and changed the configure command accordingly.
So the full command to use SPI0 and the interrupt connected to header pin 26 of the Orange Pi PC is:
./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=rf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 --my-rf24-irq-pin=21 --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=mysensors
The rest of the guide is still valid, except that the transport is now called "rf24" instead of "nrf24". @mfalkvidd can you correct this maybe? Also, the -d switch seems to be not existing any more.
-
This post is deleted!
-
Thanks @pansen. I have replaced nrf24 with rf24 for all commands on the page and removed the -d option.
-
I saw this page and thought I give it a go. So I bought two OrangePi Zero 2. There's a lot of potential (WiFi) as a dedicated gateway. Currently the price is about US$20 on AliExpress (caveat emptor) There are a few flavors of Linux for it. I've dabbled with Armbian, Ubuntu and Debian
Another upside is that it doesn't draw a lot of current ~0.5A, though I haven't been successful in getting the radio to run (the reason for me being here) This is also a downside as I suspect the power supply needs to be very close to 5V. Thinking it was a power hog like the RPi, I used a 5V-3A supply. This supply operates on the principle that the load will pull down the voltage. There are dire warnings on the orangepi page about using cheap SD cards, but failed to mention that power supplies have to be matched, too.
It has a different CPU than the Orange Pi Zero non-2, the board that is used here.
Use the serial interface to configure the board. You're going to be doing all your configuration in a terminal, anyway, so you don't need a monitor or a keyboard. https://www.instructables.com/Setup-Orange-Pi-Using-Serial-Port/
The big downside is that the SPI interface is not supported. My research indicates that in order to get it to work one must jump through some serious hoops and being low on the learning curve, those hoops are probably out of my reach. https://forum.armbian.com/topic/21688-tips-on-configuring-double-spi-through-two-chipselects-on-orange-pi-zero-2/
The armbian OS has another big downside, WiFi is not supported. Putting a TP-Link nano router configured as a client works, but it's another $30! Why did they even release the OS?
So! Was anyone successful in getting the Orange Pi Zero 2 configured as a gateway?