[Solved] Arduino Nanos don't work as nodes
-
Could you try version 2.2 of mysensors? I remember summer changes in 2.4 regarding nrf modules
Could you try version 2.2 of mysensors? I remember summer changes in 2.4 regarding nrf modules
I went to the oldest available version and it doesn't work.
I don't really get it, if I swap the radios between the Mega node and the Nano node, it stops working, swapping CE/CSN also makes it stop working - any alterations make it fail loud and clear.
It does initialize the radio and claim everything is okay. I can be quite certain it's not the radios, it's not the boards themselves, it's not the wiring.
There's something very specific to the Nanos themselves that 2.x.x is unable to use the nRF24L01+.
I will assemble an Arduino Uno board and see if the issue is specific to the AtMega328P.
-
Just in case I also took clean
RepeaterNodeexample and just defined the CE/CSN pins and channel, it's still unable to work.I also tried the same example without any repeater functionality enabled, it's still unable to register. It's basically a blank sketch.
Changing Node ID didn't also work.
-
In your first sketch the baud rate was 2mbps. How is your existing network configured?
If you take an example sketch and an example gateway sketch, does it work then. So don't change channels and so onIn your first sketch the baud rate was 2mbps. How is your existing network configured?
That's exactly the same across all my sketches.
If you take an example sketch and an example gateway sketch, does it work then. So don't change channels and so on
Yeah, I did that and wrote about it above, took
RepeaterNodeand just defined CE/CSN on GW and the node. -
I've determined that it doesn't matter which:
- Radio
- Radio's power supply/source
- Nano
- Bootloader
- Arduino IDE (tried 1.8.2 and latest nightly)
- 2.x.x MySensors
- Example, or custom sketch
- Channel, data rate, power level or node ID
- Repeater or not
- WAIT_READY_MS or not
- Predefined master or not
- SPI bus speed, 0.5*default SPI speed didn't help
I just can't make a Nano act as a regular node.
Maybe a MySensors dev has an idea what I could try.
-
I just discovered that on the Arduino Uno
RF24_250KBPSworks, butRF24_2MBPSdoesn't. On the Nanos, neither work.I used RF24 and tested the boards for a while, I've determined that 2MBPS on that specific channel works great, I've sent at least 100 000 packets and lost only two. Auto-ack and dynamic payloads also work.
I am 99.99% certain this is a bug in MySensors. @mfalkvidd maybe you have some ideas where to look next?
-
I just discovered that on the Arduino Uno
RF24_250KBPSworks, butRF24_2MBPSdoesn't. On the Nanos, neither work.I used RF24 and tested the boards for a while, I've determined that 2MBPS on that specific channel works great, I've sent at least 100 000 packets and lost only two. Auto-ack and dynamic payloads also work.
I am 99.99% certain this is a bug in MySensors. @mfalkvidd maybe you have some ideas where to look next?
@Avamander nano's are basically just regular atmega328 boards, running off 5v at 16MHz. The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.
What nano boards do you use? Could you try a different atmega328 based arduino? -
@Avamander nano's are basically just regular atmega328 boards, running off 5v at 16MHz. The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.
What nano boards do you use? Could you try a different atmega328 based arduino?@Yveaux said in Arduino Nanos don't work as nodes:
The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.Because I'm really rather certain it isn't the hardware. You can read what I've replaced, swapped and tried. The radios have been decoupled, the power has been decoupled. The setup works in all possible ways when using RF24.
What nano boards do you use? Could you try a different atmega328 based arduino?
Yeah, I said I tried an Uno and it exhibited pretty much the same symptoms when acting as a regular node.
-
@Yveaux said in Arduino Nanos don't work as nodes:
The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.Because I'm really rather certain it isn't the hardware. You can read what I've replaced, swapped and tried. The radios have been decoupled, the power has been decoupled. The setup works in all possible ways when using RF24.
What nano boards do you use? Could you try a different atmega328 based arduino?
Yeah, I said I tried an Uno and it exhibited pretty much the same symptoms when acting as a regular node.
@Avamander Can you upload both, the GW and node sketches from the working pair nanoGW/megaNode? Also, it would be helpful to see the full GW log from the non-working combination (nanoNode/megaGW) with
MY_DEBUG_VERBOSE_RF24enabled. If time allows, I'd like to reproduce and test your setup. -
@Avamander Can you upload both, the GW and node sketches from the working pair nanoGW/megaNode? Also, it would be helpful to see the full GW log from the non-working combination (nanoNode/megaGW) with
MY_DEBUG_VERBOSE_RF24enabled. If time allows, I'd like to reproduce and test your setup. -
Ah, I think cussing is warranted here, I copied the radio configuration from my old sketch to the new ones, the node had:
#define RF24_DATARATE RF24_2MBPSThe GW has:
#define MY_RF24_DATARATE RF24_2MBPSLesson learned: Never copy configuration from an existing older sketch, you never know what has been deprecated without a warning.
MY_RADIO_NRF24threw a warning and I fixed that, had no idea aboutRF24_DATARATEand I didn't notice it. :sweat_smile: -
This thread reads like an Agathie Christie novel. Well done on finding it!