Raspberry Pi 2 Serial Gateway [Solved]
-
Hi.
I have the Raspberry Pi Serial Gateway up and running on my Raspberry Pi Model B Revision 1.0. I can see incoming messaged when I do cat /dev/ttyMySensorsGateway.
I am trying to switch to my Raspberry Pi 2, but I am unable to compile Raspberry/librf24-bcm. When running make, the following error is shown:
pi@raspi2 ~/Raspberry/librf24-bcm $ make gcc -Wall -fPIC -Ofast -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s -march=armv7-a -D BCM2835_PERI_BASE=0x -c bcm2835.c bcm2835.c: In function ‘bcm2835_init’: bcm2835.c:1207:28: error: invalid suffix "x" on integer constant bcm2835.c:1208:28: error: invalid suffix "x" on integer constant bcm2835.c:1209:28: error: invalid suffix "x" on integer constant bcm2835.c:1210:28: error: invalid suffix "x" on integer constant bcm2835.c:1211:28: error: invalid suffix "x" on integer constant bcm2835.c:1212:28: error: invalid suffix "x" on integer constant bcm2835.c:1213:28: error: invalid suffix "x" on integer constant bcm2835.c:1214:28: error: invalid suffix "x" on integer constant bcm2835.c:1228:83: error: invalid suffix "x" on integer constant bcm2835.c:1232:81: error: invalid suffix "x" on integer constant bcm2835.c:1236:81: error: invalid suffix "x" on integer constant bcm2835.c:1239:83: error: invalid suffix "x" on integer constant bcm2835.c:1242:83: error: invalid suffix "x" on integer constant bcm2835.c:1246:83: error: invalid suffix "x" on integer constant bcm2835.c:1249:83: error: invalid suffix "x" on integer constant bcm2835.c:1253:79: error: invalid suffix "x" on integer constant Makefile:52: recipe for target 'bcm2835.o' failed make: *** [bcm2835.o] Error 1The reason is that bcm2708_vcio is not present in /proc/iomem:
00000000-3dffffff : System RAM 00008000-00774c6b : Kernel code 007de000-0092378b : Kernel data 3f006000-3f006fff : dwc_otg 3f007000-3f007eff : /soc/dma@7e007000 3f00b840-3f00b84e : /soc/vchiq 3f00b880-3f00b8bf : /soc/mailbox@7e00b800 3f200000-3f2000b3 : /soc/gpio@7e200000 3f201000-3f201fff : /soc/uart@7e201000 3f201000-3f201fff : uart-pl011 3f204000-3f204fff : /soc/spi@7e204000 3f300000-3f3000ff : /soc/mmc@7e300000 3f980000-3f98ffff : dwc_otgThis is the output from lsmod:
Module Size Used by cfg80211 420690 0 rfkill 16659 1 cfg80211 snd_bcm2835 19769 0 snd_pcm 74825 1 snd_bcm2835 snd_seq 53561 0 snd_seq_device 3650 1 snd_seq snd_timer 18157 2 snd_pcm,snd_seq snd 52116 5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device spi_bcm2835 7100 0 i2c_bcm2708 5014 0 uio_pdrv_genirq 2966 0 uio 8235 1 uio_pdrv_genirqI tried setting IOBASE to 3f204000 by editing the Makefile. That enabled the compilation to go through, but the gateway does not work. (Maybe because the IOBASE is wrong, or because I don't have the right modules loaded?)
/etc/init.d/PiGatewaySerial startstarts the gateway. No error messages are shown on the terminal.
/var/log/PiGatewaySerial.log contents:
Sep 6 18:42:21 raspi2 PiGatewaySerial: Starting PiGatewaySerial... Sep 6 18:42:21 raspi2 PiGatewaySerial: Protocol version - 1.4 Sep 6 18:42:21 raspi2 PiGatewaySerial: Created PTY '/dev/pts/2' Sep 6 18:42:21 raspi2 PiGatewaySerial: Gateway tty: /dev/ttyMySensorsGatewayls -la /dev/ttyMySensorsGateway
lrwxrwxrwx 1 root root 10 Sep 6 18:17 /dev/ttyMySensorsGateway -> /dev/pts/2root@raspi2:~# ls -al /dev/pts* total 0 drwxr-xr-x 2 root root 0 Jan 1 1970 . drwxr-xr-x 12 root root 3240 Sep 6 18:41 .. crw--w---- 1 pi tty 136, 0 Sep 6 18:18 0 crw------- 1 pi tty 136, 1 Sep 6 2015 1 c--------- 1 root root 5, 2 Jan 1 1970 ptmxDoes anyone have any ideas on what could be wrong or how I could troubleshoot this?
-
Solved the problem. I installed http://tmrh20.github.io/RF24Installer/RPi/install.sh instead of the librf24-bcm library included in Raspberry. Re-compiled the serial gateway and installed it and it works perfectly now.
-
There is an issue on this.
mysensors/Raspberry#16
Maybe someone could create a PR with a working radio driver.
-
I had to switch back to librf24-bcm, see this thread. Not sure why, but I got no errors when compiling.