[Tutorial] Raspberry Pi NRF24l01 direct connection
-
Hey folks,
big THX for the tut.
But i have some problems after starting the GW.
My output is only:
./PiGatewaySerial
Starting PiGatewaySerial...
Protocol version - 1.4
Created PTY '/dev/pts/1'
Gateway tty: /dev/ttyMySensorsGateway
check wiresand a 100% CPU Load.
regards,
n3roissue in GIT:
https://github.com/mysensors/Raspberry/issues/11 -
the ttyMysensorsGateway can only be accessed as root (user root, group root).
Other serialports seem to have the group "dialout" attached.I am running node-red which is unable the gateway and I guess this has to do with it. Anyone a solution ?
-
? Are you using the code that is available on github now?
This behavior was Change by Holger a month ago. You can configure the Groups in the makefile:
The standard configuration will build the Serial Gateway with a tty name of
'/dev/ttyMySensorsGateway' and PTS group ownership of 'tty' the PTS will be group read
and write. The default install location will be /usr/local/sbin. If you want to change
that edit the variables in the head of the Makefile.
-
? Are you using the code that is available on github now?
This behavior was Change by Holger a month ago. You can configure the Groups in the makefile:
The standard configuration will build the Serial Gateway with a tty name of
'/dev/ttyMySensorsGateway' and PTS group ownership of 'tty' the PTS will be group read
and write. The default install location will be /usr/local/sbin. If you want to change
that edit the variables in the head of the Makefile.
@Andreas-Maurer Thanks for the quick answer. I used the code from github. I am going to check your suggestions tonight. (right now I am at work ;-)
Sander.
-
Sorry for my naive question: does it means I ca use a raspi as a nrd24l01 based gateway?
-
Sorry for my naive question: does it means I ca use a raspi as a nrd24l01 based gateway?
@Roberto-Brunialti Yes. Works perfectly ! (apart from the root access ;-)
As stated by blksun813 you need to "sudo make install in the librf24-bcm folder". (add the sudo...) -
I'm currently at work, but there's a question: will it run on orangepi? (bananapi-like clone of RPi)
I'll take a look at the code and try to manage... GPIOs are working almost the same (it's compatible).Maybe if I make a diff-file of things changed, you will be able to merge it and do some 'ifs' so code will be clone-compatible?
Oh well... The library has -bcm in name so I guess it will be rather hard to get it to work...
-
? Are you using the code that is available on github now?
This behavior was Change by Holger a month ago. You can configure the Groups in the makefile:
The standard configuration will build the Serial Gateway with a tty name of
'/dev/ttyMySensorsGateway' and PTS group ownership of 'tty' the PTS will be group read
and write. The default install location will be /usr/local/sbin. If you want to change
that edit the variables in the head of the Makefile.
to run the gateway:
sudo ./PiGatewaySerial (without sudo I get the error below)Could not create a symlink '/dev/ttyMySensorsGateway' to PTY! (13) Permission deniedrunning:
ls -l ttyMySensorsGatewaygives the following:
lrwxrwxrwx 1 root root 10 May 7 17:27 ttyMySensorsGateway -> /dev/pts/2I checked the makefile and it says
TTY_GROUPNAME := tty
But it doesn't seem to do anything...Any ideas ?
-
The symlink alwayshas 777. Everyone can use it.
Please have a look at /dev/pts/2 This device should have the configured groups.Ok?
-
The symlink alwayshas 777. Everyone can use it.
Please have a look at /dev/pts/2 This device should have the configured groups.Ok?
@Andreas-Maurer said:
The symlink alwayshas 777. Everyone can use it.
Please have a look at /dev/pts/2 This device should have the configured groups.Ok?
Yes. Ok!
It works.
Thanks ! -
An other silly question: can I install a controller into the same raspberry pi (the one with this gateway and nrf )? Are all controllers suitable for such a configuration ?
Thanks! -
For my Point of view, every Controller which is able to use the Serial Gateway.
-
I tested it on my Rpi B+ its working fine, but the cpu load is always 100%. Is this normal?
Same here. I'm afraid that with the PI at 100% there is no much use of this code becasue we can't do anything else...
Strange that the PI that is much powerfull than an arduino gets so high CPU for something that an arduino nano can do...
Could it be something that could be improved?
Cheers,
Joaoabs -
I have no problem with it. fhem as controler and mysql as DB is running on the same PI.
The Gateway is not even listed in "top" -
I have no problem with it. fhem as controler and mysql as DB is running on the same PI.
The Gateway is not even listed in "top"Do you mean you don't have any problems with the fact the CPU is at 100% or you simply don't have the same sympthom?
Thanks for replying,
Joaoabs -
Hi,
I think the problem with the PiGatewaySerial showing as consuming 100% is not a real problem. I also see the CPU consuming 100% using the top utility, however as soon as you run another process, for example a user python script, on the Pi, you will notice that top will suddenly report that PiGatewaySerial is using only a few percent of the CPU.
Cheers
Richard -
Hi! I want to use RPi as a controller, with direct radio connection and pimatic. I've followed both posts but not sure how to make it work together. I know @Vladut-Grecu is using the same configuration, could you please point me to the right direction?
-
Ok. It seems the gateway is working as i get the same final screen when I run it. But... does it has a verbose mode? How can I know If it is working? I tried with a test node, unfortunately it seems not working ... or simply it does'nt give any feedback...