Lora-net / packet_forwarder

A LoRa packet forwarder is a program running on the host of a LoRa gateway that forwards RF packets receive by the concentrator to a server through a IP/UDP link, and emits RF packets that are sent by the server. This project is associated to the lora_gateway repository for SX1301 chip. For SX1302/1303, the repository sx1302_hal must be used.
Other
722 stars 669 forks source link

error: too few arguments to function ‘lgw_start’ #152

Closed miracuruzrh closed 2 years ago

miracuruzrh commented 2 years ago

Hi

I want to compile the packet_forwarder. When I run the command sh ./compile.sh I get an error: "error: too few arguments to function ‘lgw_start’". I use a Raspberrypi Zero 2 with the bullseye version. If someone could help me to solve the error, that would be very nice. Please let me know if you need further information.

Here is the complete log:

 ✘ ⚡ root@lorapi  ~/packet_forwarder   master  sh ./compile.sh
make: Verzeichnis „/root/lora_gateway“ wird betreten
make all -e -C libloragw
make[1]: Verzeichnis „/root/lora_gateway/libloragw“ wird betreten
make[1]: Für das Ziel „all“ ist nichts zu tun.
make[1]: Verzeichnis „/root/lora_gateway/libloragw“ wird verlassen
make all -e -C util_pkt_logger
make[1]: Verzeichnis „/root/lora_gateway/util_pkt_logger“ wird betreten
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libloragw/inc src/util_pkt_logger.c -o obj/util_pkt_logger.o
src/util_pkt_logger.c: In function ‘main’:
src/util_pkt_logger.c:494:9: error: too few arguments to function ‘lgw_start’
  494 |     i = lgw_start();
      |         ^~~~~~~~~
In file included from src/util_pkt_logger.c:39:
../libloragw/inc/loragw_hal.h:342:5: note: declared here
  342 | int lgw_start(long speed);
      |     ^~~~~~~~~
make[1]: *** [Makefile:71: obj/util_pkt_logger.o] Fehler 1
make[1]: Verzeichnis „/root/lora_gateway/util_pkt_logger“ wird verlassen
make: *** [Makefile:11: all] Fehler 2
make: Verzeichnis „/root/lora_gateway“ wird verlassen
ERROR: Failed to compile ../lora_gateway
 ✘ ⚡ root@lorapi  ~/packet_forwarder   master  
mcoracin commented 2 years ago

Hello, There is no "speed" parameter to the lgw_start() function, so I guess the versions you are using are not aligned. https://github.com/Lora-net/lora_gateway/blob/a955619271b5d0a46d32e08150acfbc1eed183b7/libloragw/src/loragw_hal.c#L696 Best regards, Michael