TTN packet forwarder build failing for FTDI configuration

Hello All

I am trying to build TTN packet forwarder with FTDI by following the below installation instructions.

My build is failing due to the libftdi is not getting recognized in the path. below is the error

wrapper/…/lora_gateway/libloragw/libloragw.a(loragw_spi.o): In function Close': loragw_spi.ftdi.c:(.text+0x3c): undefined reference toftdi_set_bitmode’
loragw_spi.ftdi.c:(.text+0x44): undefined reference to ftdi_usb_close' loragw_spi.ftdi.c:(.text+0x4c): undefined reference toftdi_deinit’
wrapper/…/lora_gateway/libloragw/libloragw.a(loragw_spi.o): In function `raw_write’:

Can anyone help me to fix the problem?

Thank you

This is a little odd, as functions like ftdi_set_bitmode() do not appear in the loragw source where the link issue is being raised, but only in the libmpsse source.

Two things you could try would be to check the config.log for libmpsse, and possible modifying the loragw Makefile to explicitly link the ftdi library there.

While plugging a LoRa concentrator into a laptop sounds like fun, it may not be all that practical in the long run - for experiments something like a pi3 isn’t bad for building the code right on the device, or a small headless Linux PC. Deployable gateway platforms are a whole different topic…

1 Like

Hiii

Thank you for replying

Yes it is the libmpsse. The makefile is working correctly.

I have already added with flag -lftdi so build is working well.

I am running the go build script as given in the link.

CFG_SPI=ftdi PLATFORM=linux GOARCH=amd64 make build

I checked the make file in the packet_forworder directory

Vi .make/go/build.make

I tried to set CGOLDFLAGS that still not worked.

There is something with go build that is not picking up libftdi from the path.

Yes I understand this is problem of libmpsse but even after giving lib path is not picked up. Also I tried
-L/usr/lib/ -lftdi
That works well in Makefile of lorawga but when running from the make script of packet_forwarder is not picking up.

Ofcourse running over laptop is not for long term. Here I have a SoM with mini PCI express as USB. And the gateway is too mini PCI express module.

With rpi3 I have tested, that works very well.

Thank you

I have figured it out by putting lib path in the concentrator.go
Now it worked.

Just to share If the compilation is done on Raspberry pi there will not be any problem what I have faced.