💬 Building a Raspberry Pi Gateway
-
@jirm Thanks for the suggestion. I've downloaded the raspian image. To duplicate the path I used with armbian, I downloaded TMRh20's RF24 code so I can test the radio with code I've already had up and running on the hardware.. However, this version of raspbian is really bad. So far nothing compiles. Regular raspbian, and armbian on the orange pi one do not have this kind of problem out of the box; they compile a wide range of packages. I'll spend some more time on it to be diligent, but this distro looks like it needs to be put on the abandon pile.
I tried compiling mysensors gateway too but no luck with that yet either. This is what I get:
./configure
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[OK] init system detected: sysvinit
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.make
gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
.c -o build/drivers/Linux/log.o
cc1: error: bad value (armv8-a) for -march switch
cc1: error: bad value (cortex-a53) for -mtune switch
Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
make: *** [build/drivers/Linux/log.o] Error 1Ok. Arrrggg ! .
So sad ear that OPI Raspbian fork is too not working out the box and but its not surprise because the poor software support form manufacturer. Maybe this is another no way road.
So seems only keep fighting with both OS (arm and rasp) to make it working.
Some sugestions ...
Will be fine if can post this issue but in software section here on mysensors forums. Maybe some mysensors gateway developers or any linux hack can help to trace the error you have on armbian or raspbian.
Maybe can find another "no official" OPI Raspbian fork that compile better to mygateway. Maybe post this issue in OPI forums will be good and someone there can help or provide other better Raspbian fork.Sadly in this days I dont have time to try install on my OPI´s to help more. :-1:
Regards
-
@jirm Thanks for the suggestion. I've downloaded the raspian image. To duplicate the path I used with armbian, I downloaded TMRh20's RF24 code so I can test the radio with code I've already had up and running on the hardware.. However, this version of raspbian is really bad. So far nothing compiles. Regular raspbian, and armbian on the orange pi one do not have this kind of problem out of the box; they compile a wide range of packages. I'll spend some more time on it to be diligent, but this distro looks like it needs to be put on the abandon pile.
I tried compiling mysensors gateway too but no luck with that yet either. This is what I get:
./configure
[SECTION] Detecting target machine.
[OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
[OK] init system detected: sysvinit
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.make
gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
.c -o build/drivers/Linux/log.o
cc1: error: bad value (armv8-a) for -march switch
cc1: error: bad value (cortex-a53) for -mtune switch
Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
make: *** [build/drivers/Linux/log.o] Error 1The las error you posted...is not on Raspbian but in Armbian ????
"gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
.c -o build/drivers/Linux/log.o
cc1: error: bad value (armv8-a) for -march switch
cc1: error: bad value (cortex-a53) for -mtune switch"In any case seems this is a gcc compiler error maybe because "wrong" version for that processor...so maybe trying to update gcc compiler can help to avoid that error?
-
@jirm The compiler error was from the raspbian image running on the orange pi one hardware. I installed the image, ran apt-get update and apt-get upgrade, then tried the mysensors installation. The error was unusual enough to stop me in my tracks ... it didn't look like a simple dependency error.
armbian is not as well known as raspbian, but it is a very good distribution with an active and friendly development team. I like raspbian because it is a mature distro, and that's why I wanted to give it a try when you pointed out it's availability, but armbian is a very good alternative. I like armbian a lot and I hope we can get mysensors to work on it. Armbian also supports some of the newest and exciting hardware like the Nano Pi Neo and the Orange Pi Zero, each with a lot of IoT possibilities (they are very small form factors and low cost).
As you can tell, I think it's a big win if we can get it working on armbian. I will look for the place you mentioned on the forum that might be a good place to post this issue -- please let me know if you have a suggestion on where it's best to post. And I'd like to thank you for your consideration of this problem.
-
I´m in the same boat as you, because for the moment I choose OPI hardware for my HA (Home Automation) system.
Agree with you that Armbian is much better OS than Raspbian in general terms and preferably the path to walk through for OPI, but in that case always we walk on a parallel side because Raspbian is today the most prefered OS for IoT on developments because Raspberry is the predominant hardware. So that means in future we need fight each installation.In that case, Armbian forums sure is necesary place that can help to solve that problem too, but I think first better post here on mysensors software forums to try to get some more light about that specific error about mysensors gateway install process, and then at least have more info to report to someone that can help in Armbian.
I'm trying to find some help more about the issues you raise and if you maintain posting updates here will be so good for me and sure for others that can use OPI too now or on future.
OPI´s I´m sure is in near future a very good hardware (because they're so good relation cost-performance and quality) that mucho more people would choose for next coming IoT projects.
Regards
-
I´m in the same boat as you, because for the moment I choose OPI hardware for my HA (Home Automation) system.
Agree with you that Armbian is much better OS than Raspbian in general terms and preferably the path to walk through for OPI, but in that case always we walk on a parallel side because Raspbian is today the most prefered OS for IoT on developments because Raspberry is the predominant hardware. So that means in future we need fight each installation.In that case, Armbian forums sure is necesary place that can help to solve that problem too, but I think first better post here on mysensors software forums to try to get some more light about that specific error about mysensors gateway install process, and then at least have more info to report to someone that can help in Armbian.
I'm trying to find some help more about the issues you raise and if you maintain posting updates here will be so good for me and sure for others that can use OPI too now or on future.
OPI´s I´m sure is in near future a very good hardware (because they're so good relation cost-performance and quality) that mucho more people would choose for next coming IoT projects.
Regards
The error you post seems because gcc compiler is not well supporting the processor, so maybe need substitute all gcc compiler version in the OS to solve the issue (that's I wanted say before with update).
apt-get update/upgrade cannot substituting "any" software to other because doing this only can push to last version the existing installed branch on the yet installed software on the OS.
So It's not any dependence error it's a gcc compiler error raised for some weird version incompatibility with the hardware installed. Strange error but this is seems means message error you posted. So seems needed reinstall all gcc compiler to avoid that.
Hope I explain enough...sorry about my bad english ;-)
See you...
-
Hello everyone,
I've been working gateway on RPi, but I don't know how to configure MY_SIGNING_SOFT .
File mysgw.cpp contains MY_SIGNING_SOFT definition and I can uncomment it, but I don't know where and how I should define: SOFT_HMAC_KEY, SOFT_SERIAL and AES_KEY ?
Could you give more details how to configure soft signing on RPi?
thanks
//Robert$ sudo mysgw -h Usage: mysgw [options] Options: -h, --help Display a short summary of all program options. -d, --debug Enable debug. -b, --background Run as a background process. --gen-soft-hmac-key Generate and print a soft hmac key. --gen-soft-serial-key Generate and print a soft serial key. --gen-aes-key Generate and print an aes encryption key. --print-soft-hmac-key Print the soft hmac key from the config file. --print-soft-serial-key Print the soft serial key from the config file. --print-aes-key Print the aes encryption key from the config file. --set-soft-hmac-key Write a soft hmac key to the config file. --set-soft-serial-key Write a soft serial key to the config file. --set-aes-key Write an aes encryption key to the config file.To generate a soft hmac key, run:
sudo mysgw --gen-soft-hmac-keyand set it using:
sudo mysgw --set-soft-hmac-key=KEYFor example:
$ sudo mysgw --gen-soft-hmac-key SOFT_HMAC_KEY | 7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126 The next line is intended to be used in SecurityPersonalizer.ino: #define MY_SOFT_HMAC_KEY 0X7F,0X3F,0X1A,0X1C,0X1E,0XA3,0X2B,0X72,0XBF,0X4B,0XED,0XE2,0XD1,0X65,0X43,0X97,0X1C,0X26,0X44,0X2F,0X69,0X57,0X21,0X77,0XD9,0XCC,0XDE,0X39,0X3B,0XFB,0X81,0X26 To use this key, run mysgw with: --set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126$ sudo mysgw --set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126The same process applies to generate/set the other key types.
-
-
You mean the error posted @aand is because that?
You mean mysgw use own NRF24 drivers that is not supported on OPI although he have running Raspbian version?.
In any case, if so will be really fine if mysgw software allowed (or provide information about how to do it) to use any NRF24 driver (ex. TMRh20 fork that is working fine on OPI) and maybe too Hope RFMXX (I´m most interested in this last transceivers) because I think that generally speaking make a rigidly link with a type of hardware is not the best thing that can be done to really give the best functionality to any application.
Still keep waiting for anyone here than can help to install mysgw softw on OPI.
Thanks for your information
Best regards
-
@marceloaqno, Thanks a lot
-
@marceloaqno, Thanks a lot
Ditto, @Robinek70 !
Thank you, Marcelo Aquino, for your fantastic work .
I have Domoticz, Cacti, Heyu and MySensors Gateway running in a 30 dollars RASPBERRY PI 2, all without a glitch, all talking to each other and hopefully soon will also have Alexa for RASPBERRY PI running there also.
If in doubt, by a RASPBERRY PI and thank people who develop and support it for free instead of complaining all the time.
'nuff said.
Luiz Roberto
-
You mean the error posted @aand is because that?
You mean mysgw use own NRF24 drivers that is not supported on OPI although he have running Raspbian version?.
In any case, if so will be really fine if mysgw software allowed (or provide information about how to do it) to use any NRF24 driver (ex. TMRh20 fork that is working fine on OPI) and maybe too Hope RFMXX (I´m most interested in this last transceivers) because I think that generally speaking make a rigidly link with a type of hardware is not the best thing that can be done to really give the best functionality to any application.
Still keep waiting for anyone here than can help to install mysgw softw on OPI.
Thanks for your information
Best regards
@jirm If you try to use the nrf24h radio you will get the same error as the @Tag post:
In file included from examples_linux/mysgw.cpp:74:0: ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform #error No support for nRF24 radio on this platformFor @aand error, it's what you mention in your early post, a gcc compiler issue.
MySensors nrf24 drivers uses the SPI interface to drive the module, it's the same driver for all supported platforms (RPi, esp8266, atmega328p, ...), this way it is easier to maintain.
I understand that it must have been frustrating to find out that it does not work for the OPi but there isn't much I can do to help you. I bought one too, still waiting to arrive.
-
@musthafa I'll give it a try. What version of openhab are you using?
-
@musthafa I'll give it a try. What version of openhab are you using?
Thank you for your help here!! would be great to have mysgw on the OPI!
I am using armbian on a OPI zero, so let me know if you need any further info.(Also using an RPI, which runs mysgw with direct connected radio like a charm!)
Kind regards,Tag
-
@marceloaqno said "MySensors uses its own nrf24 drivers, and OrangePi is not currently supported. It will be in the future."
I wish it worked now, but I don't mind waiting. Just to clarify where I'm coming from -- Orange Pi One hardware running Armbian. Thanks!
I'll be keeping watching the updates!
-
@musthafa I'll give it a try. What version of openhab are you using?
OpenHab 2
-
@jirm If you try to use the nrf24h radio you will get the same error as the @Tag post:
In file included from examples_linux/mysgw.cpp:74:0: ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform #error No support for nRF24 radio on this platformFor @aand error, it's what you mention in your early post, a gcc compiler issue.
MySensors nrf24 drivers uses the SPI interface to drive the module, it's the same driver for all supported platforms (RPi, esp8266, atmega328p, ...), this way it is easier to maintain.
I understand that it must have been frustrating to find out that it does not work for the OPi but there isn't much I can do to help you. I bought one too, still waiting to arrive.
Really thanks a lot for your work and very much appreciate you try to help us on our "fight" with the OPI board.
Sadly in this moment I cannot work because I'm out of time to try install all softw stuff on my OPI and try help much more to push it working with mysgw and so on.
I don't understand so much why is not working out of the box and the driver issue found and/what hardware communication issue are only on OPI with that similar derived Raspbian OS like Raspberry, and too not understand why cannot work on OPI because that SPI bus issue you say.
@aand reported nrf24 module work very well with TMRh20 driver, so seems hardware are OK on OPI for the module and I suppose still only discover and hopefully make it work avoiding the driver issue you say to compile properly mysgw softw.
Anyway, I only hope that anyone can help mainly here to make work mysgw on OPI too, and adapt it to work on Armbian, because OPI is a really good choice for HA controller board and sure in near future much people use it.Is there any chance to substitute own nfr24 driver mysgw with the TMR20h, at least for testing purposes on OPI?
If any mysgw "code" people are reading this maybe can try to help us with some idea to try workaround the compilation issue on OPI.
Best regards and again many thanks!
PD: Only for test SPI purposses on armbian this can help (post 248) :
https://forum.armbian.com/index.php/topic/617-wip-orange-pi-one-support-for-the-upcoming-orange-pi-one/page-9#entry5747Only for info, other interesting post about how to make work nrf24l01 module on OPI and armbian:
https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/Another one interesting post OPI One with armbian using NRF24 module:
https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/ -
OpenHab 2
@musthafa Openhab2 works using mysgw configured as an ethernet gateway. This is the guide I used: https://github.com/tobof/openhab2-addons/wiki
-
Hello.
I'm also using a orangepi one and wanted to build the gateway on it. But i didn't want to use the nrf24 but a usb to rs485 converter. But if i want to compile it, i get also the same error with the nrf24 and that it is not supporting platform. Why?
Also if i want to build a serial gateway with a connected arduino on usb port, i got the same error with the nrf24
-
@musthafa Openhab2 works using mysgw configured as an ethernet gateway. This is the guide I used: https://github.com/tobof/openhab2-addons/wiki
@marceloaqno thank you.
I have already installed OpenHAB 2 on my RPi. Can I install mysgw on to the same RPi ?