Raspberrypi3 + sx1272 FAILURE radio.c:666

(Zhen Wu) #1

Hi there,

I try to use Raspberrypi3 and sx1272 as a lora node to connect to the public lora network.

I install the Limic library from here : https://github.com/ernstdevreede/lmic_pi
And already change the config.h file to sx1272 and change all the EUI and address in thethingsnetwork-send-v1.cpp, but when I run the file, it always shows:


The code of line 666 in radio.c is:

#ifdef CFG_sx1276_radio

ASSERT (v == 0x12 );

#elif CFG_sx1272_radio

ASSERT (v == 0x22);


#error Missing CFG_sx1272_radio/CFG_sx1276_radio

(Silas Valera) #2

Hi ZhenWu

I guess you need to define CFG_sx1272_radio at the top and you may need to change as

#ifdef CFG_sx1276_radio
ASSERT(v == 0x12 );

#ifdef CFG_sx1272_radio
ASSERT(v == 0x22);

(Zhen Wu) #3

Hi Sailas,
Thanks for your reply😃
I already change the definition in the config.h file, it still doesn’t work😔

(Silas Valera) #4

May be the config.h is not included at the top. Or you can actually keep the following line in the code and remove other lines.

ASSERT(v == 0x22);

And there few other places the similar #ifdef appears in the radio.c, you need to make similar updates.