├── .gitignore
├── CONTRIBUTING.md
├── CONTRIBUTORS
├── ICLA.txt
├── LICENSE.txt
├── README.md
├── config_webrx.py
├── csdr.py
├── htdocs
├── favicon.ico
├── gfx
│ ├── font-expletus-sans
│ │ ├── ExpletusSans-Medium.ttf
│ │ └── OFL.txt
│ ├── openwebrx-3d-spectrum.png
│ ├── openwebrx-avatar-background.png
│ ├── openwebrx-avatar.png
│ ├── openwebrx-background-cool-blue.png
│ ├── openwebrx-background-lingrad.png
│ ├── openwebrx-ha5kfu-top-logo.png
│ ├── openwebrx-logo-big.png
│ ├── openwebrx-panel-log.png
│ ├── openwebrx-panel-receiver.png
│ ├── openwebrx-panel-status.png
│ ├── openwebrx-play-button.png
│ ├── openwebrx-rx-details-arrow-up.png
│ ├── openwebrx-rx-details-arrow.png
│ ├── openwebrx-scale-background.png
│ ├── openwebrx-speaker-muted.png
│ ├── openwebrx-speaker.png
│ ├── openwebrx-squelch-button.png
│ ├── openwebrx-top-logo.png
│ ├── openwebrx-top-photo.jpg
│ ├── openwebrx-waterfall-auto.png
│ ├── openwebrx-waterfall-default.png
│ ├── openwebrx-zoom-in-total.png
│ ├── openwebrx-zoom-in.png
│ ├── openwebrx-zoom-out-total.png
│ └── openwebrx-zoom-out.png
├── inactive.html
├── index.wrx
├── jquery-3.2.1.min.js
├── jquery.nanoscroller.js
├── mathbox-bundle.min.js
├── mathbox.css
├── nanoscroller.css
├── openwebrx.css
├── openwebrx.js
├── retry.html
├── sdr.js
└── upgrade.html
├── openwebrx.py
├── rxws.py
└── sdrhu.py
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | *.swp
3 | tags
4 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | First of all, thank you for taking the time to contribute to this project!
2 |
3 | Before I can accept your contributions, I need a signed copy of the Individual Contributor License Agreement (ICLA) from you, which is available here.
4 |
5 | The ICLA is needed because it will allow me to dual license the OpenWebRX project under AGPL and a commercial license.
6 | I will also apply dual licensing to csdr, but only those parts that are original work (e.g. without the parts enabled by `-DUSE_IMA_ADPCM`; code taken from other projects is clearly separable).
7 |
8 | However, even if there is commercial interest in the projects, I promise to keep them as open as possible, keeping my original intention to provide an open-source web-based SDR receiver software to the amateur radio operators and SDR enthusiasts.
9 |
10 | This contributor agreement is based on the one of Apache Software Foundation, with some modifications. (You can review differences here).
11 | When you contribute for the first time, I will send you the ICLA. Replying with only the information requested and the text "I Agree" is sufficient.
12 |
13 | Thanks,
14 |
15 | Andras, HA7ILM
16 |
--------------------------------------------------------------------------------
/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | This is a list of the great people who contributed code to the OpenWebRX repository. (Names are sorted alphabetically.)
2 |
3 | Gnoxter
4 | John Seamons, ZL/KF6VO
5 |
6 |
--------------------------------------------------------------------------------
/ICLA.txt:
--------------------------------------------------------------------------------
1 | Individual Contributor License Agreement ("Agreement")
2 |
3 | In order to clarify the intellectual property license granted
4 | with Contributions from any person or entity, Retzler András
5 | (hereinafter referred to as "Project Owner") must have a
6 | Contributor License Agreement ("CLA") on file that has
7 | been signed by each Contributor, indicating agreement to the license
8 | terms below. This license is for your protection as a Contributor as
9 | well as the protection of the Project Owner; it does not change your
10 | rights to use your own Contributions for any other purpose.
11 | Please read this document carefully before signing and keep a copy
12 | for your records.
13 |
14 | Full name: ______________________________________________________
15 |
16 | (optional) Public name: _________________________________________
17 |
18 | Mailing Address: ________________________________________________
19 |
20 | ________________________________________________
21 |
22 | Country: ______________________________________________________
23 |
24 | (optional) Telephone: ___________________________________________
25 |
26 | E-Mail: ______________________________________________________
27 |
28 | You accept and agree to the following terms and conditions for Your
29 | present and future Contributions submitted to the Project Owner.
30 |
31 | Except for the license granted herein to the Project Owner and recipients
32 | of software distributed by the Project Owner, You reserve all right, title,
33 | and interest in and to Your Contributions.
34 |
35 | 1. Definitions.
36 |
37 | "You" (or "Your") shall mean the copyright owner or legal entity
38 | authorized by the copyright owner that is making this Agreement
39 | with the Project Owner. For legal entities, the entity making a
40 | Contribution and all other entities that control, are controlled
41 | by, or are under common control with that entity are considered to
42 | be a single Contributor. For the purposes of this definition,
43 | "control" means (i) the power, direct or indirect, to cause the
44 | direction or management of such entity, whether by contract or
45 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
46 | outstanding shares, or (iii) beneficial ownership of such entity.
47 |
48 | "Contribution" shall mean any original work of authorship,
49 | including any modifications or additions to an existing work, that
50 | is intentionally submitted by You to the Project Owner for inclusion
51 | in, or documentation of, any of the products owned or managed by
52 | the Project Owner (the "Work"). For the purposes of this definition,
53 | "submitted" means any form of electronic, verbal, or written
54 | communication sent to the Project Owner or its representatives,
55 | including but not limited to communication on electronic mailing
56 | lists, source code control systems, and issue tracking systems that
57 | are managed by, or on behalf of, the Project Owner for the purpose of
58 | discussing and improving the Work, but excluding communication that
59 | is conspicuously marked or otherwise designated in writing by You
60 | as "Not a Contribution."
61 |
62 | 2. Grant of Copyright License. Subject to the terms and conditions of
63 | this Agreement, You hereby grant to the Project Owner and to
64 | recipients of software distributed by the Project Owner a perpetual,
65 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66 | copyright license to reproduce, prepare derivative works of,
67 | publicly display, publicly perform, sublicense, and distribute Your
68 | Contributions and such derivative works.
69 |
70 | 3. Grant of Patent License. Subject to the terms and conditions of
71 | this Agreement, You hereby grant to the Project Owner and to
72 | recipients of software distributed by the Project Owner a perpetual,
73 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74 | (except as stated in this section) patent license to make, have
75 | made, use, offer to sell, sell, import, and otherwise transfer the
76 | Work, where such license applies only to those patent claims
77 | licensable by You that are necessarily infringed by Your
78 | Contribution(s) alone or by combination of Your Contribution(s)
79 | with the Work to which such Contribution(s) was submitted. If any
80 | entity institutes patent litigation against You or any other entity
81 | (including a cross-claim or counterclaim in a lawsuit) alleging
82 | that your Contribution, or the Work to which you have contributed,
83 | constitutes direct or contributory patent infringement, then any
84 | patent licenses granted to that entity under this Agreement for
85 | that Contribution or Work shall terminate as of the date such
86 | litigation is filed.
87 |
88 | 4. You represent that you are legally entitled to grant the above
89 | license. If your employer(s) has rights to intellectual property
90 | that you create that includes your Contributions, you represent
91 | that you have received permission to make Contributions on behalf
92 | of that employer, that your employer has waived such rights for
93 | your Contributions to the Project Owner, or that your employer has
94 | executed a separate Corporate CLA with the Project Owner.
95 |
96 | 5. You represent that each of Your Contributions is Your original
97 | creation (see section 7 for submissions on behalf of others). You
98 | represent that Your Contribution submissions include complete
99 | details of any third-party license or other restriction (including,
100 | but not limited to, related patents and trademarks) of which you
101 | are personally aware and which are associated with any part of Your
102 | Contributions.
103 |
104 | 6. You are not expected to provide support for Your Contributions,
105 | except to the extent You desire to provide support. You may provide
106 | support for free, for a fee, or not at all. Unless required by
107 | applicable law or agreed to in writing, You provide Your
108 | Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
109 | OF ANY KIND, either express or implied, including, without
110 | limitation, any warranties or conditions of TITLE, NON-
111 | INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
112 |
113 | 7. Should You wish to submit work that is not Your original creation,
114 | You may submit it to the Project Owner separately from any
115 | Contribution, identifying the complete details of its source and of
116 | any license or other restriction (including, but not limited to,
117 | related patents, trademarks, and license agreements) of which you
118 | are personally aware, and conspicuously marking the work as
119 | "Submitted on behalf of a third-party: [named here]".
120 |
121 | 8. You agree to notify the Project Owner of any facts or circumstances of
122 | which you become aware that would make these representations
123 | inaccurate in any respect.
124 |
125 | Please sign: __________________________________ Date: ________________
126 |
127 | Text derived from the Apache Individual Contributor License Agreement
128 | ("Agreement") V2.0, available at http://apache.org/licenses/icla.txt
129 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU AFFERO GENERAL PUBLIC LICENSE
2 | Version 3, 19 November 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU Affero General Public License is a free, copyleft license for
11 | software and other kinds of works, specifically designed to ensure
12 | cooperation with the community in the case of network server software.
13 |
14 | The licenses for most software and other practical works are designed
15 | to take away your freedom to share and change the works. By contrast,
16 | our General Public Licenses are intended to guarantee your freedom to
17 | share and change all versions of a program--to make sure it remains free
18 | software for all its users.
19 |
20 | When we speak of free software, we are referring to freedom, not
21 | price. Our General Public Licenses are designed to make sure that you
22 | have the freedom to distribute copies of free software (and charge for
23 | them if you wish), that you receive source code or can get it if you
24 | want it, that you can change the software or use pieces of it in new
25 | free programs, and that you know you can do these things.
26 |
27 | Developers that use our General Public Licenses protect your rights
28 | with two steps: (1) assert copyright on the software, and (2) offer
29 | you this License which gives you legal permission to copy, distribute
30 | and/or modify the software.
31 |
32 | A secondary benefit of defending all users' freedom is that
33 | improvements made in alternate versions of the program, if they
34 | receive widespread use, become available for other developers to
35 | incorporate. Many developers of free software are heartened and
36 | encouraged by the resulting cooperation. However, in the case of
37 | software used on network servers, this result may fail to come about.
38 | The GNU General Public License permits making a modified version and
39 | letting the public access it on a server without ever releasing its
40 | source code to the public.
41 |
42 | The GNU Affero General Public License is designed specifically to
43 | ensure that, in such cases, the modified source code becomes available
44 | to the community. It requires the operator of a network server to
45 | provide the source code of the modified version running there to the
46 | users of that server. Therefore, public use of a modified version, on
47 | a publicly accessible server, gives the public access to the source
48 | code of the modified version.
49 |
50 | An older license, called the Affero General Public License and
51 | published by Affero, was designed to accomplish similar goals. This is
52 | a different license, not a version of the Affero GPL, but Affero has
53 | released a new version of the Affero GPL which permits relicensing under
54 | this license.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | TERMS AND CONDITIONS
60 |
61 | 0. Definitions.
62 |
63 | "This License" refers to version 3 of the GNU Affero General Public License.
64 |
65 | "Copyright" also means copyright-like laws that apply to other kinds of
66 | works, such as semiconductor masks.
67 |
68 | "The Program" refers to any copyrightable work licensed under this
69 | License. Each licensee is addressed as "you". "Licensees" and
70 | "recipients" may be individuals or organizations.
71 |
72 | To "modify" a work means to copy from or adapt all or part of the work
73 | in a fashion requiring copyright permission, other than the making of an
74 | exact copy. The resulting work is called a "modified version" of the
75 | earlier work or a work "based on" the earlier work.
76 |
77 | A "covered work" means either the unmodified Program or a work based
78 | on the Program.
79 |
80 | To "propagate" a work means to do anything with it that, without
81 | permission, would make you directly or secondarily liable for
82 | infringement under applicable copyright law, except executing it on a
83 | computer or modifying a private copy. Propagation includes copying,
84 | distribution (with or without modification), making available to the
85 | public, and in some countries other activities as well.
86 |
87 | To "convey" a work means any kind of propagation that enables other
88 | parties to make or receive copies. Mere interaction with a user through
89 | a computer network, with no transfer of a copy, is not conveying.
90 |
91 | An interactive user interface displays "Appropriate Legal Notices"
92 | to the extent that it includes a convenient and prominently visible
93 | feature that (1) displays an appropriate copyright notice, and (2)
94 | tells the user that there is no warranty for the work (except to the
95 | extent that warranties are provided), that licensees may convey the
96 | work under this License, and how to view a copy of this License. If
97 | the interface presents a list of user commands or options, such as a
98 | menu, a prominent item in the list meets this criterion.
99 |
100 | 1. Source Code.
101 |
102 | The "source code" for a work means the preferred form of the work
103 | for making modifications to it. "Object code" means any non-source
104 | form of a work.
105 |
106 | A "Standard Interface" means an interface that either is an official
107 | standard defined by a recognized standards body, or, in the case of
108 | interfaces specified for a particular programming language, one that
109 | is widely used among developers working in that language.
110 |
111 | The "System Libraries" of an executable work include anything, other
112 | than the work as a whole, that (a) is included in the normal form of
113 | packaging a Major Component, but which is not part of that Major
114 | Component, and (b) serves only to enable use of the work with that
115 | Major Component, or to implement a Standard Interface for which an
116 | implementation is available to the public in source code form. A
117 | "Major Component", in this context, means a major essential component
118 | (kernel, window system, and so on) of the specific operating system
119 | (if any) on which the executable work runs, or a compiler used to
120 | produce the work, or an object code interpreter used to run it.
121 |
122 | The "Corresponding Source" for a work in object code form means all
123 | the source code needed to generate, install, and (for an executable
124 | work) run the object code and to modify the work, including scripts to
125 | control those activities. However, it does not include the work's
126 | System Libraries, or general-purpose tools or generally available free
127 | programs which are used unmodified in performing those activities but
128 | which are not part of the work. For example, Corresponding Source
129 | includes interface definition files associated with source files for
130 | the work, and the source code for shared libraries and dynamically
131 | linked subprograms that the work is specifically designed to require,
132 | such as by intimate data communication or control flow between those
133 | subprograms and other parts of the work.
134 |
135 | The Corresponding Source need not include anything that users
136 | can regenerate automatically from other parts of the Corresponding
137 | Source.
138 |
139 | The Corresponding Source for a work in source code form is that
140 | same work.
141 |
142 | 2. Basic Permissions.
143 |
144 | All rights granted under this License are granted for the term of
145 | copyright on the Program, and are irrevocable provided the stated
146 | conditions are met. This License explicitly affirms your unlimited
147 | permission to run the unmodified Program. The output from running a
148 | covered work is covered by this License only if the output, given its
149 | content, constitutes a covered work. This License acknowledges your
150 | rights of fair use or other equivalent, as provided by copyright law.
151 |
152 | You may make, run and propagate covered works that you do not
153 | convey, without conditions so long as your license otherwise remains
154 | in force. You may convey covered works to others for the sole purpose
155 | of having them make modifications exclusively for you, or provide you
156 | with facilities for running those works, provided that you comply with
157 | the terms of this License in conveying all material for which you do
158 | not control copyright. Those thus making or running the covered works
159 | for you must do so exclusively on your behalf, under your direction
160 | and control, on terms that prohibit them from making any copies of
161 | your copyrighted material outside their relationship with you.
162 |
163 | Conveying under any other circumstances is permitted solely under
164 | the conditions stated below. Sublicensing is not allowed; section 10
165 | makes it unnecessary.
166 |
167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168 |
169 | No covered work shall be deemed part of an effective technological
170 | measure under any applicable law fulfilling obligations under article
171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172 | similar laws prohibiting or restricting circumvention of such
173 | measures.
174 |
175 | When you convey a covered work, you waive any legal power to forbid
176 | circumvention of technological measures to the extent such circumvention
177 | is effected by exercising rights under this License with respect to
178 | the covered work, and you disclaim any intention to limit operation or
179 | modification of the work as a means of enforcing, against the work's
180 | users, your or third parties' legal rights to forbid circumvention of
181 | technological measures.
182 |
183 | 4. Conveying Verbatim Copies.
184 |
185 | You may convey verbatim copies of the Program's source code as you
186 | receive it, in any medium, provided that you conspicuously and
187 | appropriately publish on each copy an appropriate copyright notice;
188 | keep intact all notices stating that this License and any
189 | non-permissive terms added in accord with section 7 apply to the code;
190 | keep intact all notices of the absence of any warranty; and give all
191 | recipients a copy of this License along with the Program.
192 |
193 | You may charge any price or no price for each copy that you convey,
194 | and you may offer support or warranty protection for a fee.
195 |
196 | 5. Conveying Modified Source Versions.
197 |
198 | You may convey a work based on the Program, or the modifications to
199 | produce it from the Program, in the form of source code under the
200 | terms of section 4, provided that you also meet all of these conditions:
201 |
202 | a) The work must carry prominent notices stating that you modified
203 | it, and giving a relevant date.
204 |
205 | b) The work must carry prominent notices stating that it is
206 | released under this License and any conditions added under section
207 | 7. This requirement modifies the requirement in section 4 to
208 | "keep intact all notices".
209 |
210 | c) You must license the entire work, as a whole, under this
211 | License to anyone who comes into possession of a copy. This
212 | License will therefore apply, along with any applicable section 7
213 | additional terms, to the whole of the work, and all its parts,
214 | regardless of how they are packaged. This License gives no
215 | permission to license the work in any other way, but it does not
216 | invalidate such permission if you have separately received it.
217 |
218 | d) If the work has interactive user interfaces, each must display
219 | Appropriate Legal Notices; however, if the Program has interactive
220 | interfaces that do not display Appropriate Legal Notices, your
221 | work need not make them do so.
222 |
223 | A compilation of a covered work with other separate and independent
224 | works, which are not by their nature extensions of the covered work,
225 | and which are not combined with it such as to form a larger program,
226 | in or on a volume of a storage or distribution medium, is called an
227 | "aggregate" if the compilation and its resulting copyright are not
228 | used to limit the access or legal rights of the compilation's users
229 | beyond what the individual works permit. Inclusion of a covered work
230 | in an aggregate does not cause this License to apply to the other
231 | parts of the aggregate.
232 |
233 | 6. Conveying Non-Source Forms.
234 |
235 | You may convey a covered work in object code form under the terms
236 | of sections 4 and 5, provided that you also convey the
237 | machine-readable Corresponding Source under the terms of this License,
238 | in one of these ways:
239 |
240 | a) Convey the object code in, or embodied in, a physical product
241 | (including a physical distribution medium), accompanied by the
242 | Corresponding Source fixed on a durable physical medium
243 | customarily used for software interchange.
244 |
245 | b) Convey the object code in, or embodied in, a physical product
246 | (including a physical distribution medium), accompanied by a
247 | written offer, valid for at least three years and valid for as
248 | long as you offer spare parts or customer support for that product
249 | model, to give anyone who possesses the object code either (1) a
250 | copy of the Corresponding Source for all the software in the
251 | product that is covered by this License, on a durable physical
252 | medium customarily used for software interchange, for a price no
253 | more than your reasonable cost of physically performing this
254 | conveying of source, or (2) access to copy the
255 | Corresponding Source from a network server at no charge.
256 |
257 | c) Convey individual copies of the object code with a copy of the
258 | written offer to provide the Corresponding Source. This
259 | alternative is allowed only occasionally and noncommercially, and
260 | only if you received the object code with such an offer, in accord
261 | with subsection 6b.
262 |
263 | d) Convey the object code by offering access from a designated
264 | place (gratis or for a charge), and offer equivalent access to the
265 | Corresponding Source in the same way through the same place at no
266 | further charge. You need not require recipients to copy the
267 | Corresponding Source along with the object code. If the place to
268 | copy the object code is a network server, the Corresponding Source
269 | may be on a different server (operated by you or a third party)
270 | that supports equivalent copying facilities, provided you maintain
271 | clear directions next to the object code saying where to find the
272 | Corresponding Source. Regardless of what server hosts the
273 | Corresponding Source, you remain obligated to ensure that it is
274 | available for as long as needed to satisfy these requirements.
275 |
276 | e) Convey the object code using peer-to-peer transmission, provided
277 | you inform other peers where the object code and Corresponding
278 | Source of the work are being offered to the general public at no
279 | charge under subsection 6d.
280 |
281 | A separable portion of the object code, whose source code is excluded
282 | from the Corresponding Source as a System Library, need not be
283 | included in conveying the object code work.
284 |
285 | A "User Product" is either (1) a "consumer product", which means any
286 | tangible personal property which is normally used for personal, family,
287 | or household purposes, or (2) anything designed or sold for incorporation
288 | into a dwelling. In determining whether a product is a consumer product,
289 | doubtful cases shall be resolved in favor of coverage. For a particular
290 | product received by a particular user, "normally used" refers to a
291 | typical or common use of that class of product, regardless of the status
292 | of the particular user or of the way in which the particular user
293 | actually uses, or expects or is expected to use, the product. A product
294 | is a consumer product regardless of whether the product has substantial
295 | commercial, industrial or non-consumer uses, unless such uses represent
296 | the only significant mode of use of the product.
297 |
298 | "Installation Information" for a User Product means any methods,
299 | procedures, authorization keys, or other information required to install
300 | and execute modified versions of a covered work in that User Product from
301 | a modified version of its Corresponding Source. The information must
302 | suffice to ensure that the continued functioning of the modified object
303 | code is in no case prevented or interfered with solely because
304 | modification has been made.
305 |
306 | If you convey an object code work under this section in, or with, or
307 | specifically for use in, a User Product, and the conveying occurs as
308 | part of a transaction in which the right of possession and use of the
309 | User Product is transferred to the recipient in perpetuity or for a
310 | fixed term (regardless of how the transaction is characterized), the
311 | Corresponding Source conveyed under this section must be accompanied
312 | by the Installation Information. But this requirement does not apply
313 | if neither you nor any third party retains the ability to install
314 | modified object code on the User Product (for example, the work has
315 | been installed in ROM).
316 |
317 | The requirement to provide Installation Information does not include a
318 | requirement to continue to provide support service, warranty, or updates
319 | for a work that has been modified or installed by the recipient, or for
320 | the User Product in which it has been modified or installed. Access to a
321 | network may be denied when the modification itself materially and
322 | adversely affects the operation of the network or violates the rules and
323 | protocols for communication across the network.
324 |
325 | Corresponding Source conveyed, and Installation Information provided,
326 | in accord with this section must be in a format that is publicly
327 | documented (and with an implementation available to the public in
328 | source code form), and must require no special password or key for
329 | unpacking, reading or copying.
330 |
331 | 7. Additional Terms.
332 |
333 | "Additional permissions" are terms that supplement the terms of this
334 | License by making exceptions from one or more of its conditions.
335 | Additional permissions that are applicable to the entire Program shall
336 | be treated as though they were included in this License, to the extent
337 | that they are valid under applicable law. If additional permissions
338 | apply only to part of the Program, that part may be used separately
339 | under those permissions, but the entire Program remains governed by
340 | this License without regard to the additional permissions.
341 |
342 | When you convey a copy of a covered work, you may at your option
343 | remove any additional permissions from that copy, or from any part of
344 | it. (Additional permissions may be written to require their own
345 | removal in certain cases when you modify the work.) You may place
346 | additional permissions on material, added by you to a covered work,
347 | for which you have or can give appropriate copyright permission.
348 |
349 | Notwithstanding any other provision of this License, for material you
350 | add to a covered work, you may (if authorized by the copyright holders of
351 | that material) supplement the terms of this License with terms:
352 |
353 | a) Disclaiming warranty or limiting liability differently from the
354 | terms of sections 15 and 16 of this License; or
355 |
356 | b) Requiring preservation of specified reasonable legal notices or
357 | author attributions in that material or in the Appropriate Legal
358 | Notices displayed by works containing it; or
359 |
360 | c) Prohibiting misrepresentation of the origin of that material, or
361 | requiring that modified versions of such material be marked in
362 | reasonable ways as different from the original version; or
363 |
364 | d) Limiting the use for publicity purposes of names of licensors or
365 | authors of the material; or
366 |
367 | e) Declining to grant rights under trademark law for use of some
368 | trade names, trademarks, or service marks; or
369 |
370 | f) Requiring indemnification of licensors and authors of that
371 | material by anyone who conveys the material (or modified versions of
372 | it) with contractual assumptions of liability to the recipient, for
373 | any liability that these contractual assumptions directly impose on
374 | those licensors and authors.
375 |
376 | All other non-permissive additional terms are considered "further
377 | restrictions" within the meaning of section 10. If the Program as you
378 | received it, or any part of it, contains a notice stating that it is
379 | governed by this License along with a term that is a further
380 | restriction, you may remove that term. If a license document contains
381 | a further restriction but permits relicensing or conveying under this
382 | License, you may add to a covered work material governed by the terms
383 | of that license document, provided that the further restriction does
384 | not survive such relicensing or conveying.
385 |
386 | If you add terms to a covered work in accord with this section, you
387 | must place, in the relevant source files, a statement of the
388 | additional terms that apply to those files, or a notice indicating
389 | where to find the applicable terms.
390 |
391 | Additional terms, permissive or non-permissive, may be stated in the
392 | form of a separately written license, or stated as exceptions;
393 | the above requirements apply either way.
394 |
395 | 8. Termination.
396 |
397 | You may not propagate or modify a covered work except as expressly
398 | provided under this License. Any attempt otherwise to propagate or
399 | modify it is void, and will automatically terminate your rights under
400 | this License (including any patent licenses granted under the third
401 | paragraph of section 11).
402 |
403 | However, if you cease all violation of this License, then your
404 | license from a particular copyright holder is reinstated (a)
405 | provisionally, unless and until the copyright holder explicitly and
406 | finally terminates your license, and (b) permanently, if the copyright
407 | holder fails to notify you of the violation by some reasonable means
408 | prior to 60 days after the cessation.
409 |
410 | Moreover, your license from a particular copyright holder is
411 | reinstated permanently if the copyright holder notifies you of the
412 | violation by some reasonable means, this is the first time you have
413 | received notice of violation of this License (for any work) from that
414 | copyright holder, and you cure the violation prior to 30 days after
415 | your receipt of the notice.
416 |
417 | Termination of your rights under this section does not terminate the
418 | licenses of parties who have received copies or rights from you under
419 | this License. If your rights have been terminated and not permanently
420 | reinstated, you do not qualify to receive new licenses for the same
421 | material under section 10.
422 |
423 | 9. Acceptance Not Required for Having Copies.
424 |
425 | You are not required to accept this License in order to receive or
426 | run a copy of the Program. Ancillary propagation of a covered work
427 | occurring solely as a consequence of using peer-to-peer transmission
428 | to receive a copy likewise does not require acceptance. However,
429 | nothing other than this License grants you permission to propagate or
430 | modify any covered work. These actions infringe copyright if you do
431 | not accept this License. Therefore, by modifying or propagating a
432 | covered work, you indicate your acceptance of this License to do so.
433 |
434 | 10. Automatic Licensing of Downstream Recipients.
435 |
436 | Each time you convey a covered work, the recipient automatically
437 | receives a license from the original licensors, to run, modify and
438 | propagate that work, subject to this License. You are not responsible
439 | for enforcing compliance by third parties with this License.
440 |
441 | An "entity transaction" is a transaction transferring control of an
442 | organization, or substantially all assets of one, or subdividing an
443 | organization, or merging organizations. If propagation of a covered
444 | work results from an entity transaction, each party to that
445 | transaction who receives a copy of the work also receives whatever
446 | licenses to the work the party's predecessor in interest had or could
447 | give under the previous paragraph, plus a right to possession of the
448 | Corresponding Source of the work from the predecessor in interest, if
449 | the predecessor has it or can get it with reasonable efforts.
450 |
451 | You may not impose any further restrictions on the exercise of the
452 | rights granted or affirmed under this License. For example, you may
453 | not impose a license fee, royalty, or other charge for exercise of
454 | rights granted under this License, and you may not initiate litigation
455 | (including a cross-claim or counterclaim in a lawsuit) alleging that
456 | any patent claim is infringed by making, using, selling, offering for
457 | sale, or importing the Program or any portion of it.
458 |
459 | 11. Patents.
460 |
461 | A "contributor" is a copyright holder who authorizes use under this
462 | License of the Program or a work on which the Program is based. The
463 | work thus licensed is called the contributor's "contributor version".
464 |
465 | A contributor's "essential patent claims" are all patent claims
466 | owned or controlled by the contributor, whether already acquired or
467 | hereafter acquired, that would be infringed by some manner, permitted
468 | by this License, of making, using, or selling its contributor version,
469 | but do not include claims that would be infringed only as a
470 | consequence of further modification of the contributor version. For
471 | purposes of this definition, "control" includes the right to grant
472 | patent sublicenses in a manner consistent with the requirements of
473 | this License.
474 |
475 | Each contributor grants you a non-exclusive, worldwide, royalty-free
476 | patent license under the contributor's essential patent claims, to
477 | make, use, sell, offer for sale, import and otherwise run, modify and
478 | propagate the contents of its contributor version.
479 |
480 | In the following three paragraphs, a "patent license" is any express
481 | agreement or commitment, however denominated, not to enforce a patent
482 | (such as an express permission to practice a patent or covenant not to
483 | sue for patent infringement). To "grant" such a patent license to a
484 | party means to make such an agreement or commitment not to enforce a
485 | patent against the party.
486 |
487 | If you convey a covered work, knowingly relying on a patent license,
488 | and the Corresponding Source of the work is not available for anyone
489 | to copy, free of charge and under the terms of this License, through a
490 | publicly available network server or other readily accessible means,
491 | then you must either (1) cause the Corresponding Source to be so
492 | available, or (2) arrange to deprive yourself of the benefit of the
493 | patent license for this particular work, or (3) arrange, in a manner
494 | consistent with the requirements of this License, to extend the patent
495 | license to downstream recipients. "Knowingly relying" means you have
496 | actual knowledge that, but for the patent license, your conveying the
497 | covered work in a country, or your recipient's use of the covered work
498 | in a country, would infringe one or more identifiable patents in that
499 | country that you have reason to believe are valid.
500 |
501 | If, pursuant to or in connection with a single transaction or
502 | arrangement, you convey, or propagate by procuring conveyance of, a
503 | covered work, and grant a patent license to some of the parties
504 | receiving the covered work authorizing them to use, propagate, modify
505 | or convey a specific copy of the covered work, then the patent license
506 | you grant is automatically extended to all recipients of the covered
507 | work and works based on it.
508 |
509 | A patent license is "discriminatory" if it does not include within
510 | the scope of its coverage, prohibits the exercise of, or is
511 | conditioned on the non-exercise of one or more of the rights that are
512 | specifically granted under this License. You may not convey a covered
513 | work if you are a party to an arrangement with a third party that is
514 | in the business of distributing software, under which you make payment
515 | to the third party based on the extent of your activity of conveying
516 | the work, and under which the third party grants, to any of the
517 | parties who would receive the covered work from you, a discriminatory
518 | patent license (a) in connection with copies of the covered work
519 | conveyed by you (or copies made from those copies), or (b) primarily
520 | for and in connection with specific products or compilations that
521 | contain the covered work, unless you entered into that arrangement,
522 | or that patent license was granted, prior to 28 March 2007.
523 |
524 | Nothing in this License shall be construed as excluding or limiting
525 | any implied license or other defenses to infringement that may
526 | otherwise be available to you under applicable patent law.
527 |
528 | 12. No Surrender of Others' Freedom.
529 |
530 | If conditions are imposed on you (whether by court order, agreement or
531 | otherwise) that contradict the conditions of this License, they do not
532 | excuse you from the conditions of this License. If you cannot convey a
533 | covered work so as to satisfy simultaneously your obligations under this
534 | License and any other pertinent obligations, then as a consequence you may
535 | not convey it at all. For example, if you agree to terms that obligate you
536 | to collect a royalty for further conveying from those to whom you convey
537 | the Program, the only way you could satisfy both those terms and this
538 | License would be to refrain entirely from conveying the Program.
539 |
540 | 13. Remote Network Interaction; Use with the GNU General Public License.
541 |
542 | Notwithstanding any other provision of this License, if you modify the
543 | Program, your modified version must prominently offer all users
544 | interacting with it remotely through a computer network (if your version
545 | supports such interaction) an opportunity to receive the Corresponding
546 | Source of your version by providing access to the Corresponding Source
547 | from a network server at no charge, through some standard or customary
548 | means of facilitating copying of software. This Corresponding Source
549 | shall include the Corresponding Source for any work covered by version 3
550 | of the GNU General Public License that is incorporated pursuant to the
551 | following paragraph.
552 |
553 | Notwithstanding any other provision of this License, you have
554 | permission to link or combine any covered work with a work licensed
555 | under version 3 of the GNU General Public License into a single
556 | combined work, and to convey the resulting work. The terms of this
557 | License will continue to apply to the part which is the covered work,
558 | but the work with which it is combined will remain governed by version
559 | 3 of the GNU General Public License.
560 |
561 | 14. Revised Versions of this License.
562 |
563 | The Free Software Foundation may publish revised and/or new versions of
564 | the GNU Affero General Public License from time to time. Such new versions
565 | will be similar in spirit to the present version, but may differ in detail to
566 | address new problems or concerns.
567 |
568 | Each version is given a distinguishing version number. If the
569 | Program specifies that a certain numbered version of the GNU Affero General
570 | Public License "or any later version" applies to it, you have the
571 | option of following the terms and conditions either of that numbered
572 | version or of any later version published by the Free Software
573 | Foundation. If the Program does not specify a version number of the
574 | GNU Affero General Public License, you may choose any version ever published
575 | by the Free Software Foundation.
576 |
577 | If the Program specifies that a proxy can decide which future
578 | versions of the GNU Affero General Public License can be used, that proxy's
579 | public statement of acceptance of a version permanently authorizes you
580 | to choose that version for the Program.
581 |
582 | Later license versions may give you additional or different
583 | permissions. However, no additional obligations are imposed on any
584 | author or copyright holder as a result of your choosing to follow a
585 | later version.
586 |
587 | 15. Disclaimer of Warranty.
588 |
589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597 |
598 | 16. Limitation of Liability.
599 |
600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608 | SUCH DAMAGES.
609 |
610 | 17. Interpretation of Sections 15 and 16.
611 |
612 | If the disclaimer of warranty and limitation of liability provided
613 | above cannot be given local legal effect according to their terms,
614 | reviewing courts shall apply local law that most closely approximates
615 | an absolute waiver of all civil liability in connection with the
616 | Program, unless a warranty or assumption of liability accompanies a
617 | copy of the Program in return for a fee.
618 |
619 | END OF TERMS AND CONDITIONS
620 |
621 | How to Apply These Terms to Your New Programs
622 |
623 | If you develop a new program, and you want it to be of the greatest
624 | possible use to the public, the best way to achieve this is to make it
625 | free software which everyone can redistribute and change under these terms.
626 |
627 | To do so, attach the following notices to the program. It is safest
628 | to attach them to the start of each source file to most effectively
629 | state the exclusion of warranty; and each file should have at least
630 | the "copyright" line and a pointer to where the full notice is found.
631 |
632 |
633 | Copyright (C)
634 |
635 | This program is free software: you can redistribute it and/or modify
636 | it under the terms of the GNU Affero General Public License as published by
637 | the Free Software Foundation, either version 3 of the License, or
638 | (at your option) any later version.
639 |
640 | This program is distributed in the hope that it will be useful,
641 | but WITHOUT ANY WARRANTY; without even the implied warranty of
642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643 | GNU Affero General Public License for more details.
644 |
645 | You should have received a copy of the GNU Affero General Public License
646 | along with this program. If not, see .
647 |
648 | Also add information on how to contact you by electronic and paper mail.
649 |
650 | If your software can interact with users remotely through a computer
651 | network, you should also make sure that it provides a way for users to
652 | get its source. For example, if your program is a web application, its
653 | interface could display a "Source" link that leads users to an archive
654 | of the code. There are many ways you could offer source, and different
655 | solutions will be better for different programs; see section 13 for the
656 | specific requirements.
657 |
658 | You should also get your employer (if you work as a programmer) or school,
659 | if any, to sign a "copyright disclaimer" for the program, if necessary.
660 | For more information on this, and how to apply and follow the GNU AGPL, see
661 | .
662 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OpenWebRX
2 |
3 | OpenWebRX is a multi-user SDR receiver software with a web interface.
4 |
5 | ----
6 |
7 | ### ⚠️ From 2019-12-29 OpenWebRX development is discontinued. ⚠️
8 |
9 | I'm would like to say a big thanks to everyone who supported me during this project, including those who contributed either code or donations. It has been a very fruitful 6 years, but now it's time to move on to other projects. See also my [blog](https://blog.sdr.hu) about that.
10 |
11 | (@simonyiszk, please keep this GitHub repo for historic purposes.)
12 |
13 | Know limitations of the last version:
14 |
15 | - Python 2.7, a main dependency of the project, will be not be officially maintained from 1 January 2020. By time, probably it will not be secure to use this version on public servers, unless someone still provides security patches for Python 2.
16 | - Some specific parts of the DSP code could be improved for better SNR.
17 |
18 | Even though these limitations are probably acceptable in an amateur radio project, I would not build critical infrastructure on it.
19 |
20 | For commercial inquiries (e.g. if someone wants me to develop an improved version without these limitations), I'm still open, [drop me an e-mail](mailto:randras@sdr.hu).
21 |
22 | ----
23 |
24 | [:floppy_disk: Setup guide for Ubuntu](http://blog.sdr.hu/2015/06/30/quick-setup-openwebrx.html) | [:blue_book: Knowledge base on the Wiki](https://github.com/simonyiszk/openwebrx/wiki/) | [:earth_americas: Receivers on SDR.hu](http://sdr.hu/)
25 |
26 | 
27 |
28 | It has the following features:
29 |
30 | - csdr based demodulators (AM/FM/SSB/CW/BPSK31),
31 | - filter passband can be set from GUI,
32 | - waterfall display can be shifted back in time,
33 | - it extensively uses HTML5 features like WebSocket, Web Audio API, and <canvas>,
34 | - it works in Google Chrome, Chromium (above version 37) and Mozilla Firefox (above version 28),
35 | - currently supports RTL-SDR, HackRF, SDRplay, AirSpy and many other devices, see the OpenWebRX Wiki,
36 | - it has a 3D waterfall display:
37 |
38 | 
39 |
40 | **News (2015-08-18)**
41 | - My BSc. thesis written on OpenWebRX is available here.
42 | - Several bugs were fixed to improve reliability and stability.
43 | - OpenWebRX now supports compression of audio and waterfall stream, so the required network uplink bandwidth has been decreased from 2 Mbit/s to about 200 kbit/s per client! (Measured with the default settings. It is also dependent on `fft_size`.)
44 | - OpenWebRX now uses sdr.js (*libcsdr* compiled to JavaScript) for some client-side DSP tasks.
45 | - Receivers can now be listed on SDR.hu.
46 | - License for OpenWebRX is now Affero GPL v3.
47 |
48 | **News (2016-02-14)**
49 | - The DDC in *csdr* has been manually optimized for ARM NEON, so it runs around 3 times faster on the Raspberry Pi 2 than before.
50 | - Also we use *ncat* instead of *rtl_mus*, and it is 3 times faster in some cases.
51 | - OpenWebRX now supports URLs like: `http://localhost:8073/#freq=145555000,mod=usb`
52 | - UI improvements were made, thanks to John Seamons and Gnoxter.
53 |
54 | **News (2017-04-04)**
55 | - *ncat* has been replaced with a custom implementation called *nmux* due to a bug that caused regular crashes on some machines. The *nmux* tool is part of the *csdr* package.
56 | - Most consumer SDR devices are supported via rx_tools, see the OpenWebRX Wiki on that.
57 |
58 | **News (2017-07-12)**
59 | - OpenWebRX now has a BPSK31 demodulator and a 3D waterfall display.
60 |
61 | > When upgrading OpenWebRX, please make sure that you also upgrade *csdr*!
62 |
63 | ## OpenWebRX servers on SDR.hu
64 |
65 | [SDR.hu](http://sdr.hu) is a site which lists the active, public OpenWebRX servers. Your receiver [can also be part of it](http://sdr.hu/openwebrx), if you want.
66 |
67 | 
68 |
69 | ## Setup
70 |
71 | OpenWebRX currently requires Linux and python 2.7 to run.
72 |
73 | First you will need to install the dependencies:
74 |
75 | - libcsdr
76 | - rtl-sdr
77 |
78 | After cloning this repository and connecting an RTL-SDR dongle to your computer, you can run the server:
79 |
80 | python openwebrx.py
81 |
82 | You can now open the GUI at http://localhost:8073.
83 |
84 | Please note that the server is also listening on the following ports (on localhost only):
85 |
86 | - port 4951 for the multi-user I/Q server.
87 |
88 | Now the next step is to customize the parameters of your server in `config_webrx.py`.
89 |
90 | Actually, if you do something cool with OpenWebRX, please drop me a mail:
91 | *Andras Retzler, HA7ILM <randras@sdr.hu>*
92 |
93 | ## Usage tips
94 |
95 | You can zoom the waterfall display by the mouse wheel. You can also drag the waterfall to pan across it.
96 |
97 | The filter envelope can be dragged at its ends and moved around to set the passband.
98 |
99 | However, if you hold down the shift key, you can drag the center line (BFO) or the whole passband (PBS).
100 |
101 | ## Setup tips
102 |
103 | If you have any problems installing OpenWebRX, you should check out the Wiki about it, which has a page on the common problems and their solutions.
104 |
105 | Sometimes the actual error message is not at the end of the terminal output, you may have to look at the whole output to find it.
106 |
107 | If you want to run OpenWebRX on a remote server instead of *localhost*, do not forget to set *server_hostname* in `config_webrx.py`.
108 |
109 | ## Licensing
110 |
111 | OpenWebRX is available under Affero GPL v3 license (summary).
112 |
113 | OpenWebRX is also available under a commercial license on request. Please contact me at the address *<randras@sdr.hu>* for licensing options.
114 |
--------------------------------------------------------------------------------
/config_webrx.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | config_webrx: configuration options for OpenWebRX
5 |
6 | This file is part of OpenWebRX,
7 | an open-source SDR receiver software with a web UI.
8 | Copyright (c) 2013-2015 by Andras Retzler
9 |
10 | This program is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU Affero General Public License as
12 | published by the Free Software Foundation, either version 3 of the
13 | License, or (at your option) any later version.
14 |
15 | This program is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU Affero General Public License for more details.
19 |
20 | You should have received a copy of the GNU Affero General Public License
21 | along with this program. If not, see .
22 |
23 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24 |
25 | In addition, as a special exception, the copyright holders
26 | state that config_rtl.py and config_webrx.py are not part of the
27 | Corresponding Source defined in GNU AGPL version 3 section 1.
28 |
29 | (It means that you do not have to redistribute config_rtl.py and
30 | config_webrx.py if you make any changes to these two configuration files,
31 | and use them for running your web service with OpenWebRX.)
32 | """
33 |
34 | # NOTE: you can find additional information about configuring OpenWebRX in the Wiki:
35 | # https://github.com/simonyiszk/openwebrx/wiki
36 |
37 | # ==== Server settings ====
38 | web_port=8073
39 | server_hostname="localhost" # If this contains an incorrect value, the web UI may freeze on load (it can't open websocket)
40 | max_clients=20
41 |
42 | # ==== Web GUI configuration ====
43 | receiver_name="[Callsign]"
44 | receiver_location="Budapest, Hungary"
45 | receiver_qra="JN97ML"
46 | receiver_asl=200
47 | receiver_ant="Longwire"
48 | receiver_device="RTL-SDR"
49 | receiver_admin="example@example.com"
50 | receiver_gps=(47.000000,19.000000)
51 | photo_height=350
52 | photo_title="Panorama of Budapest from Schönherz Zoltán Dormitory"
53 | photo_desc="""
54 | You can add your own background photo and receiver information.
55 | Receiver is operated by: %[RX_ADMIN]
56 | Device: %[RX_DEVICE]
57 | Antenna: %[RX_ANT]
58 | Website: http://localhost
59 | """
60 |
61 | # ==== sdr.hu listing ====
62 | # If you want your ham receiver to be listed publicly on sdr.hu, then take the following steps:
63 | # 1. Register at: http://sdr.hu/register
64 | # 2. You will get an unique key by email. Copy it and paste here:
65 | sdrhu_key = ""
66 | # 3. Set this setting to True to enable listing:
67 | sdrhu_public_listing = False
68 |
69 | # ==== DSP/RX settings ====
70 | fft_fps=9
71 | fft_size=4096 #Should be power of 2
72 | fft_voverlap_factor=0.3 #If fft_voverlap_factor is above 0, multiple FFTs will be used for creating a line on the diagram.
73 |
74 | # samp_rate = 250000
75 | samp_rate = 2400000
76 | center_freq = 144250000
77 | rf_gain = 5 #in dB. For an RTL-SDR, rf_gain=0 will set the tuner to auto gain mode, else it will be in manual gain mode.
78 | ppm = 0
79 |
80 | audio_compression="adpcm" #valid values: "adpcm", "none"
81 | fft_compression="adpcm" #valid values: "adpcm", "none"
82 |
83 | digimodes_enable=True #Decoding digimodes come with higher CPU usage.
84 | digimodes_fft_size=1024
85 |
86 | start_rtl_thread=True
87 |
88 | """
89 | Note: if you experience audio underruns while CPU usage is 100%, you can:
90 | - decrease `samp_rate`,
91 | - set `fft_voverlap_factor` to 0,
92 | - decrease `fft_fps` and `fft_size`,
93 | - limit the number of users by decreasing `max_clients`.
94 | """
95 |
96 | # ==== I/Q sources ====
97 | # (Uncomment the appropriate by removing # characters at the beginning of the corresponding lines.)
98 |
99 | #################################################################################################
100 | # Is my SDR hardware supported? #
101 | # Check here: https://github.com/simonyiszk/openwebrx/wiki#guides-for-receiver-hardware-support #
102 | #################################################################################################
103 |
104 | # You can use other SDR hardware as well, by giving your own command that outputs the I/Q samples... Some examples of configuration are available here (default is RTL-SDR):
105 |
106 | # >> RTL-SDR via rtl_sdr
107 | start_rtl_command="rtl_sdr -s {samp_rate} -f {center_freq} -p {ppm} -g {rf_gain} -".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
108 | format_conversion="csdr convert_u8_f"
109 |
110 | #lna_gain=8
111 | #rf_amp=1
112 | #start_rtl_command="hackrf_transfer -s {samp_rate} -f {center_freq} -g {rf_gain} -l{lna_gain} -a{rf_amp} -r-".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm, rf_amp=rf_amp, lna_gain=lna_gain)
113 | #format_conversion="csdr convert_s8_f"
114 | """
115 | To use a HackRF, compile the HackRF host tools from its "stdout" branch:
116 | git clone https://github.com/mossmann/hackrf/
117 | cd hackrf
118 | git fetch
119 | git checkout origin/stdout
120 | cd host
121 | mkdir build
122 | cd build
123 | cmake .. -DINSTALL_UDEV_RULES=ON
124 | make
125 | sudo make install
126 | """
127 |
128 | # >> Sound card SDR (needs ALSA)
129 | # I did not have the chance to properly test it.
130 | #samp_rate = 96000
131 | #start_rtl_command="arecord -f S16_LE -r {samp_rate} -c2 -".format(samp_rate=samp_rate)
132 | #format_conversion="csdr convert_s16_f | csdr gain_ff 30"
133 |
134 | # >> /dev/urandom test signal source
135 | # samp_rate = 2400000
136 | # start_rtl_command="cat /dev/urandom | (pv -qL `python -c 'print int({samp_rate} * 2.2)'` 2>&1)".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate)
137 | # format_conversion="csdr convert_u8_f"
138 |
139 | # >> Pre-recorded raw I/Q file as signal source
140 | # You will have to correctly specify: samp_rate, center_freq, format_conversion in order to correctly play an I/Q file.
141 | #start_rtl_command="(while true; do cat my_iq_file.raw; done) | csdr flowcontrol {sr} 20 ".format(sr=samp_rate*2*1.05)
142 | #format_conversion="csdr convert_u8_f"
143 |
144 | #>> The rx_sdr command works with a variety of SDR harware: RTL-SDR, HackRF, SDRplay, UHD, Airspy, Red Pitaya, audio devices, etc.
145 | # It will auto-detect your SDR hardware if the following tools are installed:
146 | # * the vendor provided driver and library,
147 | # * the vendor-specific SoapySDR wrapper library,
148 | # * and SoapySDR itself.
149 | # Check out this article on the OpenWebRX Wiki: https://github.com/simonyiszk/openwebrx/wiki/Using-rx_tools-with-OpenWebRX/
150 | #start_rtl_command="rx_sdr -F CF32 -s {samp_rate} -f {center_freq} -p {ppm} -g {rf_gain} -".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
151 | #format_conversion=""
152 |
153 | # >> gr-osmosdr signal source using GNU Radio (follow this guide: https://github.com/simonyiszk/openwebrx/wiki/Using-GrOsmoSDR-as-signal-source)
154 | #start_rtl_command="cat /tmp/osmocom_fifo"
155 | #format_conversion=""
156 |
157 | # ==== Misc settings ====
158 |
159 | shown_center_freq = center_freq #you can change this if you use an upconverter
160 |
161 | client_audio_buffer_size = 5
162 | #increasing client_audio_buffer_size will:
163 | # - also increase the latency
164 | # - decrease the chance of audio underruns
165 |
166 | start_freq = center_freq
167 | start_mod = "nfm" #nfm, am, lsb, usb, cw
168 |
169 | iq_server_port = 4951 #TCP port for ncat to listen on. It will send I/Q data over its connections, for internal use in OpenWebRX. It is only accessible from the localhost by default.
170 |
171 | #access_log = "~/openwebrx_access.log"
172 |
173 | # ==== Color themes ====
174 |
175 | #A guide is available to help you set these values: https://github.com/simonyiszk/openwebrx/wiki/Calibrating-waterfall-display-levels
176 |
177 | ### default theme by teejez:
178 | waterfall_colors = "[0x000000ff,0x0000ffff,0x00ffffff,0x00ff00ff,0xffff00ff,0xff0000ff,0xff00ffff,0xffffffff]"
179 | waterfall_min_level = -88 #in dB
180 | waterfall_max_level = -20
181 | waterfall_auto_level_margin = (5, 40)
182 | ### old theme by HA7ILM:
183 | #waterfall_colors = "[0x000000ff,0x2e6893ff, 0x69a5d0ff, 0x214b69ff, 0x9dc4e0ff, 0xfff775ff, 0xff8a8aff, 0xb20000ff]"
184 | #waterfall_min_level = -115 #in dB
185 | #waterfall_max_level = 0
186 | #waterfall_auto_level_margin = (20, 30)
187 | ##For the old colors, you might also want to set [fft_voverlap_factor] to 0.
188 |
189 | #Note: When the auto waterfall level button is clicked, the following happens:
190 | # [waterfall_min_level] = [current_min_power_level] - [waterfall_auto_level_margin[0]]
191 | # [waterfall_max_level] = [current_max_power_level] + [waterfall_auto_level_margin[1]]
192 | #
193 | # ___|____________________________________|____________________________________|____________________________________|___> signal power
194 | # \_waterfall_auto_level_margin[0]_/ |__ current_min_power_level | \_waterfall_auto_level_margin[1]_/
195 | # current_max_power_level __|
196 |
197 | # 3D view settings
198 | mathbox_waterfall_frequency_resolution = 128 #bins
199 | mathbox_waterfall_history_length = 10 #seconds
200 | mathbox_waterfall_colors = "[0x000000ff,0x2e6893ff, 0x69a5d0ff, 0x214b69ff, 0x9dc4e0ff, 0xfff775ff, 0xff8a8aff, 0xb20000ff]"
201 |
202 | # === Experimental settings ===
203 | #Warning! The settings below are very experimental.
204 | csdr_dynamic_bufsize = False # This allows you to change the buffering mode of csdr.
205 | csdr_print_bufsizes = False # This prints the buffer sizes used for csdr processes.
206 | csdr_through = False # Setting this True will print out how much data is going into the DSP chains.
207 |
208 | nmux_memory = 50 #in megabytes. This sets the approximate size of the circular buffer used by nmux.
209 |
210 | #Look up external IP address automatically from icanhazip.com, and use it as [server_hostname]
211 | """
212 | print "[openwebrx-config] Detecting external IP address..."
213 | import urllib2
214 | server_hostname=urllib2.urlopen("http://icanhazip.com").read()[:-1]
215 | print "[openwebrx-config] External IP address detected:", server_hostname
216 | """
217 |
--------------------------------------------------------------------------------
/csdr.py:
--------------------------------------------------------------------------------
1 | """
2 | OpenWebRX csdr plugin: do the signal processing with csdr
3 |
4 | This file is part of OpenWebRX,
5 | an open-source SDR receiver software with a web UI.
6 | Copyright (c) 2013-2015 by Andras Retzler
7 |
8 | This program is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU Affero General Public License as
10 | published by the Free Software Foundation, either version 3 of the
11 | License, or (at your option) any later version.
12 |
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU Affero General Public License for more details.
17 |
18 | You should have received a copy of the GNU Affero General Public License
19 | along with this program. If not, see .
20 |
21 | """
22 |
23 | import subprocess
24 | import time
25 | import os
26 | import code
27 | import signal
28 | import fcntl
29 |
30 | class dsp:
31 |
32 | def __init__(self):
33 | self.samp_rate = 250000
34 | self.output_rate = 11025 #this is default, and cannot be set at the moment
35 | self.fft_size = 1024
36 | self.fft_fps = 5
37 | self.offset_freq = 0
38 | self.low_cut = -4000
39 | self.high_cut = 4000
40 | self.bpf_transition_bw = 320 #Hz, and this is a constant
41 | self.ddc_transition_bw_rate = 0.15 # of the IF sample rate
42 | self.running = False
43 | self.secondary_processes_running = False
44 | self.audio_compression = "none"
45 | self.fft_compression = "none"
46 | self.demodulator = "nfm"
47 | self.name = "csdr"
48 | self.format_conversion = "csdr convert_u8_f"
49 | self.base_bufsize = 512
50 | self.nc_port = 4951
51 | self.csdr_dynamic_bufsize = False
52 | self.csdr_print_bufsizes = False
53 | self.csdr_through = False
54 | self.squelch_level = 0
55 | self.fft_averages = 50
56 | self.iqtee = False
57 | self.iqtee2 = False
58 | self.secondary_demodulator = None
59 | self.secondary_fft_size = 1024
60 | self.secondary_process_fft = None
61 | self.secondary_process_demod = None
62 | self.pipe_names=["bpf_pipe", "shift_pipe", "squelch_pipe", "smeter_pipe", "iqtee_pipe", "iqtee2_pipe"]
63 | self.secondary_pipe_names=["secondary_shift_pipe"]
64 | self.secondary_offset_freq = 1000
65 |
66 | def chain(self,which):
67 | any_chain_base="nc -v 127.0.0.1 {nc_port} | "
68 | if self.csdr_dynamic_bufsize: any_chain_base+="csdr setbuf {start_bufsize} | "
69 | if self.csdr_through: any_chain_base+="csdr through | "
70 | any_chain_base+=self.format_conversion+(" | " if self.format_conversion!="" else "") ##"csdr flowcontrol {flowcontrol} auto 1.5 10 | "
71 | if which == "fft":
72 | fft_chain_base = any_chain_base+"csdr fft_cc {fft_size} {fft_block_size} | " + \
73 | ("csdr logpower_cf -70 | " if self.fft_averages == 0 else "csdr logaveragepower_cf -70 {fft_size} {fft_averages} | ") + \
74 | "csdr fft_exchange_sides_ff {fft_size}"
75 | if self.fft_compression=="adpcm":
76 | return fft_chain_base+" | csdr compress_fft_adpcm_f_u8 {fft_size}"
77 | else:
78 | return fft_chain_base
79 | chain_begin=any_chain_base+"csdr shift_addition_cc --fifo {shift_pipe} | csdr fir_decimate_cc {decimation} {ddc_transition_bw} HAMMING | csdr bandpass_fir_fft_cc --fifo {bpf_pipe} {bpf_transition_bw} HAMMING | csdr squelch_and_smeter_cc --fifo {squelch_pipe} --outfifo {smeter_pipe} 5 1 | "
80 | if self.secondary_demodulator:
81 | chain_begin+="csdr tee {iqtee_pipe} | "
82 | chain_begin+="csdr tee {iqtee2_pipe} | "
83 | chain_end = ""
84 | if self.audio_compression=="adpcm":
85 | chain_end = " | csdr encode_ima_adpcm_i16_u8"
86 | if which == "nfm": return chain_begin + "csdr fmdemod_quadri_cf | csdr limit_ff | csdr old_fractional_decimator_ff {last_decimation} | csdr deemphasis_nfm_ff 11025 | csdr fastagc_ff 1024 | csdr convert_f_s16"+chain_end
87 | elif which == "am": return chain_begin + "csdr amdemod_cf | csdr fastdcblock_ff | csdr old_fractional_decimator_ff {last_decimation} | csdr agc_ff | csdr limit_ff | csdr convert_f_s16"+chain_end
88 | elif which == "ssb": return chain_begin + "csdr realpart_cf | csdr old_fractional_decimator_ff {last_decimation} | csdr agc_ff | csdr limit_ff | csdr convert_f_s16"+chain_end
89 |
90 | def secondary_chain(self, which):
91 | secondary_chain_base="cat {input_pipe} | "
92 | if which == "fft":
93 | return secondary_chain_base+"csdr realpart_cf | csdr fft_fc {secondary_fft_input_size} {secondary_fft_block_size} | csdr logpower_cf -70 " + (" | csdr compress_fft_adpcm_f_u8 {secondary_fft_size}" if self.fft_compression=="adpcm" else "")
94 | elif which == "bpsk31":
95 | return secondary_chain_base + "csdr shift_addition_cc --fifo {secondary_shift_pipe} | " + \
96 | "csdr bandpass_fir_fft_cc $(csdr '=-(31.25)/{if_samp_rate}') $(csdr '=(31.25)/{if_samp_rate}') $(csdr '=31.25/{if_samp_rate}') | " + \
97 | "csdr simple_agc_cc 0.001 0.5 | " + \
98 | "csdr timing_recovery_cc GARDNER {secondary_samples_per_bits} 0.5 2 --add_q | " + \
99 | "CSDR_FIXED_BUFSIZE=1 csdr dbpsk_decoder_c_u8 | " + \
100 | "CSDR_FIXED_BUFSIZE=1 csdr psk31_varicode_decoder_u8_u8"
101 |
102 | def set_secondary_demodulator(self, what):
103 | self.secondary_demodulator = what
104 |
105 | def secondary_fft_block_size(self):
106 | return (self.samp_rate/self.decimation)/(self.fft_fps*2) #*2 is there because we do FFT on real signal here
107 |
108 | def secondary_decimation(self):
109 | return 1 #currently unused
110 |
111 | def secondary_bpf_cutoff(self):
112 | if self.secondary_demodulator == "bpsk31":
113 | return (31.25/2) / self.if_samp_rate()
114 | return 0
115 |
116 | def secondary_bpf_transition_bw(self):
117 | if self.secondary_demodulator == "bpsk31":
118 | return (31.25/2) / self.if_samp_rate()
119 | return 0
120 |
121 | def secondary_samples_per_bits(self):
122 | if self.secondary_demodulator == "bpsk31":
123 | return int(round(self.if_samp_rate()/31.25))&~3
124 | return 0
125 |
126 | def secondary_bw(self):
127 | if self.secondary_demodulator == "bpsk31":
128 | return 31.25
129 |
130 | def start_secondary_demodulator(self):
131 | if(not self.secondary_demodulator): return
132 | print "[openwebrx] starting secondary demodulator from IF input sampled at %d"%self.if_samp_rate()
133 | secondary_command_fft=self.secondary_chain("fft")
134 | secondary_command_demod=self.secondary_chain(self.secondary_demodulator)
135 | self.try_create_pipes(self.secondary_pipe_names, secondary_command_demod + secondary_command_fft)
136 |
137 | secondary_command_fft=secondary_command_fft.format( \
138 | input_pipe=self.iqtee_pipe, \
139 | secondary_fft_input_size=self.secondary_fft_size, \
140 | secondary_fft_size=self.secondary_fft_size, \
141 | secondary_fft_block_size=self.secondary_fft_block_size(), \
142 | )
143 | secondary_command_demod=secondary_command_demod.format( \
144 | input_pipe=self.iqtee2_pipe, \
145 | secondary_shift_pipe=self.secondary_shift_pipe, \
146 | secondary_decimation=self.secondary_decimation(), \
147 | secondary_samples_per_bits=self.secondary_samples_per_bits(), \
148 | secondary_bpf_cutoff=self.secondary_bpf_cutoff(), \
149 | secondary_bpf_transition_bw=self.secondary_bpf_transition_bw(), \
150 | if_samp_rate=self.if_samp_rate()
151 | )
152 |
153 | print "[openwebrx-dsp-plugin:csdr] secondary command (fft) =", secondary_command_fft
154 | print "[openwebrx-dsp-plugin:csdr] secondary command (demod) =", secondary_command_demod
155 | #code.interact(local=locals())
156 | my_env=os.environ.copy()
157 | #if self.csdr_dynamic_bufsize: my_env["CSDR_DYNAMIC_BUFSIZE_ON"]="1";
158 | if self.csdr_print_bufsizes: my_env["CSDR_PRINT_BUFSIZES"]="1";
159 | self.secondary_process_fft = subprocess.Popen(secondary_command_fft, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setpgrp, env=my_env)
160 | print "[openwebrx-dsp-plugin:csdr] Popen on secondary command (fft)"
161 | self.secondary_process_demod = subprocess.Popen(secondary_command_demod, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setpgrp, env=my_env) #TODO digimodes
162 | print "[openwebrx-dsp-plugin:csdr] Popen on secondary command (demod)" #TODO digimodes
163 | self.secondary_processes_running = True
164 |
165 | #open control pipes for csdr and send initialization data
166 | # print "==========> 1"
167 | if self.secondary_shift_pipe != None: #TODO digimodes
168 | # print "==========> 2", self.secondary_shift_pipe
169 | self.secondary_shift_pipe_file=open(self.secondary_shift_pipe,"w") #TODO digimodes
170 | # print "==========> 3"
171 | self.set_secondary_offset_freq(self.secondary_offset_freq) #TODO digimodes
172 | # print "==========> 4"
173 |
174 | self.set_pipe_nonblocking(self.secondary_process_demod.stdout)
175 | self.set_pipe_nonblocking(self.secondary_process_fft.stdout)
176 |
177 | def set_secondary_offset_freq(self, value):
178 | self.secondary_offset_freq=value
179 | if self.secondary_processes_running:
180 | self.secondary_shift_pipe_file.write("%g\n"%(-float(self.secondary_offset_freq)/self.if_samp_rate()))
181 | self.secondary_shift_pipe_file.flush()
182 |
183 | def stop_secondary_demodulator(self):
184 | if self.secondary_processes_running == False: return
185 | self.try_delete_pipes(self.secondary_pipe_names)
186 | if self.secondary_process_fft: os.killpg(os.getpgid(self.secondary_process_fft.pid), signal.SIGTERM)
187 | if self.secondary_process_demod: os.killpg(os.getpgid(self.secondary_process_demod.pid), signal.SIGTERM)
188 | self.secondary_processes_running = False
189 |
190 | def read_secondary_demod(self, size):
191 | return self.secondary_process_demod.stdout.read(size)
192 |
193 | def read_secondary_fft(self, size):
194 | return self.secondary_process_fft.stdout.read(size)
195 |
196 | def get_secondary_demodulator(self):
197 | return self.secondary_demodulator
198 |
199 | def set_secondary_fft_size(self,secondary_fft_size):
200 | #to change this, restart is required
201 | self.secondary_fft_size=secondary_fft_size
202 |
203 | def set_audio_compression(self,what):
204 | self.audio_compression = what
205 |
206 | def set_fft_compression(self,what):
207 | self.fft_compression = what
208 |
209 | def get_fft_bytes_to_read(self):
210 | if self.fft_compression=="none": return self.fft_size*4
211 | if self.fft_compression=="adpcm": return (self.fft_size/2)+(10/2)
212 |
213 | def get_secondary_fft_bytes_to_read(self):
214 | if self.fft_compression=="none": return self.secondary_fft_size*4
215 | if self.fft_compression=="adpcm": return (self.secondary_fft_size/2)+(10/2)
216 |
217 | def set_samp_rate(self,samp_rate):
218 | #to change this, restart is required
219 | self.samp_rate=samp_rate
220 | self.decimation=1
221 | while self.samp_rate/(self.decimation+1)>self.output_rate:
222 | self.decimation+=1
223 | self.last_decimation=float(self.if_samp_rate())/self.output_rate
224 |
225 | def if_samp_rate(self):
226 | return self.samp_rate/self.decimation
227 |
228 | def get_name(self):
229 | return self.name
230 |
231 | def get_output_rate(self):
232 | return self.output_rate
233 |
234 | def set_output_rate(self,output_rate):
235 | self.output_rate=output_rate
236 | self.set_samp_rate(self.samp_rate) #as it depends on output_rate
237 |
238 | def set_demodulator(self,demodulator):
239 | #to change this, restart is required
240 | self.demodulator=demodulator
241 |
242 | def get_demodulator(self):
243 | return self.demodulator
244 |
245 | def set_fft_size(self,fft_size):
246 | #to change this, restart is required
247 | self.fft_size=fft_size
248 |
249 | def set_fft_fps(self,fft_fps):
250 | #to change this, restart is required
251 | self.fft_fps=fft_fps
252 |
253 | def set_fft_averages(self,fft_averages):
254 | #to change this, restart is required
255 | self.fft_averages=fft_averages
256 |
257 | def fft_block_size(self):
258 | if self.fft_averages == 0: return self.samp_rate/self.fft_fps
259 | else: return self.samp_rate/self.fft_fps/self.fft_averages
260 |
261 | def set_format_conversion(self,format_conversion):
262 | self.format_conversion=format_conversion
263 |
264 | def set_offset_freq(self,offset_freq):
265 | self.offset_freq=offset_freq
266 | if self.running:
267 | self.shift_pipe_file.write("%g\n"%(-float(self.offset_freq)/self.samp_rate))
268 | self.shift_pipe_file.flush()
269 |
270 | def set_bpf(self,low_cut,high_cut):
271 | self.low_cut=low_cut
272 | self.high_cut=high_cut
273 | if self.running:
274 | self.bpf_pipe_file.write( "%g %g\n"%(float(self.low_cut)/self.if_samp_rate(), float(self.high_cut)/self.if_samp_rate()) )
275 | self.bpf_pipe_file.flush()
276 |
277 | def get_bpf(self):
278 | return [self.low_cut, self.high_cut]
279 |
280 | def set_squelch_level(self, squelch_level):
281 | self.squelch_level=squelch_level
282 | if self.running:
283 | self.squelch_pipe_file.write( "%g\n"%(float(self.squelch_level)) )
284 | self.squelch_pipe_file.flush()
285 |
286 | def get_smeter_level(self):
287 | if self.running:
288 | line=self.smeter_pipe_file.readline()
289 | return float(line[:-1])
290 |
291 | def mkfifo(self,path):
292 | try:
293 | os.unlink(path)
294 | except:
295 | pass
296 | os.mkfifo(path)
297 |
298 | def ddc_transition_bw(self):
299 | return self.ddc_transition_bw_rate*(self.if_samp_rate()/float(self.samp_rate))
300 |
301 | def try_create_pipes(self, pipe_names, command_base):
302 | # print "try_create_pipes"
303 | for pipe_name in pipe_names:
304 | # print "\t"+pipe_name
305 | if "{"+pipe_name+"}" in command_base:
306 | setattr(self, pipe_name, self.pipe_base_path+pipe_name)
307 | self.mkfifo(getattr(self, pipe_name))
308 | else:
309 | setattr(self, pipe_name, None)
310 |
311 | def try_delete_pipes(self, pipe_names):
312 | for pipe_name in pipe_names:
313 | pipe_path = getattr(self,pipe_name,None)
314 | if pipe_path:
315 | try: os.unlink(pipe_path)
316 | except Exception as e: print "[openwebrx-dsp-plugin:csdr] try_delete_pipes() ::", e
317 |
318 | def set_pipe_nonblocking(self, pipe):
319 | flags = fcntl.fcntl(pipe, fcntl.F_GETFL)
320 | fcntl.fcntl(pipe, fcntl.F_SETFL, flags | os.O_NONBLOCK)
321 |
322 | def start(self):
323 | command_base=self.chain(self.demodulator)
324 |
325 | #create control pipes for csdr
326 | self.pipe_base_path="/tmp/openwebrx_pipe_{myid}_".format(myid=id(self))
327 | # self.bpf_pipe = self.shift_pipe = self.squelch_pipe = self.smeter_pipe = None
328 |
329 | self.try_create_pipes(self.pipe_names, command_base)
330 |
331 | # if "{bpf_pipe}" in command_base:
332 | # self.bpf_pipe=pipe_base_path+"bpf"
333 | # self.mkfifo(self.bpf_pipe)
334 | # if "{shift_pipe}" in command_base:
335 | # self.shift_pipe=pipe_base_path+"shift"
336 | # self.mkfifo(self.shift_pipe)
337 | # if "{squelch_pipe}" in command_base:
338 | # self.squelch_pipe=pipe_base_path+"squelch"
339 | # self.mkfifo(self.squelch_pipe)
340 | # if "{smeter_pipe}" in command_base:
341 | # self.smeter_pipe=pipe_base_path+"smeter"
342 | # self.mkfifo(self.smeter_pipe)
343 | # if "{iqtee_pipe}" in command_base:
344 | # self.iqtee_pipe=pipe_base_path+"iqtee"
345 | # self.mkfifo(self.iqtee_pipe)
346 | # if "{iqtee2_pipe}" in command_base:
347 | # self.iqtee2_pipe=pipe_base_path+"iqtee2"
348 | # self.mkfifo(self.iqtee2_pipe)
349 |
350 | #run the command
351 | command=command_base.format( bpf_pipe=self.bpf_pipe, shift_pipe=self.shift_pipe, decimation=self.decimation, \
352 | last_decimation=self.last_decimation, fft_size=self.fft_size, fft_block_size=self.fft_block_size(), fft_averages=self.fft_averages, \
353 | bpf_transition_bw=float(self.bpf_transition_bw)/self.if_samp_rate(), ddc_transition_bw=self.ddc_transition_bw(), \
354 | flowcontrol=int(self.samp_rate*2), start_bufsize=self.base_bufsize*self.decimation, nc_port=self.nc_port, \
355 | squelch_pipe=self.squelch_pipe, smeter_pipe=self.smeter_pipe, iqtee_pipe=self.iqtee_pipe, iqtee2_pipe=self.iqtee2_pipe )
356 |
357 | print "[openwebrx-dsp-plugin:csdr] Command =",command
358 | #code.interact(local=locals())
359 | my_env=os.environ.copy()
360 | if self.csdr_dynamic_bufsize: my_env["CSDR_DYNAMIC_BUFSIZE_ON"]="1";
361 | if self.csdr_print_bufsizes: my_env["CSDR_PRINT_BUFSIZES"]="1";
362 | self.process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setpgrp, env=my_env)
363 | self.running = True
364 |
365 | #open control pipes for csdr and send initialization data
366 | if self.bpf_pipe != None:
367 | self.bpf_pipe_file=open(self.bpf_pipe,"w")
368 | self.set_bpf(self.low_cut,self.high_cut)
369 | if self.shift_pipe != None:
370 | self.shift_pipe_file=open(self.shift_pipe,"w")
371 | self.set_offset_freq(self.offset_freq)
372 | if self.squelch_pipe != None:
373 | self.squelch_pipe_file=open(self.squelch_pipe,"w")
374 | self.set_squelch_level(self.squelch_level)
375 | if self.smeter_pipe != None:
376 | self.smeter_pipe_file=open(self.smeter_pipe,"r")
377 | self.set_pipe_nonblocking(self.smeter_pipe_file)
378 |
379 | self.start_secondary_demodulator()
380 |
381 | def read(self,size):
382 | return self.process.stdout.read(size)
383 |
384 | def stop(self):
385 | os.killpg(os.getpgid(self.process.pid), signal.SIGTERM)
386 | self.stop_secondary_demodulator()
387 | #if(self.process.poll()!=None):return # returns None while subprocess is running
388 | #while(self.process.poll()==None):
389 | # #self.process.kill()
390 | # print "killproc",os.getpgid(self.process.pid),self.process.pid
391 | # os.killpg(self.process.pid, signal.SIGTERM)
392 | #
393 | # time.sleep(0.1)
394 |
395 | self.try_delete_pipes(self.pipe_names)
396 |
397 | # if self.bpf_pipe:
398 | # try: os.unlink(self.bpf_pipe)
399 | # except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.bpf_pipe
400 | # if self.shift_pipe:
401 | # try: os.unlink(self.shift_pipe)
402 | # except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.shift_pipe
403 | # if self.squelch_pipe:
404 | # try: os.unlink(self.squelch_pipe)
405 | # except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.squelch_pipe
406 | # if self.smeter_pipe:
407 | # try: os.unlink(self.smeter_pipe)
408 | # except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.smeter_pipe
409 | # if self.iqtee_pipe:
410 | # try: os.unlink(self.iqtee_pipe)
411 | # except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.iqtee_pipe
412 | # if self.iqtee2_pipe:
413 | # try: os.unlink(self.iqtee2_pipe)
414 | # except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.iqtee2_pipe
415 |
416 | self.running = False
417 |
418 | def restart(self):
419 | self.stop()
420 | self.start()
421 |
422 | def __del__(self):
423 | self.stop()
424 | del(self.process)
425 |
--------------------------------------------------------------------------------
/htdocs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/favicon.ico
--------------------------------------------------------------------------------
/htdocs/gfx/font-expletus-sans/ExpletusSans-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/font-expletus-sans/ExpletusSans-Medium.ttf
--------------------------------------------------------------------------------
/htdocs/gfx/font-expletus-sans/OFL.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011, Jasper de Waard (jasper@designtown.nl),
2 | with Reserved Font Name "Expletus Sans".
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 | This license is copied below, and is also available with a FAQ at:
5 | http://scripts.sil.org/OFL
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-3d-spectrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-3d-spectrum.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-avatar-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-avatar-background.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-avatar.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-background-cool-blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-background-cool-blue.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-background-lingrad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-background-lingrad.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-ha5kfu-top-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-ha5kfu-top-logo.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-logo-big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-logo-big.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-panel-log.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-panel-log.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-panel-receiver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-panel-receiver.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-panel-status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-panel-status.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-play-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-play-button.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-rx-details-arrow-up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-rx-details-arrow-up.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-rx-details-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-rx-details-arrow.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-scale-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-scale-background.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-speaker-muted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-speaker-muted.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-speaker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-speaker.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-squelch-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-squelch-button.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-top-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-top-logo.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-top-photo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-top-photo.jpg
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-waterfall-auto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-waterfall-auto.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-waterfall-default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-waterfall-default.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-zoom-in-total.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-zoom-in-total.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-zoom-in.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-zoom-in.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-zoom-out-total.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-zoom-out-total.png
--------------------------------------------------------------------------------
/htdocs/gfx/openwebrx-zoom-out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ha7ilm/openwebrx/d84e672e6ed90a8aa6f4c37c3e4eddb42a39dee6/htdocs/gfx/openwebrx-zoom-out.png
--------------------------------------------------------------------------------
/htdocs/inactive.html:
--------------------------------------------------------------------------------
1 |
2 |
22 | OpenWebRX
23 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | Sorry, the receiver is inactive due to internal error.
81 |