💬 Building a Raspberry Pi Gateway
-
@Anticimex: Sure, that's totally understandable. There are other people on the forum :-) Can anyone help me and @pepson out?
And it is exactly my goal to create a more elaborate guide after someone points out the basic steps.
-
I have designed a 3D printable enclosure for this and the design/STL files are available here: https://www.thingiverse.com/thing:3072244
-
@John-Oliva, nice! Added it to the MySensors collection:
https://www.thingiverse.com/mysensors/collections/mysensors -
Hello, it seems I found the problem: Complete newbie thing: :beginner:
sudo ./bin/mysgw -hworked, but/usr/local/bin/mysgwdidn't
I just gave the right to the folder, and now it's working.
Thanks for taking time to help beginners ! -
@gohan I was try to find it with ps -ef, but nothing found. Reload RPI.
@korleone was write about this
"Hello, it seems I found the problem: Complete newbie thing: 🔰
sudo ./bin/mysgw -h worked, but /usr/local/bin/mysgw didn't
I just gave the right to the folder, and now it's working."But what right hi gave ?
-
Is the rasberry pi serving as a gateway and a server in this project? Or do you have to have a separate pi to host something like openhab and another pi for your gateway?
Hi @magjef29, welcome to the MySensors forum!
You can run your controller(s) on the same Raspberry Pi.
Depending on what tou mean by ”server”, the gateway can be a server, but the gateway is not a controller.
If you haven’t already, see the getting started guide for information about the different parts.
-
Hi! Does anybody test Cubieboard as Gateway? I have a cubieboard runing archlinux with spi enabled in kernel. How i define pins for nrf24 gateway connection? Or i need to make big changes in code to star work with different bord than Rpi?
Best regards -
This is my old dream to connect directly nrf to Cubieboard GPIOs. Few years ago i try to do this without success using this lib - https://github.com/bearpawmaxim/librf24-sunxi
-
This is my old dream to connect directly nrf to Cubieboard GPIOs. Few years ago i try to do this without success using this lib - https://github.com/bearpawmaxim/librf24-sunxi
Hi @артем-тихонович, welcome to the MySensors forum!
For the NRF24, the same defines as for normal sketches are used. Documentation: https://www.mysensors.org/apidocs/group__RF24SettingGrpPub.html
The defines can be added to the Raspberry Pi gateway by following the instructions on https://www.mysensors.org/build/raspberry#advancedI have not heard about anyone using the Cubieboard but hopefully someone else has. The information provided on https://www.mysensors.org/build/orange might be useful if the Cubieboard is similar to the Orange Pie.
oh, and in case you haven't already, see the ./configure --help text about the most common NRF24 defines; you might not need the advanced build options.
-
Thank you, @mfalkvidd. Ihave a little troubles with correct defining gpios from Cubie. In fex file the gpios defines is:
[gpio_para]
gpio_used = 1
gpio_num = 2
gpio_pin_1 = port:PH07<0><default><default><default>
gpio_pin_2 = port:PH15<6><default><default><default>
in sys/gpio:
[root@Archey boot]# ls -ls /sys/class/gpio/
total 0
0 --w------- 1 root root 4096 Nov 21 11:58 export
0 lrwxrwxrwx 1 root root 0 Nov 18 17:01 gpio1_ph7 -> ../../devices/platform/gpio-sunxi/gpio/gpio1_ph7
0 lrwxrwxrwx 1 root root 0 Nov 21 11:54 gpio2_ph15 -> ../../devices/platform/gpio-sunxi/gpio/gpio2_ph15
0 lrwxrwxrwx 1 root root 0 Nov 18 10:45 gpiochip1 -> ../../devices/platform/gpio-sunxi/gpio/gpiochip1
0 --w------- 1 root root 4096 Nov 18 16:52 unexportWhen i define in configure: --my-rf24-ce-pin=1 --my-rf24-cs-pin=2 build is ok, but test failed with error:
Nov 21 11:58:15 ERROR Could not open /sys/class/gpio/gpio1/direction[root@Archey MySensors]#
when i define --my-transport=nrf24 --my-rf24-ce-pin=gpio1_ph7 the build failed wirh error:
./drivers/RF24/RF24.cpp: In function 'void RF24_ce(bool)':
<command-line>:0:16: error: 'gpio1_ph7' was not declared in this scope
./drivers/RF24/RF24.cpp:52:17: note: in expansion of macro 'MY_RF24_CE_PIN'
hwDigitalWrite(MY_RF24_CE_PIN, level);How can i resolve this problem? Please help.
-
I just see for another app using nrf24 on cubieboard
and funcrtion to use nrf24 have GPIO defining is RF24 radio(SUNXI_GPB(10), SUNXI_GPB(11), "/dev/spidev0.0");
GPIO set using this style: SUNXI_GPB(10), this type of gpio defined in #include "gpio_sun4i.h" file. Maybe this specific defining in ARCHLINUX ARM distro. -
I hereby donate these images:

-
I just see for another app using nrf24 on cubieboard
and funcrtion to use nrf24 have GPIO defining is RF24 radio(SUNXI_GPB(10), SUNXI_GPB(11), "/dev/spidev0.0");
GPIO set using this style: SUNXI_GPB(10), this type of gpio defined in #include "gpio_sun4i.h" file. Maybe this specific defining in ARCHLINUX ARM distro.In case someone can help @артем-тихонович, please post the answer in https://forum.mysensors.org/post/95304 so we don’t unnecessarily discuss the same thing in separate threads.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login