Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with RPI2 ? #23

Closed
minscof opened this issue Nov 28, 2015 · 2 comments
Closed

Compatibility with RPI2 ? #23

minscof opened this issue Nov 28, 2015 · 2 comments

Comments

@minscof
Copy link

minscof commented Nov 28, 2015

I try to use this gateway with a rpi2
cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 57.60
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 : BCM2709
Revision : a01041
Serial : 000000002eec91d0

But I think the Makefile does not detect it is a RPI2 but a RPI B+, so

make
g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -mtune=arm1176jzf-s -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv7-a -D__PI_BPLUS -I. -Ilibrf24-bcm/
g++ -o PiGatewaySerial MyGateway.o MySensor.o MyMessage.o PiEEPROM.o PiGatewaySerial.o -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -mtune=arm1176jzf-s -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv7-a -D__PI_BPLUS -I. -Ilibrf24-bcm/ -lrf24-bcm -lutil

So in the PiGatewaySerial.cpp the flag __PI_BPLUS is set and the wrong parameter are taken.

I modify the code like in this post http://forum.mysensors.org/topic/1974/domoticz-as-controller-and-a-gateway-for-mysensor-nodes-running-on-a-raspberry-pi-2/19, but I still have problem with this gateway on a rpi 2.

Can someone help me ?

@minscof
Copy link
Author

minscof commented Nov 28, 2015

I find the solution with this post http://forum.mysensors.org/topic/1151/tutorial-raspberry-pi-nrf24l01-direct-connection/44

I modified the Makefile in librf24-bcm to replace in line 37
CCFLAGS += -D BCM2835_PERI_BASE=0x${IOBASE}
by
CCFLAGS += -D BCM2835_PERI_BASE=0x3F000000

then make; make install
and now everything is working for me on a rpi2

@jonathan-daniel
Copy link

Why isnt this patched by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants