DRAGINO problems and solutions topic part 2

You would need to replace the RF chip, SX127x, not easy.

No . you didn’t understand my message ?

Hi, I have maybe stange guestion, but what other libraries do you exactly need to compile LMIC-Arduino sample. I’m dissapointed and angry becuse this git hub sould wokrs, but no way to compile, pure original reports crap faults >>
C:\Users\Graphic\AppData\Local\Temp\ccX9B15P.ltrans0.ltrans.o: In function decodeBeacon': <artificial>:(.text+0x13ca): undefined reference totable_get_ostime’
C:\Users\Graphic\AppData\Local\Temp\ccX9B15P.ltrans0.ltrans.o: In function decodeFrame': <artificial>:(.text+0x1cb0): undefined reference totable_get_ostime’
:(.text+0x1ccc): undefined reference to table_get_ostime' C:\Users\Graphic\AppData\Local\Temp\ccX9B15P.ltrans0.ltrans.o: In functionrxschedInit.constprop.8’:
:(.text+0x1e80): undefined reference to table_get_u4' C:\Users\Graphic\AppData\Local\Temp\ccX9B15P.ltrans0.ltrans.o: In functionhal_enableIRQs’:
:(.text+0x206c): undefined reference to table_get_u2' C:\Users\Graphic\AppData\Local\Temp\ccX9B15P.ltrans0.ltrans.o: In functionLMIC_startJoining’:
:(.text+0x236a): undefined reference to `table_get_ostime’
collect2.exe: error: ld returned 1 exit status
Lora Dragino shield with SX1276 and MEGa 2560

I cant find >>table_get_ostime<< what is it? Par of library, part of some other library?

Thank for advice.

Hi RadekCernik,

I have used an older Version of Arduino IDE. You should use not the actual version 1.8.10. There some libraries changed in it. Try 1.8.9 or older Versions. They are fine.
Only the LMIC-Arduino is additional needed. The rest of the libraries comes with the release.

Greetings

Marcus

Can you tell the forum which hardware and software you are using and provide links to the actual libraries you are having problems with …

Continuing the discussion from DRAGINO problems and solutions topic part 2:

Hi friends, i cant to send data from arduino with dragino shield to TTN with the single channel gateway OLG01, i first tried to connect the node and the gateway by LoRa-MAC (Raw LoRa) and the connection was succesfull (check image 1), then i checked that the packet forwarder of the gateway was working following the instructions of dragino - TTN guide (last section) and it works (check image 2), however, when I upload the code for ABP connection to arduino neither the gateway console nor application console can receive data, although the gateway appear “connected”, i dont know if its necessary to upload another code in the gateway for send the data to TTN i would be really grateful if someone can say me how to solve this.

P.D: already configure the gateway LORA/LORAWAN parameters (frecuency, server, ID, Sf, etc…) in the control panel (10.130.1.1) like is show in dragino -TTN guide, and try many scripts of ABP connection for the arduino like this:

  1. dragino - TTN guide abp connection (matthijskooijman library):
  2. TTN forum 915-fix-frecuency (same library)
    noone of them has worked.

Thanks a lot!
LoRa%20MAC
Packet_FWD

i dont know a lot about LoRaWAN networks, im new, but i configured my gateway tx frecuency in the control panel acces by the ip direction (generally 10.130.1.1).

Hi friend, i have a similar problem, can you tell me how do you solve the problem with plataform.io, i know that is a type of library for visual studio code i am right?,

It might be difficult for the TTN forum to offer advice, the Dragino OLG01 is not a TTN compliant gateway and can disrupt traffic for those using geniune Gateways. Its not recommended to use these packet forwarders on TTN.

I will have a look at this (and how I fixed
it) later

Arduino MEGA 2560 R3 and https://wiki.dragino.com/index.php?title=Lora_Shield , SX1276 chip

OK more from my problem with compilation LMIC. Here is one of tuttorials I was tryingto use https://www.instructables.com/id/Use-Lora-Shield-and-RPi-to-Build-a-LoRaWAN-Gateway/ . I’ve installed this library as recomended https://github.com/matthijskooijman/arduino-lmic. I was using sample scatch nto pload, just try to complile - https://github.com/dragino/Lora/tree/master/Lora%20Shield/Examples/lora_shield_ttn . and dhis is result>

C:\Users\Graphic\AppData\Local\Temp\ccsp3ZV4.ltrans0.ltrans.o: In function decodeBeacon': <artificial>:(.text+0x13ca): undefined reference totable_get_ostime’
C:\Users\Graphic\AppData\Local\Temp\ccsp3ZV4.ltrans0.ltrans.o: In function decodeFrame': <artificial>:(.text+0x1cb0): undefined reference totable_get_ostime’
:(.text+0x1ccc): undefined reference to table_get_ostime' C:\Users\Graphic\AppData\Local\Temp\ccsp3ZV4.ltrans0.ltrans.o: In functionrxschedInit.constprop.8’:
:(.text+0x1e80): undefined reference to table_get_u4' C:\Users\Graphic\AppData\Local\Temp\ccsp3ZV4.ltrans0.ltrans.o: In functionhal_enableIRQs’:
:(.text+0x206c): undefined reference to table_get_u2' C:\Users\Graphic\AppData\Local\Temp\ccsp3ZV4.ltrans0.ltrans.o: In functionLMIC_startJoining’:
:(.text+0x236a): undefined reference to `table_get_ostime’
collect2.exe: error: ld returned 1 exit status
Byly nalezené násobné knihovny “lmic.h”
Použitý: C:\Users\Graphic\Documents\Arduino\libraries\arduino-lmic-master
Nepoužitý: C:\Users\Graphic\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library
Byly nalezené násobné knihovny “SPI.h”
Použitý: C:\Users\Graphic\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.1\libraries\SPI
Byly nalezené násobné knihovny “SimpleTimer.h”
Použitý: C:\Users\Graphic\Documents\Arduino\libraries\SimpleTimer
Nepoužitý: C:\Users\Graphic\Documents\Arduino\libraries\SimpleTimer-master
exit status 1
Nastala chyba při kompilaci u desky Arduino/Genuino Mega or Mega 2560.

I guess problem is `table_get_ostime’, but !!! This samle was made directly for this type of board, so how someone can use system command which doesn’t work?

1 Like

I tried Platform IO so it allowed me uplod but catch nothing… so nigths will be long

Thanks for your answer, can you give me a reference of gateway that can be work with TTN please

Try here;

https://www.thethingsnetwork.org/docs/gateways/

1 Like

Hi,

I have Dragino LoRa/GPS Shield v1.3 and a Raspberry Pi based gateway. I have uploaded the OTAA example that comes with the arduino-lmic-master library. The pin mapping is the following:

// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 6, 7},
};
The jumper configuration is as given in the wiki:

Once reset, the device sends the JOIN REQUEST. The gateways responds with JOIN_REPLY. However, the device does not seem to process that reply. In the console, the only events I see are EV_JOINING. This happens still after some time, when the JOIN REQUESTs are sent with higher SF.

Has anyone had the same problem? Any suggestions?

I’ve just solved the problem. It had to do with the clock error, which must be compensated by enlarging the reception window. In the setup function, I have added the following line:
LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);

I am currently trying to set up an end node with the raspberry pi dragino hat as explained in this link https://wiki.dragino.com/index.php?title=Use_Lora/GPS_HAT_%2B_RaspberryPi_to_set_up_a_Lora_Node . Although I am initially trying to connect to a gateway on TTN my aim is to connect to a commercial IoT test bed in my country for research purposes.
My question is does anyone know how to get the device’s devEUI for these raspberry pi Lora/GPS hats? I know that on TTN you can generate one when registering a device but I’m trying to find a way of getting the devices’ unique EUI.
Also has anyone had any experience with implementing OTAA on these devices? From my understanding the example in the github repo uses devKeys and appKey meaning that it’s implementing ABP. I actually couldn’t find any example that uses OTAA at all. The example used in documentation is here: https://github.com/ernstdevreede/lmic_pi/blob/master/examples/thethingsnetwork-send-v1/thethingsnetwork-send-v1.cpp .
Besides this is there any other libraries that people have found useful with this specific module? Any help or insights are much appreciated.

Generally not a lot of people are using an RPi to create a node. The RPi is far to power hungry for most node purposes. As such documentation will be limited.

The Lora hat you are using does not have its own devEUI. You can use a EUI based on one of the mac addresses of your RPi.

Hello! I am having trouble with the lmic library and the dragino shield v 1.4. The problem is regarding to the SPI connection and has been already discussed here: https://github.com/matthijskooijman/arduino-lmic/issues/40. But only for version 1.1 - 1.3.

So compiling and uploading the example sketch (https://github.com/matthijskooijman/arduino-lmic/blob/master/examples/ttn-abp/ttn-abp.ino), I get the following error:

Starting
FAILURE
/home/loratest/Arduino/libraries/arduino-lmic-master/src/lmic/radio.c:659

I changed of course the keys and that stuff but the problem is within the radio.c file. The author also mentioned a debug output as follow:

#ifdef CFG_sx1276_radio
    Serial.print("Expected 0x12 from SX1276, read=0x");
    Serial.println(v,HEX);
    ASSERT(v == 0x12 );
#elif CFG_sx1272_radio
    Serial.print("Expected 0x22 from SX1272, read=0x");
    Serial.println(v,HEX);
    ASSERT(v == 0x22);
#else
#error Missing CFG_sx1272_radio/CFG_sx1276_radio
#endif

I get the error as expected: “Expected 0x22 from SX1272, read=0x00”. Later on the following pinout is mentioned for dragino shield v1.2+ (https://github.com/dragino/Lora/blob/master/Lora%20Shield/hardware/v1.3/Lora%20Shield%20v1.3.sch.pdf).

// Pin mapping Dragino Shield V1.2 and V1.3
const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = LMIC_UNUSED_PIN,
    .dio = {2, 6, 7}
};

But this layout is not working for 1.4. Can someone help me to figure out a working pinlayout for the dragino shield v 1.4 with the lmic library?

I would be very thankful :slight_smile: