Comments (6)
I just installed Raspian new and enabled SPI again and now it's working fine.
Thank you very much for your help.
from dragino.
Hi Mel,
That's not an error I've seen before. From where it appears in the code it's before it attempts to do anything with the credentials given in the dragino.ini file. I suspect the problem is that the code is failing to speak to the loRa module, but the error it's given is not particularly helpful.
Have you enabled SPI on the pi and added the extra overlay file needed for the extra CS pins?
Phil
from dragino.
Hi Phil,
yes I've done that. I also know that LoRa works on that raspi with the LMIC library. I justed wanted something in python.
from dragino.
Curious,
I'm afraid my next step for debugging would be to attach a logic analyser and check that the data flowing back and forth matches what I'd expect. To me it looks like the op_mode_bkup = self.get_mode()
line (834 LoRa.py) is giving an invalid response, which then causes grief when the python tries to send the value back to the LoRa device.
from dragino.
This message:-
sys.stderr.write("Mode <- %s\n" % MODE.lookup[mode])
KeyError: 0
Tells me that the value of mode is zero and that it is not a value currently in the list of modes (key error)
If you look at dragino/SX127x/LoRa.py line 837 the rx_chain_calibration() method uses get_mode() to save a copy of the current mode which is then used on line 837 and throws an error there because get_mode() returned zero. Now, get_mode() uses SPI to read a transciever register. So as pjb304 suggested, your SPI isn't working. Well, not returning a value.
Do any LEDs on the Dragino HAT light up? If not the power is missing.
Try reseating the Dragino HAT. You may have a bad connection on the SPI bus pins.
I must say that my HAT is alive and well and never suffered this problem. I'm also using a Pi4.
Note: The dragino code , as it stands, does not support downlinks (if you are using it with TTN). I have modified my dragino.py to pass downlink messages into my code and it works just fine. If you want to know how to do that just ask, once you've gotten test.py working.
from dragino.
Thanks for your answers,
The LED is on, I will try to reset the Dragino HAT and check the SPI aswell.
from dragino.
Related Issues (19)
- Downlink support HOT 14
- Support SF12 & RX2 HOT 4
- Dragino LoRa/GPS HAT on RPi 4 HOT 1
- Change the DevNonce when retrying a join. HOT 2
- Unable to join to TTN V3 HOT 5
- dio_mapping needs to be reset in join() HOT 1
- Add tx_done flag HOT 1
- Confirmed downlink messages? HOT 1
- Seeing more downlink messages than expected in TTS HOT 7
- Routing downlink messages HOT 2
- Possible race condition waiting for 'transmitting' flag to become False
- DevNonce changes in 1.0.4 HOT 2
- Downlink Messages HOT 2
- OTTA implementation HOT 11
- OTAA - waiting repeats.... v2 ttn and v3 both see the activation. HOT 6
- TTN V3 Compatability HOT 2
- Compatibility with Adafruit RFM95W? HOT 2
- test.py has problem reading dragino.ini file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragino.