I am relatively new to Moteino's and the LPL code, and I am not an Arduino guru, but I have successfully and easily used various mods of the Node and Gateway code on a number of Arduino clones and RFM69 radios. About three months ago, I got an 8Mhz Moteino, and it worked great with the WeatherNode code (w/ WeatherShield and a BME280 breakout), and as a remote solar power monitor using INA219, RTC, and Lux breakouts.
I recently picked up a 5V Moteino w/ trace antenna, and it wouldn't work with my previous setups. Going back to my 8Mhz Moteino, it doesn't work right either. The symptoms are:
1. They both do fine receiving with the Gateway code,
2. They both do fine running the Node code, but if I increase the TRANSMITPERIOD above about 10 seconds, they both quit working.
3. They both will transmit the first packet of the WeatherNode code, sometimes the second, but then quit working.
At the same time, all works well on an Adafruit Feather, and cheap 3.3V knockoff, using the WeatherShield and BME280 breakout.
Perhaps something has changed in the Libraries or Board file info, since I recently updated those as recommended. Maybe it's the way the new files interact with the Bootloader(?), because my other boards, with the ProMini bootloader, still work fine.
I can try putting the ProMini bootloader on one and see what happens, but I wanted to check here first and make sure that I am not...., loosing my mind?
Greg
Greg,
Thanks for the detailed explanation,
You seem to suggest that new changes have somehow broken your previously working setup?
Ie it was working fine, then you went back to your 8mhz setup which is no longer working?
Is only the increase in transmission period making the difference between working/non-working?
How exactly do you change this period above 10s?
I reckon there are significant usage differences between the moteino and the feather, so the same identical code will not just work on both, without a few adaptations?
FWIW the bootloader has nothing to do with how your sketch behaves.
I hadn't played with my 8Mhz Moteino in a while, and it was working fine when I last used it. I got the new 5v trace antenna Moteino, and wanted to use it with a previous solar monitoring setup, and it would only send one or two packets then die. I went back to the 8Mhz board, and the same thing happened, it was dying.
Yes, it is the increase in transmission delay that seems to break it. I am using the virgin WeatherNode code, and a mod of it that I use for reading INA219, RTC, and Lux sensors i.e., I took out the BME280 code and inserted code for these sensors. I am simply modifying the SEND_LOOPS variable, and was using a value of 75 for ~10 minute reports. I set it to "1" when I am tweaking things for a quick report, but now I only get one or two packets with it set to "1".
NEVERTHELESS, all of this is mute right now because I "bricked" both my Moteino's this morning trying to upload a new bootloader. I have done bootloaders many times before using an Arduino-as-ISP setup, but it didn't work with the Moteino's. I am getting the dreaded bad device signature error. As a test of my setup and myself, I burned bootloaders to two other Arduino's using even two other Arduino's as masters, and all worked fine.
That said, I guess I was just too enthralled with the cute little Moteino's, and I jinxed myself - it apparently just wasn't meant to be!? At some point, I'll refresh my knowledge of avrdude and my usbtiny ISP programmer, and see if I can salvage them.
Thank you....., Grg
The flash and the radio are both on the SPI bus, and neither have pullups on their chip selects so one or both devices can over-drive MISO when the MCU is in reset. You'll need to add external pullups, say 10k, to both chip selects before you can use ISP to program.
Mark.
Thank you for that advice Mark, I will try it in the morning!
The nice 4MBIT windbond flash has never caused me problems during ISP reprogramming.
It's the RFM radios that throw the SPI off if their CS is not pulled up.
FWIW you should not have any need to reprogram the Moteinos with a new bootloader, but if you do, use the "_spidisabled" variants from here: https://github.com/LowPowerLab/DualOptiboot
My Moteino's won't accept a sketch now, so I think I need to burn a bootloader. I don't have Flash on them, so I will just pull my pin10 CS(SS) high (right?) I will try burning your suggested image using an Arduino-as-ISP setup, one with a 3.3v master, the other at 5v. Thanks for all so far!
Quote from: Felix on June 25, 2018, 08:46:35 PM
The nice 4MBIT windbond flash has never caused me problems during ISP reprogramming.
It's the RFM radios that throw the SPI off if their CS is not pulled up.
Ah, it seems the DO is high impedance unless it has decoded a read instruction, I assume then it's possible to use a single bi-directional synchronous serial line as well as SPI to access it.
Mark
I installed new bootloaders on both Moteino's this morning, and they are working again. I used Arduino-as-ISP becuase it was quick and easy, and I used the bootloaders that were available under the IDE boards menu. I don't know why I was having the "Moteino quiting" issue before, but that is no longer the case - they are both working fine now! Thanks to all for the comments and suggestions.
***Oh, the pull-up resistor on CS was the cure for the bad signature error that I was having, thank you perky!!!
Greg