-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Starting LoRa...", "Failed" #40
Comments
What RFM95 product are you using - could you provide a link? Our guide for this library includes a step where you connect a wire between Arduino pin 6 and the RFM9x's io1 pin. Please make sure youve done this since it's required to power cycle the RFM9x module: |
But D6 is not used in TinyLoRa.cpp, nor in hello_LoRa.ino? This is the board schematics I did solder a wire from D5 to reset on the RFM95 Like stated TinyLoRa is able to send data to TTN. |
Some updates: I have two boards. Since D6 doesn't seem to be used (correct me if I'm wrong), maybe dio1 needs some additional pullup? |
This is happening to me as well. My setup is slightly different: Using Arduino Nano with RFM95C breakout board from Adafruit. The pins are connected as in this guide: https://learn.adafruit.com/adafruit-rfm69hcw-and-rfm96-rfm95-rfm98-lora-packet-padio-breakouts/arduino-wiring, and modified The board managed to transmit to my Chirpstack LoRa Server several times until, at some point, it starting throwing out I managed to get it to transmit sometimes by power cycling, but this is not consistent. Resetting via the Arduino reset pin does not seem to work. Here's an example of what happens (note I've disabled the version check in the library for this example):
It transmits 5 packets correctly, then gets stuck in Any idea or fixes at this point, @brentru ? Thanks in advance for your help! |
This library is untested with chirpstack (was designed to work with TTN v2) so I'm not really sure where the instability is and can't test (I don't have a chirpstack server set up) |
Hi @brentru, I moved to TTN v2 to test this out. Unfortunately, the same thing is happening. I get it to transmit a couple times after power cycling, but it then gets stuck in
Note that it transmits one packet correctly (shows up in TTN console), but it then gets stuck on So Chirpstack is not the issue. Any ideas? |
Hi again @brentru upon further investigation, it seems the code is getting stuck at Have you any ideas as to why the NOTE: this failure occurs sometimes on the first transmission, and other times it manages to transmit up to 3-5 packets before it fails. But I've never been able to transmit more than 3-5 packets on a single run. |
I've been wrestling with this issue ocassionally and finally had some time to sit down and test different layouts where things fail and why. The problem at least in my case seems to arise when using some M0 boards but not with 32u4 based ones. For example comparing schematics between Feather RFM95 32u4 vs M0 versions shows they seem to have different pullup schemes.
The only place in the library at TinyLora.cpp where CS isn't explicitly set is right at the beginning in TinyLoRa::begin() right after setting pinmode for _cs, so I inserted following on current line 347 and all the problems vanished. (Setting it LOW returns the error in the topic)
The tests were ran on preassembled Feather LoRa boards (M0 & 32u4), Adalogger 32u4 + RFM95 module, ItsyBitsy M0 + RFM95 module and the results line up with the previously mentioned. Eagerly awaiting someone else to confirm if this approach works beside my own few boards. ps. Using the old trick connect io1 to random digital pin had no effect whether attached or not at any phase of testing. |
Basically the same problem as this when running hello_LoRa.ino
#23
I'm using RFM95 on a M0 arduino (however non adafruit), and I know it worked twice (coming out of power cycle),
but if I run more than once it fails, maybe the device is in slightly different state after power cycle
versus just pulling RESET low ? (I did hook up reset)
So fix is to remove the version check:
uint8_t ver = RFM_Read(REG_VER); if (ver != RFM9x_VER) return 0;
Once the check has been removed, it sends data to TTN as expected, so the code works, but why it fails is curious.
When it fails, the RFM_Read returns 0 (or maybe its just the first SPI read after reset that is flaky?)
The text was updated successfully, but these errors were encountered: