💬 Building a Raspberry Pi Gateway
-
Issue solved, manual update of compiler from 4.6,3 -> 4.7.2 enables the make process. Similar problem also reported in post.
Using
- sudo apt-get update
- sudo apt-get upgrade
does not upgrade compiler. I used instruction according to How to upgrade GCC to 4.7+.
-
Have been running MySensors for some time now with a EthernetGW running on Arduino. To clean-up the installation, I'm trying to get the Gateway running on my Raspberry instead but something stops the make process.
pi@raspberrypi ~/MySensors $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24 [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l, REV=a01041. [OK] init system detected: sysvinit [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. pi@raspberrypi ~/MySensors $ make gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_ARCH_RASPBERRYPI -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/RPi -c drivers/Linux/log.c -o build/drivers/Linux/log.o cc1: error: bad value (cortex-a7) for -mtune switch Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed make: *** [build/drivers/Linux/log.o] Error 1Any hints what I have done wrong ?
-
I created a virtual serial port using this ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway. I can see the port in the dev folder, but when I run dmesg I do not see it listed and therefore my openhab can not find it. How can I fix this?
-
@hausinger said:
@marceloaqno said:
@hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
It should be:./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600Hi @marceloaqno
Thank you for your answers. Yes, i saw this, but I did the "--", i forgot it in the last post, because I can't use copy & paste on my raspberry (remote Desktop).Did this configuration work on your System?
Are you sure, that my configuration is ok? (with the "--")
Whats the normal behavior when i start the mysGateway with debug (mysGateway -d)? If i type the starting command in the terminal, the Gateway gives me the Messages (from my last post) and thats it (not more). I can now type a new commandI'm now not at home (Business trip), if I get home, i will try your "Screen" command
So I'm at home today and make some Test.
The screen comand gives me some strange characters, thats ok I think.But if i start the Gateway, I only get the same messages as shown in my other post.
Here are 2 Pics that show you, how it look like.
I also tried to make the gw with a baudrate of 9600, but still the same issues.!

@hausinger After the command:
sudo ./bin/mysgw -dIt wasn't supposed to go back to bash, the gateway would wait for new messages.
I'm not sure what's going on with your setup because I tested your configuration options here and it worked. -
I created a virtual serial port using this ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway. I can see the port in the dev folder, but when I run dmesg I do not see it listed and therefore my openhab can not find it. How can I fix this?
@jmmorgan83 You may need another name for the port, such as
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 -
@jmmorgan83 You may need another name for the port, such as
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020@marceloaqno
Unfortunately, no luck:(. -
@hausinger After the command:
sudo ./bin/mysgw -dIt wasn't supposed to go back to bash, the gateway would wait for new messages.
I'm not sure what's going on with your setup because I tested your configuration options here and it worked.@marceloaqno said:
@hausinger After the command:
sudo ./bin/mysgw -dIt wasn't supposed to go back to bash, the gateway would wait for new messages.
I'm not sure what's going on with your setup because I tested your configuration options here and it worked.Thank you for your answer. What can I do now? Can I check, that this port is unused? And how can I check this?
Or is there another problem? -
FYI: I do not think the Rpi gateway works with Openhab on the same unit. I have tried both the virtual serial port and mqtt, and neither will work with Openhab 1.83.
-
Hi all,
So I built this and all seems to be well. But.....how do I test it properly?
I also installed pidome and have that able to 'see' the MSYGW, but it advises to only add it if it is working.
So how to know if mysgw is working OK? Is there somewhere a step-by-step way to do this?
-
sudo ./bin/mysgw -d and sudo ./bin/mysgw -h now both give 'command not found' - which is odd as they were both working eariler ???
A reboot makes no difference. Although after reboot I see mysgw running in 'top' but even stopping that service and trying sudo mysgw -d again doesn't seem to work.Any idea whats wrong? Any suggestions to get this going?
-
That doesn't appear anywhere on this tutorial, so maybe it needs adding for completion?
Anyway the output is now......
pi@PiDomePi:~ $ sudo /usr/local/bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.0.1-beta
mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY
mysgw: MCO:REG:NOT NEEDED
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1When i did build install I missed out bit for the leds, can I just re-run the ./config and 'make' then 'make install' again? Or will that cause problems??
I just think that the lights will be useful in the early stages of getting this running...Thanks for the help, no way would I have got that without you! :)
-
That doesn't appear anywhere on this tutorial, so maybe it needs adding for completion?
Anyway the output is now......
pi@PiDomePi:~ $ sudo /usr/local/bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.0.1-beta
mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY
mysgw: MCO:REG:NOT NEEDED
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1When i did build install I missed out bit for the leds, can I just re-run the ./config and 'make' then 'make install' again? Or will that cause problems??
I just think that the lights will be useful in the early stages of getting this running...Thanks for the help, no way would I have got that without you! :)
-
Can I just check that this is OK? .....
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-transport=nrf24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
Can you see any problems here, it seemed to work but I hope to test fully this week, maybe tomorrow.....
-
Can I just check that this is OK? .....
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-transport=nrf24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
Can you see any problems here, it seemed to work but I hope to test fully this week, maybe tomorrow.....