UNO, Dragino V1.3, Failure Radio.c:659


I have difficulties (FAILURE lmic/radio.c:659) in setting up a TTN Node using:
- Arduino Uno
- Dragino Shield v1.3 at 868 MHz (with "RF 96" on black chip, should be 1276 radio

I am using ARDUINO IDE 1.6.12 on a Mac (sierra-OS). Also tried it with same version on Linux x86.

Jumpers J_DIO1, 2 and 5 are closed. Jumpers SV2, 3 and 4 are on the right, as seen on picture below

Basically I orientated at the steps described in Instructables :

1) I took the LMIC-lib from LMIC@github, not the one available inside Arduino IDE.
2) I checked that #define CFG_sx1276_radio 1 is in lmic/config.h
3) Downloaded sketchlora_shield_ttn and modified unique data like DEVADDR etc.

After uploading tu UNO and monitoring the serial port at 115kbit/s I read

Green Power-LED of dragon shield works at least but that’s not what I intended to set up.

I wasn’t sure about the DIO-Pins, so I left it as in the example:

const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 9,
    .dio = {2, 6, 7},

Did I do anything completely wrong or might the shield perhaps be broken? I also used a different UNO.

Any help would be very much appreciated

Dragino 1.3 Shield + Uno error FAILURE radio.c:689
(Gonzalo Casas) #2

Check if this one helps:

The jumpers are set differently.



Thank you, @gonzalocasas, but opening the DIO_5-Jumper did not help. Same error at "radio.c:659"

(Gonzalo Casas) #4

Could you add more details about which error exactly it is that you're getting?


Sure, @gonzalocasas, although I thought, I had provided all information I have. Actually immediately after uploading the compiled sketch to my uno I get in serial monitor:

where "(path)" of course is some long path. :wink:

Dragino 1.3 Shield + Uno error FAILURE radio.c:689
(Gonzalo Casas) #6

I was checking the LMIC source a bit and this error style comes from the hal_failed function, which is basically triggered by ASSERT. In this case, the assert that fails is: ASSERT( (readReg(RegOpMode) & OPMODE_MASK) == OPMODE_SLEEP ) (source), but I am not sure what that means. Perhaps as you said, the shield is defective.

Maybe @matthijs can shed some light here...


@Stekos I'll send you my running code for dragino by PM
J_DIO5 should be open


Thanks to @ursm I am finally sure that there is something wrong with my dragino shield. Even using same libraries and sources, same jumper settings I still get an error at that point where radio.c tries to determine whether it is sx1276 (0x12) or 1272 (0x22) chip. Guess it's broken.


I'm having the same issue, even with the pins set.

also make sure config.h is set correctly

define CFG_sx1272_radio 1 <--this is my radio uncomment it

// This is the SX1276/SX1277/SX1278/SX1279 radio, which is also used on
// the HopeRF RFM95 boards.
// #define CFG_sx1276_radio 1 <-- not my radio comment it out

further edit, try using the radiohead library and see how you go with that, looks like it is working....


Got it working, make sure your pin mapping is correct

// Pin mapping

const lmic_pinmap lmic_pins = {
.nss = 10,
.dio = {2, 6, 7}

and ignore my radio comment unless it actually applies RM95 == 1276


That also did not help, @mikey0000. I am sure now that the shield is broken. I am going to order another one, hoping that the next time everything is going to be working out.


@Stekos, what version of the shield do you have? and what frequency? Also try with the RadioHead library, if that works then its not broken.


It's the v1.3 version, @mikey0000, as I intended to write on the topic (but messed that up). It's the 868 MHz-Version. You are right, I should try the readiohead-lib, which at the moment isn't what I would call familliar to me. But, if it would work, would I be able to connect to TTN using radiohead lib? Anyway, I will check that.


Dunno about connecting to TTN with Radiohead lib but if it runs, its probably not broken. Also enable debugging messages if you try again with the LMIC lib, I had the same issue as you but as soon as I changed the lmic_pins it started working (I know you've tried this already). Make sure you do not change the jumpers.


Just for future references: the shield WAS broken. I meanwhile got a new one and it simply works. So keep in mind that this error might indicate there is something wrong with de LORA hardware.


This error actually indicates that Arduino can't work with RFM95 for some reason. And usually there're 2 reasons for that:
1) wrong pins in sketch. Correct ones are below:
.nss = 10,
.rst = 9,
.dio = {2, 6, 7},
2) the board is broken. Looks like there're many copycats of original Dragino board and many of them are bad quality and unchecked. Good ones have a sticker 'Q.C. Passed'. I've got some good ones and them from another store I received 9 boards very bad quality (cold soldered, etc.) and 1 was broken.

(Sandgroper) #17

The Dragino shields for the Ardunio (versions 1.3 and 1.4) have a flaw. The design includes level shifters to connect the modem to a 5 volt Arduino however Dragino removed the 5 volt connection and instead power the level converter from 3.3volts (and as a consequence, made the level converter useless as a level converter). When connected to a 5 volt UNO, the switching threshold voltage of the Atmega328P processor for a logic 1 (worst case) is 0.6 * VDD = 0.6 * 5 = 3 volts. The level converters voltage out high (minimum) is approximately 3.19 volts at IOH of 50uA. The level converters output high voltage drops as the load current increases. The margin of safely without loading the outputs is just 0.19 volts and that assumes optimal output levels of the UNO's 3.3 and 5 volt regulators. Assuming these regulators are quality products (and not cheap copies), they each have a tolerance of approximately 0.1 volts for the 5 volt regulator and 0.09 volts for the 3.3 volt regulator. If you factor this in to the calculations there is no margin of safety and you can expect errors as a result.

Try using a 3.3volt Arduino instead.