CongducPham / LowCostLoRaGw

Low-cost LoRa IoT & gateway with SX12XX (SX1261/62/68; SX1272/76/77/78/79; SX1280/81), RaspberryPI and Arduino boards
699 stars 352 forks source link

error compiling Arduino_LoRa_SX12XX_Ping_Pong_LCD #314

Open dimtsam opened 2 years ago

dimtsam commented 2 years ago

Hello Im trying to compile Arduino_LoRa_SX12XX_Ping_Pong_LCD but Arduino IDE shows me an error:

Arduino: 1.8.11 (Windows 7), "Arduino Pro or Pro Mini, ATmega328P (3.3V, 8 MHz)"

C:\Users\PC\Desktop\arduino work\IoT\Arduino_LoRa_SX12XX_Ping_Pong_LCD\Arduino_LoRa_SX12XX_Ping_Pong_LCD.ino: In function 'void loraConfig()':

Arduino_LoRa_SX12XX_Ping_Pong_LCD:240:6: error: 'class SX127XLT' has no member named 'setPA_BOOST'; did you mean 'setDevicePABOOST'?

LT.setPA_BOOST(true);

  ^~~~~~~~~~~

  setDevicePABOOST

C:\Users\PC\Desktop\arduino work\IoT\Arduino_LoRa_SX12XX_Ping_Pong_LCD\Arduino_LoRa_SX12XX_Ping_Pong_LCD.ino: In function 'void setup()':

Arduino_LoRa_SX12XX_Ping_Pong_LCD:397:6: error: 'class SX127XLT' has no member named 'setDevAddr'; did you mean 'setDevice'?

LT.setDevAddr(node_addr);

  ^~~~~~~~~~

  setDevice

C:\Users\PC\Desktop\arduino work\IoT\Arduino_LoRa_SX12XX_Ping_Pong_LCD\Arduino_LoRa_SX12XX_Ping_Pong_LCD.ino: In function 'void loop()':

Arduino_LoRa_SX12XX_Ping_Pong_LCD:434:18: error: 'PKT_TYPE_DATA' was not declared in this scope

uint8_t p_type=PKT_TYPE_DATA | PKT_FLAG_ACK_REQ;

              ^~~~~~~~~~~~~

C:\Users\PC\Desktop\arduino work\IoT\Arduino_LoRa_SX12XX_Ping_Pong_LCD\Arduino_LoRa_SX12XX_Ping_Pong_LCD.ino:434:18: note: suggested alternative: 'PACKET_TYPE_LORA'

uint8_t p_type=PKT_TYPE_DATA | PKT_FLAG_ACK_REQ;

              ^~~~~~~~~~~~~

              PACKET_TYPE_LORA

Arduino_LoRa_SX12XX_Ping_Pong_LCD:434:34: error: 'PKT_FLAG_ACK_REQ' was not declared in this scope

uint8_t p_type=PKT_TYPE_DATA | PKT_FLAG_ACK_REQ;

                              ^~~~~~~~~~~~~~~~

Arduino_LoRa_SX12XX_Ping_Pong_LCD:439:8: error: 'class SX127XLT' has no member named 'CarrierSense'

 LT.CarrierSense();

    ^~~~~~~~~~~~

Arduino_LoRa_SX12XX_Ping_Pong_LCD:452:87: error: 'class SX127XLT' has no member named 'readDevAddr'; did you mean 'readRegister'?

 if (TXPacketL=LT.transmitAddressed(message, r_size, p_type, DEFAULT_DEST_ADDR, LT.readDevAddr(), 10000, MAX_DBM, WAIT_TX))

                                                                                   ^~~~~~~~~~~

                                                                                   readRegister

Arduino_LoRa_SX12XX_Ping_Pong_LCD:460:14: error: 'class SX127XLT' has no member named 'readAckStatus'; did you mean 'readIrqStatus'?

   if (LT.readAckStatus()) {

          ^~~~~~~~~~~~~

          readIrqStatus

Arduino_LoRa_SX12XX_Ping_Pong_LCD:464:54: error: 'class SX127XLT' has no member named 'readPacketSNRinACK'; did you mean 'readPacketSNR'?

     sprintf((char*)message,"SNR at gw=%d   ", LT.readPacketSNRinACK());

                                                  ^~~~~~~~~~~~~~~~~~

                                                  readPacketSNR

exit status 1 'class SX127XLT' has no member named 'setPA_BOOST'; did you mean 'setDevicePABOOST'?

What I am doing wrong here? Thanks a lot

CongducPham commented 2 years ago

Hi, did you install our SX12XX lib?

https://github.com/CongducPham/LowCostLoRaGw/tree/master/Arduino/libraries/SX12XX

dimtsam commented 2 years ago

yes I did it. But it doesnt work 21211

88

CongducPham commented 2 years ago

Strange, sorry to insist but did you really get OUR modified version of the SX12XX lib? Not the official distribution from Stuart? regards,

dimtsam commented 2 years ago

I open the link https://github.com/CongducPham/LowCostLoRaGw/tree/master/Arduino/libraries/SX12XX. Where do I click then to download your modified library? Because I think you are right and it is the original and not the modified library that I have download. Thanks a lot for your time

CongducPham commented 2 years ago

The best way may be to get the whole repo (https://github.com/CongducPham/LowCostLoRaGw) then copy the SX12XX folder into your Arduino sketch/libraries folder

zaiplanet commented 2 years ago

I open the link https://github.com/CongducPham/LowCostLoRaGw/tree/master/Arduino/libraries/SX12XX. Where do I click then to download your modified library? Because I think you are right and it is the original and not the modified library that I have download. Thanks a lot for your time

i think you must use SX12XX lib from LowCostLoRaGw folder