MCCI LMIC library TTGO-LORA32-v1 issues

Hi, I am brand new to LORA and I am having a hard time figuring out this. I installed chirpstack on a container with no issues.
Have added a dragino lg02 as gateway, apparently with no issues.
But when I try to connect a TTGO-LORA32-v1 device I don’t know what’s going on but it doesn’t work. I am using MCCI LMIC library

In Arduino’s serial console I get:

9005682: EV_JOIN_TXCOMPLETE: no JoinAccept

13393793: EV_TXSTART

1.- Configuration of the .ino file:

static const u1_t PROGMEM APPEUI[8]={ 0xCC, 0xC6, 0xEA, 0x5B, 0x91, 0x38, 0x67, 0x04 };

void os_getArtEui (u1_t* buf) { memcpy_P(buf, APPEUI, 8);}

// This should also be in little endian format, see above.

static const u1_t PROGMEM DEVEUI[8]={ 0xE7, 0x64, 0x55, 0x18, 0x6C, 0x02, 0xB8, 0x23 };

void os_getDevEui (u1_t* buf) { memcpy_P(buf, DEVEUI, 8);}

// This key should be in big endian format (or, since it is not really a

// number but a block of memory, endianness does not really apply). In

// practice, a key taken from ttnctl can be copied as-is.

static const u1_t PROGMEM APPKEY[16] = { 0x92, 0x33, 0xB6, 0xB2, 0xCF, 0xE3, 0x8A, 0x67, 0x8D, 0x99, 0xBC, 0x03, 0x1A, 0xD4, 0x02, 0x32 };

void os_getDevKey (u1_t* buf) { memcpy_P(buf, APPKEY, 16);}

static uint8_t mydata[] = “Hello, world!”;

static osjob_t sendjob;

2.- When looking at the dashboard it says connection: NEVER. but then I see on the LoraWan frames tab the following.

And this is what I don’t understand because apparently there is some sort of comm amongst the gateway and the ESP board? Any help would be appreciated. Have been searching the forum for hours but I have not found anything similar.

Thanks for the good work.

You are better try with 8-channel LoRaWAN gateway such as Dragino LPS8v2.

Dragino LG2 is single channel LoRa gateway.
Single channel LoRa gateway is not LoRaWAN gateway.

1 Like

Hello,

I think I have the exact same problem and I have been trying to solve it for a month. My device is TTGO T-Beam V1.1 and I use LMIC-node (not the Arduino one but I’ve also tried it) with a Mikrotik LTE LR8 gateway. The node sends the Join Request and the gateway sends the Join Accept but it looks like it does not arrive to the node. I have tried changing the LoraWan version of the device in my Chirpstack server to 1.0.2 and region parameters A (which is a must for this node firmware) but it hasn’t worked for me either. Have you already solved it?

1 Like

Hello, Do you think that could be my problemn too (I have just replied above)? I think my gateway is single channel lora gateway but i am trying with just one or two end-devices so I don’t know if there could be a real problem with that.

Sorry. My gateway has not a single Lora channel so it should not be my problem.

In my experience, you can try with a cheap commercial node to make sure everything works.
In the process, you will understand the flow.

After that, you can use your DIY node and debug.

1 Like

Yes I suppose that’s the best way to get started but we are beginning a new LoraWan project in my company and that’s the only material I can have access to at the moment. Anyway, the node should not be the problem because LMIC-node firmware is developed by IBM and it looks like it should work with all their compatible end-devices. So the mistake could be in my Chirpsatck configuration but I can see some LoraWan confirmed and unconfirmed messages from other nodes out of my server (not my nodes) and I don’t know if that could mean the cofiguration is fine.

Have you searched here?

By right, the node should receive the Join accept from the gateway in the same uplink frequency.

Have you checked if the node has sent any uplinks?

I don’t think he gets any uplink because the node hasn´t received the Join Accept, so it will keep trying to join. At least that’s the problem I am having. I can see the gateway´s log and the Join Accept is sent in the same frequency the Join Request was sent, but the node doesn´t receive it, so it just keeps sending Join Requests.

1 Like

Usually, in this case, I use a SDR usb to listen at the two main frequencies.

So I will know if the gateway really forwards the Join Accept and at which frequency.

If the gateway sends Join Accept then the error is at the node or mismatched RX delay.

Or I will use a commercial node to compare with DIY node.
If one works and one does not, then we know where the error is.
https://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/

If the error is at the DIY node, then need to debug and ask at the library github.

1 Like

I have seen the gateway’s log and the downlink (Join Accept) frequency is the same as the uplink frequency (Join Request). I think the problem is coming from the RX window. I have also configured it as an ABP node but I keep not receiving the downlinks although I do send uplinks and receive them with my gateway. I have also tryed to change LMIC_CLOCK_ERROR_PPM which is suppossed to manage the rx window timing, unsuccessfully thogugh. I will keep trying because I don’t have any comercial node I can use at the moment.

OTAA and ABP are only ways to join the network.
After joining the network, they are the same for other settings (RX windows…)

You can try this library, it is not complete but sure works for basic LoRaWAN.
I have tested OK with ChirpStack.

Or this one. https://github.com/jgromes/RadioLib/tree/master/examples/LoRaWAN

MCCI LMIC is complicated to debug.

Thank you for your help. Finally, I have been able to connect my nodes to ChirpStack. The problem was in my gateway’s configuration. Now I am using Beelan-Lorawan firmware and it works just fine. My nodes are about 5 meters away from the gateway and they join after 20-30 attempts, I would like it to be much quicker but it works. When I try to work with lmic they don´t ever join so I will have to keep using this one.

Thank you again!

It may mean the frequencies are not 100% matched.
Beelan-Lorawan is a simple but not complete LoRaWAN stack as it uses static frequencies.

You may want to check the setting of the region.

And check if the frequencies match the frequencies of the gateway and Chirpstack server.

Yes, I have checked the region’s settings and everything looks fine. My region is EU868 so the Join Accept must be sent at the same frquency as the Join Request and that’s what I can see in Chirpstack’s and my gateway’s log. I am working indoor so probably there are many interferences produced by metallic objects. Thank you again for the help and your quick response.

1 Like

Please note that if your node is too close to the gateway, the signal might be too strong for the gateway radio and the gateway will report two uplinks instead of one, one on an incorrect frequency.

1 Like

Yes, I haven´t seen that problem. It even happens about 10 meters away from the gateway. Actually, I have also tried LMIC with a Heltec Lora 32 and I have seen no issues with it (it quickly joins through OTAA and sends unconfirmed uplinks). Thank you for your answer.

Hi Petro, I am currently experiencing the exact same problem with the same equipment , would you mind sharing what you did to make it work at the end, I’m lost and pressed for time on this project, and I would really appreciate your help on this.

Kind regards
Niel

Hi Niel,

I could not make it work with LMIC. As @IoTThinks told me, I tried with Beelan-LoraWAN and it worked fine. I did not have problems even though it is not a full LoraWAN stack.

If you need to use LMIC, I have made it work properly in a Heltec WiFi 32 (V2).

Regards,
Pedro

Hi, thanks for your reply, I am working on the Beelan library already, you did mention that you had to change something on the mikrotik gateway, can I ask what was that related to?