Arduino uno with LMIC lib. assert failure

The goal what I want is OTAA(over the air activation) communication with Arduino(or raspberry pi 3) - Gateway(raspberry pi 3 or arduino) - TTN(the thing network).

Ready to execute code…
1. Arduino Uno R3, computer-arduino serial cable
2. Arduino shield(https://www.cooking-hacks.com/documentation/tutorials/multiprotocol-shield-connect-two-xbee-connector-arduino-raspberry-pi-galileo), sx1272 chip
3. LMIC library Version 1.5
4. Upload library to Arduino(IDE V1.6.11) sketch library.
5. Not modify pin map struct in raw.ino
6. Circuit image

At first, i want to phy level communication(raw.ino in lmic library)test with just one arduino. So i modify some files like below

  • config.h
    //#define CFG_eu868 1
    //#define CFG_sx1276_radio 1
    #define CFG_us915 1
    #define CFG_sx1272_radio 1
    #define DISABLE_INVERT_IQ_ON_RX

  • hal/hal.cpp
    static const SPISettings settings(10E6, MSBFIRST, SPI_MODE0)
    // static const SPISettings settings(1E6, MSBFIRST, SPI_MODE0)
    // static const SPISettings settings(4E6, MSBFIRST, SPI_MODE0)

##Question 1. I tried all the comments, but i get the following error. how can i fix error ?
Starting
FAILURE
C:\Users\Jaeho Shin\Documents\Arduino\libraries\arduino-lmic-master\src \lmic\radio.c:702

##Question 2. is this link correct gateway source code ?

701 #elif ??

link
This is correct conditional expression.

you’re right… I was thinking typo, 'arduino… elseif :wink:

Have you enabled the power to the socket?

Are you using the example code the vendor supplies? Would make life easier I think… (You need hybrid example on the page )

Regarding 2: No. The code you need is ‘single channel gateway’ code. TTN does not make this available as it is not LoRaWAN compliant. The forum contains plenty on the subject…

Do i have to supply extra power to the shield? how can i do it ?
I just supply power(5v) to arduino with computer serial cable.

I used not cooking hacks code but LMIC library v1.5 and want to Node — (LoRa-phy) — Node communication.
To the next step, i want to upload LoRaWAN MAC code(LMIC otta.ino, abp.ino) at node and gateway.

ps. About power in LMIC library, it is good to supply 3.3v to arduino. Then, how can i confirm the data is transmitted? As serial cable, i can check transmit with arduino serial monitor.

Check their website, provides instructions on both node to node and node to gateway communication. Also specifies the command to use to enable power to the socket. (It seems the sockets do not receive power by default,)

For the next step you need either a full gateway or use the single channel gateway code. LMIC abp and otaa are for node only.

But now, i got the value of 82 at 691 line. It means 0x52 with hexa format.

  • Q. What is 82 means and Does it mean power is supplied ?

Are you using the vendor supplied example code? If not I suggest you start with it just to validate the hardware is operating correctly.

I don’t use vendor’s code but at link, Arduino Uno and LoRaWAN class A is OK.

Has anyone managed the transmission without using AES encryption, that is, transmitting the pure data?