Is ARM the future of MySensors?



  • I've been testing the wonderful MY_SIGNING_SIMPLE_PASSWD feature on the 2.2 branch.

    So far most of my nodes that currently use an Arduino nano will not have enough memory to run things.

    So..

    Does this secretly imply that if you want to fully embrace MySensors 2.2 you'll need too switch to more powerful hardware, like STM32? or ESP8266? Or one of the other new IoT chips?

    What is the platform that most people are switching to?

    "just good enough" as a strategy
    I actually really like Arduino as a platform because it offers something the more powerful platforms don't: they are very hard to hack or take over. There simply isn't enough space left for malicious actors' code.

    For example, after reading about harddrives having persistent malware through ARM-based controller chips, I've become quite aware of this attack vector.If you follow Slashdot a bit you'll know that anything with a chip is a target nowadays.

    So, personally, whatever becomes the new "recommended platform", I hope it will stay 'cloudless' by default.

    Other discussions:
    https://forum.mysensors.org/topic/8852/best-hardware-for-gateway-with-encryption-and-signing/4


  • Mod

    @alowhum to me, SAMD and nrf5 are most interesting for the future.

    The processing power is very seldom a bottleneck for home automation, but flash space and ram is a problem (as you've noticed). With nrf5 and samd we take a big step up: 16x ram and 8x flash compared to atmega328 (for SAMD21 and most nrf51 and even more for the larger versions).

    Nrf5 has a big benefit compared with samd: integrated radio. No risk for wiring mistakes, no need to order separate radio modules.

    But atmega328 will probably be around for a long time. They are very popular and easy to buy.


  • Mod

    @alowhum every news about malware needs to be put in the right context: malware programs can infect a target a low level system if they are made specifically for the purpose and in addition there must be a way to actually program the target, so if you have an arduino board that can be only programmed through serial port, I seriously doubt you will be a possible target for malware infection, otherwise if it was that easy we wouldn't struggle that much to have FOTA updates working.


  • Hero Member

    @alowhum said in Is ARM the future of MySensors?:

    What is the platform that most people are switching to?

    I think an integrated MCU+radio, such as the nRF5, will be the inevitable winner for reasons of cost, size, capability, and efficiency. There may be cases, though, where you want to use a LoRa or other radio for superior range. It's not completely clear yet how well the nRF52840 will stack up in that department (since final silicon isn't yet available, and we can only speculate as to its pricing), but I'm guessing it will be capable enough for most home automation.

    That said, the atmega328p is just plain hard to beat as far as ultra low (~100na) sleep current goes, and it has the virtue of relative simplicity, so I think it will be around for quite a while yet.



  • I think the NRF5 with integrated radio will be the best solution for most home automation tasks as long as it has enough range to do a typical house without repeaters. But, I am fascinated by the "blue pill" stm32 boards -- very much like an Arduino Nano, but with modern ARM. It's a larger board, I don't know about battery operation yet, but for a powered sensor, it is easy to use, powerful, and cheap.
    Thanks to @NeverDie I also have a RA-01 LoRa module on a ESP8266 running as a gateway. So many amazing technologies . . ..

    It's hard to fault a ProMini with an NRF2 or RMF69. Those networks will probably always be reporting temperature and motion in my house. But I am always excited to think about the capabilities of these new technologies, particularly more memory. For me, it is a hobby and I can afford to try things just for fun and to learn about them, but even I must settle on a technology so I can get back to making interesting sensors and actuators.

    I keep looking for HopeRF to come out with an ARM-RFM combo to compete with NRF5, but they do not seem to be going that direction. Right now, I would bet on NRF5 as the best technology going forward.



  • I certainly can see the appeal for the NRF5 series, which wil work perfect in areas with detached and terraced houses. But in Urban areas with lots of high rises the 2.4GHz band is a bit congested. So there another band will work much better.
    In that regard I fully agree with @nagelc to pray to your deity of choice for HopeRF to start integrating an MCU with the RFM, or Nordic to start exploring a different part of the ether.
    I have not set foot in the 'large' part of the MCU spectrum, but I have a Feather M0 in the house which will be the center of my new experiments.


  • Hero Member

    @davidzh said in Is ARM the future of MySensors?:

    to pray to your deity of choice for HopeRF to start integrating an MCU with the RFM

    Even doing that doesn't give you all the benefits that tighter integration onto one chip gives you. For instance, on the nRF5:

    1. You don't communicate over SPI. Instead, the radio can share pointers directly to memory using easyDMA. Much faster, which translates also to lower power consumption.
    2. You can manage the radio and do other tasks (albeit in a limited way) while the MCU sleeps using the Programmable peripheral interconnect (PPI). This is maybe something that's hard to appreciate until you've tried it, but I'm sold on it and would sorely miss it if forced to return to a non-integrated MCU and radio, even if they were co-located together on the same module.

  • Hardware Contributor

    @davidzh said in Is ARM the future of MySensors?:

    But in Urban areas with lots of high rises the 2.4GHz band is a bit congested.

    That's my case , there are 350 appartments in my building alone and my nrf24 network runs well, while my old 433MHz system regularly miss messages, that's why it will soon be replaced.


  • Hero Member

    @nca78 said in Is ARM the future of MySensors?:

    @davidzh said in Is ARM the future of MySensors?:

    But in Urban areas with lots of high rises the 2.4GHz band is a bit congested.

    That's my case , there are 350 appartments in my building alone and my nrf24 network runs well, while my old 433MHz system regularly miss messages, that's why it will soon be replaced.

    LoRa isn't as much affected by interference since it's spread spectrum.



  • So is anyone thinking they will use the encryption features on a normal Arduino? Or is it, as I was thinking, that if you want to use encryption you'll have to upgrade?


  • Mod

    Simple encryption runs fine since it is mainly done by the radio chip


  • Contest Winner

    @alowhum if you only enable encryption (not signing) you can fit more into an atmga328p. Also, if you use a rfm69 radio, encryption is hw backed, so it require less flash space (thus potentially allow you to also fit signing).
    Furthermore, using a atsha204a means signing also take less of flash since some of the algorithms are hw backed.


  • Hero Member

    Well, regarding the OP, I think I read somewhere that development would largely move to ARM, and that at some point it would stop on the atmega. Not sure that I'm recalling it correctly though. Is it true?



  • @anticimex: interesting.

    This is my use case: all I want is that I put a password at the top of all my arduino files, and then my neighbours won't be able to receive my data because they don't have the password. That's encryption, right? At the moment anyone can pick up the values that my sensors are sending out into the city. And that's kinda creepy.


  • Mod

    @alowhum I bet there are hundreds of people interested in your house temperature 😅
    Btw, yes that is encryption


  • Contest Winner

    @alowhum the simple password option is the simplest way of enabling security. At the same time it is the most expensive as it does not require personalization and therefore is pure software based (except for rfm69 encryption). So you need to trade simplicity for code size.
    That said, once you have figured out personalization (and there is plenty documentation on the matter) it can easily be repeated, as long as you keep the sketch used to program the personalization data.


  • Contest Winner

    @alowhum also, the simple password option enable both signing and encryption so it takes up a lot of memory. If encryption is the only thing you want, just personalize the devices with an AES key and enable encryption only. It is not that good (fixed iv) and easily crackable by someone who has an idea about AES but it at least obfuscate your messages fairly well. Combined with signing it is better, but, again, that costs memory.



  • @anticimex Hmm, I didn't realise that. Could it be an idea to create a MY_ENCRYPTION_SIMPLE_PASSWD feature as well, without the signing? Would that fit the "opportunistic curious neighbour" scenario?


  • Contest Winner

    @alowhum give personalization a shot. Since you use the simple flag, you are already on the development branch, so you have a simplified personalization flow. It is documented in doxygen (see the pinned signing post for a link)



  • @gohan said in Is ARM the future of MySensors?:

    @alowhum I bet there are hundreds of people interested in your house temperature 😅
    Btw, yes that is encryption

    Actually, just my temperature would already indicate

    • Whether I am home or not. "He'll never know we took the jewelry".
    • if I go on holidays a lot. "How is he paying for all that".
    • Whether I am feeling ill (set it a bit higher). "Got a fever last week? Or did your grandma visit"?
    • If I am environmentally conscious. Something I don't want to talk about at the neighbourhood BBQ..
    • Etc.

    Now add to that my other sensors.
    Now add to that all the actuators (yikes!).


  • Hero Member

    Don't your neighbors have better things to do?


  • Mod

    @neverdie I was about to say the same... it must be a very boring town 😄



  • Well, last week I couldn't realize how my garage temp was so high.... I noticed my neighboor started autoproducing some sensors too... 😄 So it's time for signing/encryption.



  • @nca78 said in Is ARM the future of MySensors?:

    there are 350 appartments in my building alone and my nrf24 network runs well

    If nrf24 working on same/similar frequency as wifi, is it not being disturbed by other wifi networks? (I guess that in 350 apartments there are a minimum of 350 wifi networks).
    I never quite understood how exactly nrf24 and wifi go along.


  • Hardware Contributor

    @dakipro said in Is ARM the future of MySensors?:

    If nrf24 working on same/similar frequency as wifi, is it not being disturbed by other wifi networks? (I guess that in 350 apartments there are a minimum of 350 wifi networks).
    I never quite understood how exactly nrf24 and wifi go along.

    It depends on the channels used by NRF24 and wifi networks, so far I've been lucky it seems 🙂
    Also, high rise is in fact probably helping by having thick concrete walls with lots of rebars inside, attenuating radio signals. I see many networks but most of them have week signal.


  • Mod

    @dakipro wifi only overlaps the nrf24 range for a number of channels, so usually if you choose channels at the margins of the spectrum you should be good


  • Mod

    @dakipro said in Is ARM the future of MySensors?:

    If nrf24 working on same/similar frequency as wifi

    The frequency band of nrf24 is wider than used by wifi. If you select a frequency just outside the wifi band it should help in reducing interference.



  • The current NRF24 set up is more secure than bluetooth or wifi from attack.

    I say this based on the fact that anyone with a laptop, mobile etc can have software to crack/hack/spoof/inject into bluetooth or wifi. It is not that difficult for kids to do.

    The NRF is another matter as to achieve this on that radio module would require acquiring a module, setting it up with a pc/phone and then getting software to attack it.

    People often go the easiest route and I am less worried about nrf24 than I would be if the system used bluetooth/wifi or cloud.

    Just my thoughts on a dark and wet Monday morning.....



  • @yveaux said in Is ARM the future of MySensors?:

    @dakipro said in Is ARM the future of MySensors?:

    If nrf24 working on same/similar frequency as wifi

    The frequency band of nrf24 is wider than used by wifi. If you select a frequency just outside the wifi band it should help in reducing interference.

    Thanks, that is what I thought. Btw, I am using default channel for mysensors (79 or whatnot), is that "just outside" enough?
    I never had (connection) problems with mysensors, so I never researched fine-tuning options.

    Can some android wifi analyzer help with the showing what is best to use, is there some guide available regarding nrf24? (should we write a guide? 🙂 )


  • Hero Member

    @dakipro said in Is ARM the future of MySensors?:

    I am using default channel for mysensors (79 or whatnot), is that "just outside" enough?

    I don't believe so. Channel 123 is though. Easy to remember.


  • Mod

    @dakipro see here for a mapping of wifi and nrf24 channels: https://forum.mysensors.org/topic/4721/nrf-frequency-and-channels/5

    NRF24 Channels 2..96 overlap with wifi. I personally would stay away from the high nrf24 channels (110+) as I've seen troublesome performance with clones.
    Channel 100 performs well at my place.


 

293
Online

7.6k
Users

8.5k
Topics

91.2k
Posts