× General topics about hardware.

Support for other boards

7 years 7 months ago #3480 by mihai.aldea
I recently started to play with a few interesting boards:
- Orange Pi Lite - $12 + shipping
- Orange Pi PC - $15 + shipping
- NanoPi NEO - $10 (512MB RAM version) + shipping
- NanoPi M3 - $35 + shipping
So if not taking the always out-of-stock Pi Zero $5 board into consideration, there are many other boards capable of running EasyIoT.
However the tricky thing is the NRF24L01+ radios support. All of them have SPI interfaces, all of them confirmed to work with various devices such as SPI displays but limited to no success with NRF24L01+ and when successfull, only when using customized RF24 library config files and with a lot of trial and error I bet.
The problem seems to be the CE pin which I can't seem to match with the GPIO 25 pin on the Raspberry.
My guess is that the MySensors support is embedded in the MySensorsDriver.dll with no way of tweaking the pins like one can do in the MyConfig.h file from the MySensors Arduino library.
Is there any chance of adding support for other boards than Raspberry, or at move some of the MySensors config data out of the DLL file to somewhere where it can be modified to make EasyIoT work with other boards?

Please Log in or Create an account to join the conversation.

7 years 7 months ago #3493 by mihai.aldea
I was able to test the RF24 communication between a Raspbery Pi and a NanoPi NEO using the tmrh20 library's "gettingstarted" app, however it requires the CE pin's addressing using sysfs, eg. PG9 pin must be declared as pin 201.
However I found no way of changing RF24 pin settings in EasyIoT, I assume they're hardcoded. Can this setting be exposed somehow so other boards can be used?

Please Log in or Create an account to join the conversation.

7 years 6 months ago #3497 by EasyIoT
Replied by EasyIoT on topic Support for other boards

mihai.aldea wrote: I was able to test the RF24 communication between a Raspbery Pi and a NanoPi NEO using the tmrh20 library's "gettingstarted" app, however it requires the CE pin's addressing using sysfs, eg. PG9 pin must be declared as pin 201.
However I found no way of changing RF24 pin settings in EasyIoT, I assume they're hardcoded. Can this setting be exposed somehow so other boards can be used?


NRF24 pins on RPI are hardcoded.

Please Log in or Create an account to join the conversation.

7 years 6 months ago #3499 by mihai.aldea
I already found out. And imagine my frustration when I found out that I can change it by using a hex editor, however at least under linux I found one that can modify the port but can't insert new bytes and other that can insert bytes but creates an EXE version that doesn't run.
That's because at least for NanoPi NEO I must use "201" instead of "25" for the CE pin. Sunxi has a strange way of GPIO addressing:
To obtain the correct number you have to calculate it from the pin name (like PH18)[1]:
(position of letter in alphabet - 1) * 32 + pin number
E.g for PH18 this would be ( 8 - 1) * 32 + 18 = 224 + 18 = 242 (since 'h' is the 8th letter).

I tried the hex editor tweak on a NanoPi M3 but it seems that the GPIO addressing is different and I still haven't find the right formula, nor a mapping list.
I still have to try with an OrangePi which exposes other pins that allows me to fit exactly in the two digits sized value of the CE pin.
Once I test that, I will report my findings.

But instead of hijacking the compiled file, don't you think that it would be more elegant to move the hardcoded pins from the exe file to configi/MysensorsConfig.xml?

Please Log in or Create an account to join the conversation.

Time to create page: 0.243 seconds

Forum latest

  • No posts to display.