Skip to content

Commit 26e3c23

Browse files
committed
Merge PR MalcolmRobb#75 (LimeSDR support);
fix conflicts; select limesdr rx antenna based on antenna metadata so it works on a mini, too.
2 parents 6a9700a + 9520740 commit 26e3c23

File tree

7 files changed

+518
-4
lines changed

7 files changed

+518
-4
lines changed

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ ifndef HACKRF
1818
HACKRF := $(shell pkg-config --exists libhackrf && echo "yes" || echo "no")
1919
endif
2020

21+
ifndef LIMESDR
22+
LIMESDR := $(shell pkg-config --exists LimeSuite && echo "yes" || echo "no")
23+
endif
24+
2125
CPPFLAGS += -DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\"
2226

2327
DIALECT = -std=c11
@@ -61,6 +65,13 @@ ifeq ($(HACKRF), yes)
6165
LIBS_SDR += $(shell pkg-config --libs libhackrf)
6266
endif
6367

68+
ifeq ($(LIMESDR), yes)
69+
SDR_OBJ += sdr_limesdr.o
70+
CPPFLAGS += -DENABLE_LIMESDR
71+
CFLAGS += $(shell pkg-config --cflags LimeSuite)
72+
LIBS_SDR += $(shell pkg-config --libs LimeSuite)
73+
endif
74+
6475
all: showconfig dump1090 view1090
6576

6677
showconfig:
@@ -69,6 +80,9 @@ showconfig:
6980
@echo " RTLSDR support: $(RTLSDR)" >&2
7081
@echo " BladeRF support: $(BLADERF)" >&2
7182
@echo " HackRF support: $(HACKRF)" >&2
83+
@echo " LimeSDR support: $(LIMESDR)" >&2
84+
85+
all: dump1090 view1090
7286

7387
%.o: %.c *.h
7488
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ This is packaged with jessie. `sudo apt-get install librtlsdr-dev`
4040

4141
This is packaged with jessie. `sudo apt-get install libhackrf-dev`
4242

43+
### Dependencies - LimeSDR
44+
45+
You will need a build of [LimeSuite](https://github.com/myriadrf/LimeSuite).
46+
See detailed instruction on [the official Wiki](https://wiki.myriadrf.org/Lime_Suite) how to build and install it.
47+
4348
### Actually building it
4449

4550
Nothing special, just build it (`dpkg-buildpackage -b`)
@@ -49,7 +54,7 @@ Nothing special, just build it (`dpkg-buildpackage -b`)
4954
First run `prepare-wheezy-tree.sh`. This will create a package tree in
5055
package-wheezy/. Build in there (`dpkg-buildpackage -b`)
5156

52-
The wheezy build does not include bladeRF nor HackRF support.
57+
The wheezy build does not include bladeRF, HackRF, or LimeSDR support.
5358

5459
## Building manually
5560

@@ -60,8 +65,11 @@ install them (and a method for starting them) yourself.
6065
``make BLADERF=no`` will disable bladeRF support and remove the dependency on
6166
libbladeRF.
6267

63-
``make RTLSDR=no`` will disable rtl-sdr support and remove the dependency on
68+
``make RTLSDR=no`` will disable rtl-sdr support and remove the dependency on
6469
librtlsdr.
6570

6671
``make HACKRF=no`` will disable HackRF support and remove the dependency on
67-
libhackrf.
72+
libhackrf.
73+
74+
``make LIMESDR=no`` will disable LimeSDR support and remove the dependency on
75+
libLimeSuite.

dump1090.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ static void showHelp(void) {
272272
#ifdef ENABLE_HACKRF
273273
"ENABLE_HACKRF "
274274
#endif
275+
#ifdef ENABLE_LIMESDR
276+
"ENABLE_LIMESDR "
277+
#endif
275278
#ifdef SC16Q11_TABLE_BITS
276279
// This is a little silly, but that's how the preprocessor works..
277280
#define _stringize(x) #x

dump1090.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ typedef enum {
280280
//======================== structure declarations =========================
281281

282282
typedef enum {
283-
SDR_NONE, SDR_IFILE, SDR_RTLSDR, SDR_BLADERF, SDR_HACKRF
283+
SDR_NONE, SDR_IFILE, SDR_RTLSDR, SDR_BLADERF, SDR_HACKRF, SDR_LIMESDR
284284
} sdr_type_t;
285285

286286
// Structure representing one magnitude buffer

sdr.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#ifdef ENABLE_HACKRF
3131
# include "sdr_hackrf.h"
3232
#endif
33+
#ifdef ENABLE_LIMESDR
34+
# include "sdr_limesdr.h"
35+
#endif
3336

3437
typedef struct {
3538
const char *name;
@@ -91,6 +94,9 @@ static sdr_handler sdr_handlers[] = {
9194
#ifdef ENABLE_HACKRF
9295
{ "hackrf", SDR_HACKRF, hackRFInitConfig, hackRFShowHelp, hackRFHandleOption, hackRFOpen, hackRFRun, hackRFClose },
9396
#endif
97+
#ifdef ENABLE_LIMESDR
98+
{ "limesdr", SDR_LIMESDR, limesdrInitConfig, limesdrShowHelp, limesdrHandleOption, limesdrOpen, limesdrRun, limesdrClose },
99+
#endif
94100

95101
{ "ifile", SDR_IFILE, ifileInitConfig, ifileShowHelp, ifileHandleOption, ifileOpen, ifileRun, ifileClose },
96102
{ "none", SDR_NONE, noInitConfig, noShowHelp, noHandleOption, noOpen, noRun, noClose },

0 commit comments

Comments
 (0)