I have spent two days trying to get my head around this. I have been playing with the units mentioned in the subject for the last two weeks with a high level of success. I actually have five units installed and working very well, four connected to MEGA's and one on an UNO. I'm using the LoRa library by sandeep, v 0.5.0.
Connection is straightforward, I solder the bare unit onto an ESP8266 breakout and connect as follows:
GND-GND
3.3V - VCC
RESET - D9
DI0 - D2
DI1 - D3
NSS - D10
MOSI - D11 (D51 on MEGA)
MISO - D12 (D50 on MEGA)
SCK - D13 (D52 on MEGA)
Now working on a my next project I hooked up another UNO to a Ra-02, flashed the sketch and it keeps on giving this:
LoRa Sender
Starting LoRa failed!
So I check the cables, same thing. Maybe faulty Ra-02, change that, same thing. Take another Ra-02 from a working MEGA, same thing. Bring in new UNO, same thing. Switch to another working Ra-02, same thing. Load the sketch from working examples, same thing. I am posting this here because I have NO IDEA what I'm missing. Tried three different UNO's with three different Ra-02, which all work with the MEGA, but not one with the UNO. And I'm especially baffled because I have a working UNO->Ra-02 combo out in the field pinging as we speak.
Any tips would be appreciated.
Is there any way of debugging these? I cannot find any commands to use for debugging in the documentation.
I tried two different cheap ebay logic level converters, could not get either of them to work with the Ra-02. I suspected they could not handle the SPI frequency so I lowered it in the sketch using LoRa.setSPIFrequency(1E6); trying 8E6, 4E6 and eventually 1E6, all with no initialising from the Ra-02.
So I hooked it up straight, with VCC onto 3.3V and it worked fine, has been for many days now. I know this is bad practice, but I've given up on trying to get that to work.
On another point, asking as someone who has only played with one Lora unit, which chip / library combination is the most versatile, or offer the most functionality?
I would like to see a bit more in regards to addressing, CRC checks, etc, which I'm not seeing with the library I mentioned above.
The hardware can do so much, but I'm not sure I use the library that utilises most out of the hardware.
heinburgh:
On another point, asking as someone who has only played with one Lora unit, which chip / library combination is the most versatile, or offer the most functionality?
I would like to see a bit more in regards to addressing, CRC checks, etc, which I'm not seeing with the library I mentioned above.
The hardware can do so much, but I'm not sure I use the library that utilises most out of the hardware.
Most of the LoRa modules are the SPI based Semtech device with all the RF matching bits added, little to choose between them.
Cannot comment on the generic LoRa libraries but they do tend to assume that you will implement your own addressing.
CRC checks mostly go on in the background, you dont have to worry much about them.