Hi!
Just recently discovered MySensors and this is what I was looking for!
Unfortunately I can't get communications my RPI3 to communicate with a NRF24L01.
My setup: RPi3 with a custom kernel 4.13.16 using 64bit, with loaded kernel module spi_bcm2835.
$ uname -r
4.13.16-v8+
$ cat /boot/config.txt
[...]
dtparam=spi=on
$ lsmod
[...]
spi_bcm2835 20480 0
$ ls /dev/spidev0.*
/dev/spidev0.0 /dev/spidev0.1
I use the dev-branch (also tried stable, same behavior):
$ ./configure --prefix=/data/home/gunther/mysensors --my-transport=nrf24 --my-gateway=ethernet --my-port=5003
[SECTION] Detecting target machine.
[OK] machine detected: SoC=unknown, Type=unknown, CPU=aarch64.
[SECTION] Checking GPIO Sysfs.
[OK] /sys/class/gpio/export found
[SECTION] Detecting SPI driver.
[OK] SPI driver detected:SPIDEV.
[SECTION] Detecting init system.
[FAILED] unknown init system.
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.
The unknown init system should be fine, as I do not want to create any startup scripts or move files somewhere.
Running the gateway as root gives:
$ ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.1-alpha
mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.1-alpha
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=1
mysgw: TSM:FAIL:DIS
mysgw: TSF:TDI:TSL
This tells me that the communication between radio and RPI fails.
I (more than) triple-checked the wiring.
I use a voltage regulator from 5V to 3.3V and have a 47µF capacitor between GND and 3.3V. I also tried a different voltage regulator and NRF24L01.
I assume the radio itself should be fine because attached to a Arduino Nano (with voltage regulator, without condensator) I see:
16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0
25 TSM:INIT
26 TSF:WUR:MS=0
33 TSM:INIT:TSP OK
35 TSM:FPAR
37 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
2046 !TSM:FPAR:NO REPLY
Which I expect to the missing gateway.
-) Is the SPIDEV driver ok? BCM does not compile for 64bit.
-) Do I need to activate any GPIO ports with
echo "$i" > /sys/class/gpio/export
or anything alike?
-) Is it ok, that I use other GPIO ports directly for other things?
-) Is there a way to test that SPI is working properly?
Thanks!