@Grubstake: Thanks. I have tried to follow "NRF24L01+ Radio" pin out connection. I have double / triple check my wiring is correct. But I still get the same fail message in mysgw debug mode:
[root@alarmpi bin]# ./mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
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
mysgw: Received SIGINT
Here is my /boot/config.txt
:
gpu_mem=64
initramfs initramfs-linux.img followkernel
dtparam=spi=on
and the spi dev:
# ls /dev/spidev0.*
/dev/spidev0.0 /dev/spidev0.1
I am using ArchLinuxARM:
# uname -a
Linux alarmpi 4.9.13-3-ARCH #1 SMP Fri Mar 3 18:45:16 MST 2017 armv7l GNU/Linux
I only wiring 7 pins (1-7) on NRF24l01+
.
Raspberry Pi 2 hardware information:
# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 2
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 3
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : BCM2835
Revision : a21041
Serial : 00000000475d18a4
# cat /sys/firmware/devicetree/base/model
Raspberry Pi 2 Model B Rev 1.1
Output from MySensors configure
:
# ./configure
[SECTION] Detecting target machine.
./configure: line 111: warning: command substitution: ignored null byte in input
[OK] machine detected: SoC=unknown, 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.
I finally find out my raspberry pi board isn't detected properly in configure
. I change the function detect_machine
:
function detect_machine {
...
case $hardware in
...
BCM2835)
soc="BCM2835"
if [[ $machine == "Raspberry"* ]]; then
local rev=($(detect_rpi_revision))
if [[ $rev == "a02082" || $rev == "a22082" ]]; then
tp="RPi3"
else
tp="Rpi2"
fi
fi
;;
...
make mysgw
again, and I get this finally:
# ./mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED
mysgw: Listening for connections on 0.0.0.0:5003
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1