Need help with my first TTN node

Hi LoRaTracker,

Uh, yes you are fully correct.

I changed this to D5 and it’s running now.

Thanks a lot
Gerd

Wise to start on the assumption that the tutorial is correct, it had DIO1 connected to pin 5.

Fully correct, but sometimes we lose sight of the wood for the trees. I started with the Adafruit tutorial first and mixed them up.
Big mistake! :rofl:

I’m using the same hardware, and tried the revised schematic (G1->D5). Had uploading issues when used 5V on Uno (not sure if I have made any mistakes) but successfully tested by changing it to 3.3V. I ran the ttn-otaa example of “Hello World”, I could connect to TTN and could see the data in TTN console (this is definitely a big achievement for me because I’ve been unsuccessfully experimenting different hardware over the past few weeks).

I wanted to make an incremental step, and I tried to send DHT11 data to TTN. I’ve used this sketch: https://github.com/robertlie/dht11-ttn-rfm95/blob/master/sketches/ttn-otaa-dht11/ttn-otaa-dht11.ino. Got compiled, and uploaded, but I could see nothing in the serial monitor, except ‘Starting’. I’ve tried DHT example from TTN library as well, but no luck. It says “No status, no response from RN module”. Can somebody please provide a working sketch. Many thanks in advance.

Received Adafruit RFM95 breakout board and connected it to Arduino Uno. Successfully ran the ttn-otaa LMIC sketch to send Hello World message to TTN. However I could not modify the sketch to be able to send sensor data (for example DHT11) to TTN. Spent couple of hours, looked at many resources, but was unsuccessful. Tried this one: https://github.com/robertlie/dht11-ttn-rfm95/blob/master/sketches/ttn-otaa-dht11/ttn-otaa-dht11.ino. Lmic library has an example for ttn-otaa-dht22 for feather; tried to adapt it to Arduino, but even then no luck.

Somebody please help me with the first lora node. I know that its just a minor tweak, but not able to do that, because I don’t have any prior programming experience. Should I explore any other libraries (for example one wire library). Any help is greatly appreciated.

what gateway are you using ?

Its helpful to the forum if you tell us what the actual problem you had was.

However I could not modify the sketch to be able to send sensor data (for example DHT11) to TTN.

Did you get compile errors, or did it appear to work, but no data recieved in TTN or what ?

Lmic library has an example for ttn-otaa-dht22 for feather; tried to adapt it to Arduino, but even then no luck.

So what was the problem here ?

Imst ic880a + Pi 3 (868mhz)

In all cases (Robert lie code, adaptation of otaa-dht-feather code), the code gets compiled and gets uploaded successfully. Upon opening serial monitor, it says ‘Starting’, and then nothing happens after that.

pinmapping could be wrong… this part of the sketch, check that first

// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 5,
.dio = {2, 3, LMIC_UNUSED_PIN},
};

Could well be a pin mapping issue, as @BoRRoZ suggested.

One test, is to deliberatly change say the .nss pin to a ‘wrong’ pin and see if the error is the same.

I’ve double checked the pin mapping (w.r.t schematic) and its correct. As I said before, I used the corrected form of the circuit mentioned in post#1. In addition I’ve interfaced DHT11 sensor to the circuit. The pin mapping in my case is as follows:

// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 4,
.rxtx = LMIC_UNUSED_PIN,
.rst = 2,
.dio = {3, 5, LMIC_UNUSED_PIN},
};

I ran both the sketches again, and I see the same ‘Starting’ in case of robertlie’s sketch, and ‘Start?p’ in case of ttn-otaa-feather sketch. And nothing happens after that.

I’ve tried @LoRaTracker’s suggestion as well. The following is the output on serial monitor in that case:
Starting
FAILURE
C:\Users\Sam\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\lmic\oslmic.c:53

I realized something, my node is connected to TTN as I could see the status ‘x’ minutes ago, which is altogether a new development. I could also see devadd, appeui and deveui (just once) in the Data tab. However I’m not sure which of the two codes partially worked (in the sense connected to TTN)

Don’t know what’s happening.

Adafruits tutorial code for their board includes checks to see if the board is responding correctly (i.e. that its connected correctly) did you try that code ?

Can you please send the link?

By any chance, is it because I’m not using logic converter (I’m using G1 pin of rfm95 breakout)? But there were no issues when I was sending Hello World message to TTN.

Sorry if my questions/comments seem to be too dumb, I’m completely a novice in IOT and LoRaWAN.

I found it via a Google search.

That breakout board does not have logic level converters on the RFM95 DIO pins, and it should really as even if the respective voltage regulators are exatly 3.3V and 5V, its marginally out of specification, although in most cases its going to work.

If the 3.3V regulastor is slighty low and the 5V regulator is slightly high then a logic level converter may be required.

However if the hello world example worked, you migh conclude that its not a logic level conversion issue.

Its also worth mentioning that the Adafruit board does not have input protection on DIO2, this pin can be used on the RFM95 as an input, so feeding 5V into it may not do the RFM95 a lot of good.

Thanks for your inputs. Do you mean to say that I’ll have to use logic converter to make the board work?

I did say;

"although in most cases its going to work"

1 Like

If logic converter is the reason, I suppose using a board which works on the same logic as that of lora module is better. How about Adafruit feather M0 with RFM95 lora?

If somebody can share their experience of using feather M0 with RFM95 for sending sensor data to TTN, it would be great. I’m sure the example code in Lmic library (ttn-otaa-feather-dht22) can directly be used for the purpose.