Skip to content

Commit b45d410

Browse files
tweaks to docker and add sample NOAA config file
1 parent 5e5e46c commit b45d410

File tree

3 files changed

+158
-12
lines changed

3 files changed

+158
-12
lines changed

.vscode/c_cpp_properties.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"name": "Linux",
55
"includePath": [
66
"${workspaceFolder}/**",
7-
"${workspaceFolder}/build/_deps/googletest-src/googletest/include/"
7+
"${workspaceFolder}/build/_deps/googletest-src/googletest/include/",
8+
"${workspaceFolder}/build/src/"
89
],
910
"defines": [],
1011
"compilerPath": "/usr/bin/gcc",

Dockerfile

+12-11
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ RUN apt-get update && \
2323
apt-get clean && \
2424
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2525

26-
# set working dir for building rtl-sdr support
27-
WORKDIR /rtl_sdr_build
26+
# set working dir for compiling dependencies
27+
WORKDIR /build_dependencies
2828

2929
# compile / install rtl-sdr-blog version of rtl-sdr for v4 support
3030
RUN git clone https://github.com/rtlsdrblog/rtl-sdr-blog && \
@@ -88,7 +88,7 @@ RUN apt-get update && \
8888
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8989

9090
# install (from build container) rtl-sdr-blog version of rtl-sdr for v4 support
91-
COPY --from=build /rtl_sdr_build/librtlsdr0_*.deb /rtl_sdr_build/librtlsdr-dev_*.deb /rtl_sdr_build/rtl-sdr_*.deb /tmp/
91+
COPY --from=build /build_dependencies/librtlsdr0_*.deb /build_dependencies/librtlsdr-dev_*.deb /build_dependencies/rtl-sdr_*.deb /tmp/
9292
RUN dpkg -i /tmp/librtlsdr0_*.deb && \
9393
dpkg -i /tmp/librtlsdr-dev_*.deb && \
9494
dpkg -i /tmp/rtl-sdr_*.deb && \
@@ -98,18 +98,19 @@ RUN dpkg -i /tmp/librtlsdr0_*.deb && \
9898
echo 'blacklist rtl2832' | tee --append /etc/modprobe.d/rtl_sdr.conf && \
9999
echo 'blacklist rtl2830' | tee --append /etc/modprobe.d/rtl_sdr.conf
100100

101-
# install (from build container) libmirisdr-4
101+
# copy (from build container) libmirisdr-4 library
102102
COPY --from=build /usr/local/lib/libmirisdr.so.4 /usr/local/lib/
103103

104104
# Copy rtl_airband from the build container
105-
COPY LICENSE /opt/rtl_airband/
106-
COPY --from=build /rtl_airband_build/build_dir/src/unittests /opt/rtl_airband/
107-
COPY --from=build /rtl_airband_build/build_dir/src/rtl_airband /opt/rtl_airband/
108-
RUN chmod a+x /opt/rtl_airband/unittests /opt/rtl_airband/rtl_airband
105+
COPY LICENSE /app/
106+
COPY --from=build /rtl_airband_build/build_dir/src/unittests /app/
107+
COPY --from=build /rtl_airband_build/build_dir/src/rtl_airband /app/
108+
RUN chmod a+x /app/unittests /app/rtl_airband
109109

110110
# make sure unit tests pass
111-
RUN /opt/rtl_airband/unittests
111+
RUN /app/unittests
112112

113-
# Use tini as init and run rtl_airband
113+
# Use tini as init and run rtl_airband from /app/
114114
ENTRYPOINT ["/usr/bin/tini", "--"]
115-
CMD ["/opt/rtl_airband/rtl_airband", "-F", "-e"]
115+
WORKDIR /app/
116+
CMD ["/app/rtl_airband", "-F", "-e", "-c", "/app/rtl_airband.conf"]

config/noaa.conf

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
fft_size = 1024;
2+
localtime = true;
3+
multiple_demod_threads = true;
4+
multiple_output_threads = true;
5+
devices:
6+
(
7+
{
8+
type = "rtlsdr";
9+
index = 0;
10+
gain = 19.7;
11+
centerfreq = 162.48200;
12+
correction = 0;
13+
sample_rate = 2.40;
14+
channels:
15+
(
16+
{
17+
freq = 162.40000;
18+
label = "NOAA 162.400";
19+
modulation = "nfm";
20+
lowpass = -1;
21+
highpass = -1;
22+
bandwidth = 5000;
23+
ampfactor = 2.00;
24+
squelch_snr_threshold = 0.00;
25+
outputs:
26+
(
27+
{
28+
type = "file";
29+
directory = "/recordings";
30+
filename_template = "NOAA_162.400";
31+
}
32+
);
33+
},
34+
{
35+
freq = 162.42500;
36+
label = "NOAA 162.425";
37+
modulation = "nfm";
38+
lowpass = -1;
39+
highpass = -1;
40+
bandwidth = 5000;
41+
ampfactor = 2.00;
42+
squelch_snr_threshold = 0.00;
43+
outputs:
44+
(
45+
{
46+
type = "file";
47+
directory = "/recordings";
48+
filename_template = "NOAA_162.425";
49+
}
50+
);
51+
},
52+
{
53+
freq = 162.45000;
54+
label = "NOAA 162.450";
55+
modulation = "nfm";
56+
lowpass = -1;
57+
highpass = -1;
58+
bandwidth = 5000;
59+
ampfactor = 2.00;
60+
squelch_snr_threshold = 0.00;
61+
outputs:
62+
(
63+
{
64+
type = "file";
65+
directory = "/recordings";
66+
filename_template = "NOAA_162.450";
67+
}
68+
);
69+
},
70+
{
71+
freq = 162.47500;
72+
label = "NOAA 162.475";
73+
modulation = "nfm";
74+
lowpass = -1;
75+
highpass = -1;
76+
bandwidth = 5000;
77+
ampfactor = 2.00;
78+
squelch_snr_threshold = 0.00;
79+
outputs:
80+
(
81+
{
82+
type = "file";
83+
directory = "/recordings";
84+
filename_template = "NOAA_162.475";
85+
}
86+
);
87+
},
88+
{
89+
freq = 162.50000;
90+
label = "NOAA 162.500";
91+
modulation = "nfm";
92+
lowpass = -1;
93+
highpass = -1;
94+
bandwidth = 5000;
95+
ampfactor = 2.00;
96+
squelch_snr_threshold = 0.00;
97+
outputs:
98+
(
99+
{
100+
type = "file";
101+
directory = "/recordings";
102+
filename_template = "NOAA_162.500";
103+
}
104+
);
105+
},
106+
{
107+
freq = 162.52500;
108+
label = "NOAA 162.525";
109+
modulation = "nfm";
110+
lowpass = -1;
111+
highpass = -1;
112+
bandwidth = 5000;
113+
ampfactor = 2.00;
114+
squelch_snr_threshold = 0.00;
115+
outputs:
116+
(
117+
{
118+
type = "file";
119+
directory = "/recordings";
120+
filename_template = "NOAA_162.525";
121+
}
122+
);
123+
},
124+
{
125+
freq = 162.55000;
126+
label = "NOAA 162.550";
127+
modulation = "nfm";
128+
lowpass = -1;
129+
highpass = -1;
130+
bandwidth = 5000;
131+
ampfactor = 2.00;
132+
squelch_snr_threshold = 0.00;
133+
outputs:
134+
(
135+
{
136+
type = "file";
137+
directory = "/recordings";
138+
filename_template = "NOAA_162.550";
139+
}
140+
);
141+
}
142+
);
143+
}
144+
);

0 commit comments

Comments
 (0)