Compare commits
3 Commits
original_w
...
0.12
Author | SHA1 | Date | |
---|---|---|---|
06054b1291 | |||
7ecab27d56 | |||
d04e9180d2 |
3
.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
*.pyc
|
|
||||||
*.swp
|
|
||||||
tags
|
|
@ -1,15 +0,0 @@
|
|||||||
First of all, thank you for taking the time to contribute to this project!
|
|
||||||
|
|
||||||
Before I can accept your contributions, I need a signed copy of the Individual Contributor License Agreement (ICLA) from you, which is available <a href="ICLA.txt">here</a>.
|
|
||||||
|
|
||||||
The ICLA is needed because it will allow me to dual license the OpenWebRX project under AGPL and a commercial license.
|
|
||||||
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).
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
This contributor agreement is based on the one of Apache Software Foundation, with some modifications. (You can review differences <a href="https://gist.github.com/ha7ilm/9e981006d24659e336c7/revisions">here</a>).
|
|
||||||
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.
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
|
|
||||||
Andras, HA7ILM
|
|
@ -1,5 +0,0 @@
|
|||||||
This is a list of the great people who contributed code to the OpenWebRX repository. (Names are sorted alphabetically.)
|
|
||||||
|
|
||||||
Gnoxter <gnoxter@linuxlounge.net>
|
|
||||||
John Seamons, ZL/KF6VO <jks@jks.com>
|
|
||||||
|
|
128
ICLA.txt
@ -1,128 +0,0 @@
|
|||||||
Individual Contributor License Agreement ("Agreement")
|
|
||||||
|
|
||||||
In order to clarify the intellectual property license granted
|
|
||||||
with Contributions from any person or entity, Retzler András
|
|
||||||
(hereinafter referred to as "Project Owner") must have a
|
|
||||||
Contributor License Agreement ("CLA") on file that has
|
|
||||||
been signed by each Contributor, indicating agreement to the license
|
|
||||||
terms below. This license is for your protection as a Contributor as
|
|
||||||
well as the protection of the Project Owner; it does not change your
|
|
||||||
rights to use your own Contributions for any other purpose.
|
|
||||||
Please read this document carefully before signing and keep a copy
|
|
||||||
for your records.
|
|
||||||
|
|
||||||
Full name: ______________________________________________________
|
|
||||||
|
|
||||||
(optional) Public name: _________________________________________
|
|
||||||
|
|
||||||
Mailing Address: ________________________________________________
|
|
||||||
|
|
||||||
________________________________________________
|
|
||||||
|
|
||||||
Country: ______________________________________________________
|
|
||||||
|
|
||||||
(optional) Telephone: ___________________________________________
|
|
||||||
|
|
||||||
E-Mail: ______________________________________________________
|
|
||||||
|
|
||||||
You accept and agree to the following terms and conditions for Your
|
|
||||||
present and future Contributions submitted to the Project Owner.
|
|
||||||
|
|
||||||
Except for the license granted herein to the Project Owner and recipients
|
|
||||||
of software distributed by the Project Owner, You reserve all right, title,
|
|
||||||
and interest in and to Your Contributions.
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean the copyright owner or legal entity
|
|
||||||
authorized by the copyright owner that is making this Agreement
|
|
||||||
with the Project Owner. For legal entities, the entity making a
|
|
||||||
Contribution and all other entities that control, are controlled
|
|
||||||
by, or are under common control with that entity are considered to
|
|
||||||
be a single Contributor. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"Contribution" shall mean any original work of authorship,
|
|
||||||
including any modifications or additions to an existing work, that
|
|
||||||
is intentionally submitted by You to the Project Owner for inclusion
|
|
||||||
in, or documentation of, any of the products owned or managed by
|
|
||||||
the Project Owner (the "Work"). For the purposes of this definition,
|
|
||||||
"submitted" means any form of electronic, verbal, or written
|
|
||||||
communication sent to the Project Owner or its representatives,
|
|
||||||
including but not limited to communication on electronic mailing
|
|
||||||
lists, source code control systems, and issue tracking systems that
|
|
||||||
are managed by, or on behalf of, the Project Owner for the purpose of
|
|
||||||
discussing and improving the Work, but excluding communication that
|
|
||||||
is conspicuously marked or otherwise designated in writing by You
|
|
||||||
as "Not a Contribution."
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this Agreement, You hereby grant to the Project Owner and to
|
|
||||||
recipients of software distributed by the Project Owner a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare derivative works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute Your
|
|
||||||
Contributions and such derivative works.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this Agreement, You hereby grant to the Project Owner and to
|
|
||||||
recipients of software distributed by the Project Owner a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have
|
|
||||||
made, use, offer to sell, sell, import, and otherwise transfer the
|
|
||||||
Work, where such license applies only to those patent claims
|
|
||||||
licensable by You that are necessarily infringed by Your
|
|
||||||
Contribution(s) alone or by combination of Your Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If any
|
|
||||||
entity institutes patent litigation against You or any other entity
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging
|
|
||||||
that your Contribution, or the Work to which you have contributed,
|
|
||||||
constitutes direct or contributory patent infringement, then any
|
|
||||||
patent licenses granted to that entity under this Agreement for
|
|
||||||
that Contribution or Work shall terminate as of the date such
|
|
||||||
litigation is filed.
|
|
||||||
|
|
||||||
4. You represent that you are legally entitled to grant the above
|
|
||||||
license. If your employer(s) has rights to intellectual property
|
|
||||||
that you create that includes your Contributions, you represent
|
|
||||||
that you have received permission to make Contributions on behalf
|
|
||||||
of that employer, that your employer has waived such rights for
|
|
||||||
your Contributions to the Project Owner, or that your employer has
|
|
||||||
executed a separate Corporate CLA with the Project Owner.
|
|
||||||
|
|
||||||
5. You represent that each of Your Contributions is Your original
|
|
||||||
creation (see section 7 for submissions on behalf of others). You
|
|
||||||
represent that Your Contribution submissions include complete
|
|
||||||
details of any third-party license or other restriction (including,
|
|
||||||
but not limited to, related patents and trademarks) of which you
|
|
||||||
are personally aware and which are associated with any part of Your
|
|
||||||
Contributions.
|
|
||||||
|
|
||||||
6. You are not expected to provide support for Your Contributions,
|
|
||||||
except to the extent You desire to provide support. You may provide
|
|
||||||
support for free, for a fee, or not at all. Unless required by
|
|
||||||
applicable law or agreed to in writing, You provide Your
|
|
||||||
Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
|
||||||
OF ANY KIND, either express or implied, including, without
|
|
||||||
limitation, any warranties or conditions of TITLE, NON-
|
|
||||||
INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
7. Should You wish to submit work that is not Your original creation,
|
|
||||||
You may submit it to the Project Owner separately from any
|
|
||||||
Contribution, identifying the complete details of its source and of
|
|
||||||
any license or other restriction (including, but not limited to,
|
|
||||||
related patents, trademarks, and license agreements) of which you
|
|
||||||
are personally aware, and conspicuously marking the work as
|
|
||||||
"Submitted on behalf of a third-party: [named here]".
|
|
||||||
|
|
||||||
8. You agree to notify the Project Owner of any facts or circumstances of
|
|
||||||
which you become aware that would make these representations
|
|
||||||
inaccurate in any respect.
|
|
||||||
|
|
||||||
Please sign: __________________________________ Date: ________________
|
|
||||||
|
|
||||||
Text derived from the Apache Individual Contributor License Agreement
|
|
||||||
("Agreement") V2.0, available at http://apache.org/licenses/icla.txt
|
|
661
LICENSE.txt
@ -1,661 +0,0 @@
|
|||||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 19 November 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works, specifically designed to ensure
|
|
||||||
cooperation with the community in the case of network server software.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
our General Public Licenses are intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
Developers that use our General Public Licenses protect your rights
|
|
||||||
with two steps: (1) assert copyright on the software, and (2) offer
|
|
||||||
you this License which gives you legal permission to copy, distribute
|
|
||||||
and/or modify the software.
|
|
||||||
|
|
||||||
A secondary benefit of defending all users' freedom is that
|
|
||||||
improvements made in alternate versions of the program, if they
|
|
||||||
receive widespread use, become available for other developers to
|
|
||||||
incorporate. Many developers of free software are heartened and
|
|
||||||
encouraged by the resulting cooperation. However, in the case of
|
|
||||||
software used on network servers, this result may fail to come about.
|
|
||||||
The GNU General Public License permits making a modified version and
|
|
||||||
letting the public access it on a server without ever releasing its
|
|
||||||
source code to the public.
|
|
||||||
|
|
||||||
The GNU Affero General Public License is designed specifically to
|
|
||||||
ensure that, in such cases, the modified source code becomes available
|
|
||||||
to the community. It requires the operator of a network server to
|
|
||||||
provide the source code of the modified version running there to the
|
|
||||||
users of that server. Therefore, public use of a modified version, on
|
|
||||||
a publicly accessible server, gives the public access to the source
|
|
||||||
code of the modified version.
|
|
||||||
|
|
||||||
An older license, called the Affero General Public License and
|
|
||||||
published by Affero, was designed to accomplish similar goals. This is
|
|
||||||
a different license, not a version of the Affero GPL, but Affero has
|
|
||||||
released a new version of the Affero GPL which permits relicensing under
|
|
||||||
this license.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, if you modify the
|
|
||||||
Program, your modified version must prominently offer all users
|
|
||||||
interacting with it remotely through a computer network (if your version
|
|
||||||
supports such interaction) an opportunity to receive the Corresponding
|
|
||||||
Source of your version by providing access to the Corresponding Source
|
|
||||||
from a network server at no charge, through some standard or customary
|
|
||||||
means of facilitating copying of software. This Corresponding Source
|
|
||||||
shall include the Corresponding Source for any work covered by version 3
|
|
||||||
of the GNU General Public License that is incorporated pursuant to the
|
|
||||||
following paragraph.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the work with which it is combined will remain governed by version
|
|
||||||
3 of the GNU General Public License.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU Affero General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU Affero General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU Affero General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU Affero General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If your software can interact with users remotely through a computer
|
|
||||||
network, you should also make sure that it provides a way for users to
|
|
||||||
get its source. For example, if your program is a web application, its
|
|
||||||
interface could display a "Source" link that leads users to an archive
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for the
|
|
||||||
specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
||||||
<http://www.gnu.org/licenses/>.
|
|
83
README.md
@ -1,70 +1,18 @@
|
|||||||
# OpenWebRX
|
OpenWebRX
|
||||||
|
=========
|
||||||
|
|
||||||
OpenWebRX is a multi-user SDR receiver software with a web interface.
|
OpenWebRX is a multi-user SDR receiver software with a web interface.
|
||||||
|
|
||||||
----
|

|
||||||
|
|
||||||
### ⚠️ From 2019-12-29 OpenWebRX development is discontinued. ⚠️
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
(@simonyiszk, please keep this GitHub repo for historic purposes.)
|
|
||||||
|
|
||||||
Know limitations of the last version:
|
|
||||||
|
|
||||||
- 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.
|
|
||||||
- Some specific parts of the DSP code could be improved for better SNR.
|
|
||||||
|
|
||||||
Even though these limitations are probably acceptable in an amateur radio project, I would not build critical infrastructure on it.
|
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
[: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/)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
It has the following features:
|
It has the following features:
|
||||||
|
|
||||||
- <a href="https://github.com/simonyiszk/csdr">csdr</a> based demodulators (AM/FM/SSB/CW/BPSK31),
|
- <a href="https://github.com/simonyiszk/csdr">libcsdr</a> based demodulators (AM/FM/SSB),
|
||||||
- filter passband can be set from GUI,
|
- filter passband can be set from GUI,
|
||||||
- waterfall display can be shifted back in time,
|
- waterfall display can be shifted back in time,
|
||||||
- it extensively uses HTML5 features like WebSocket, Web Audio API, and <canvas>,
|
- it extensively uses HTML5 features like WebSocket, Web Audio API, and <canvas>.
|
||||||
- it works in Google Chrome, Chromium (above version 37) and Mozilla Firefox (above version 28),
|
- it works in Google Chrome, Chromium (above version 37) and Mozilla Firefox (above version 28),
|
||||||
- currently supports RTL-SDR, HackRF, SDRplay, AirSpy and many other devices, see the <a href="https://github.com/simonyiszk/openwebrx/wiki/">OpenWebRX Wiki</a>,
|
- currently only supports RTL-SDR, but other SDR hardware may be easily added.
|
||||||
- it has a 3D waterfall display:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**News (2015-08-18)**
|
|
||||||
- My BSc. thesis written on OpenWebRX is <a href="https://sdr.hu/static/bsc-thesis.pdf">available here.</a>
|
|
||||||
- Several bugs were fixed to improve reliability and stability.
|
|
||||||
- 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`.)
|
|
||||||
- OpenWebRX now uses <a href="https://github.com/simonyiszk/csdr#sdrjs">sdr.js</a> (*libcsdr* compiled to JavaScript) for some client-side DSP tasks.
|
|
||||||
- Receivers can now be listed on <a href="http://sdr.hu/">SDR.hu</a>.
|
|
||||||
- License for OpenWebRX is now Affero GPL v3.
|
|
||||||
|
|
||||||
**News (2016-02-14)**
|
|
||||||
- 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.
|
|
||||||
- Also we use *ncat* instead of *rtl_mus*, and it is 3 times faster in some cases.
|
|
||||||
- OpenWebRX now supports URLs like: `http://localhost:8073/#freq=145555000,mod=usb`
|
|
||||||
- UI improvements were made, thanks to John Seamons and Gnoxter.
|
|
||||||
|
|
||||||
**News (2017-04-04)**
|
|
||||||
- *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.
|
|
||||||
- Most consumer SDR devices are supported via <a href="https://github.com/rxseger/rx_tools">rx_tools</a>, see the <a href="https://github.com/simonyiszk/openwebrx/wiki/Using-rx_tools-with-OpenWebRX">OpenWebRX Wiki</a> on that.
|
|
||||||
|
|
||||||
**News (2017-07-12)**
|
|
||||||
- OpenWebRX now has a BPSK31 demodulator and a 3D waterfall display.
|
|
||||||
|
|
||||||
> When upgrading OpenWebRX, please make sure that you also upgrade *csdr*!
|
|
||||||
|
|
||||||
## OpenWebRX servers on SDR.hu
|
|
||||||
|
|
||||||
[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.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@ -83,13 +31,16 @@ You can now open the GUI at <a href="http://localhost:8073">http://localhost:807
|
|||||||
|
|
||||||
Please note that the server is also listening on the following ports (on localhost only):
|
Please note that the server is also listening on the following ports (on localhost only):
|
||||||
|
|
||||||
|
- port 8888 for the I/Q source,
|
||||||
- port 4951 for the multi-user I/Q server.
|
- port 4951 for the multi-user I/Q server.
|
||||||
|
|
||||||
Now the next step is to customize the parameters of your server in `config_webrx.py`.
|
Now the next step is to customize the parameters of your server in `config_webrx.py`.
|
||||||
|
|
||||||
Actually, if you do something cool with OpenWebRX, please drop me a mail:
|
Actually, if you do something cool with OpenWebRX (or just have a problem), please drop me a mail:
|
||||||
*Andras Retzler, HA7ILM <randras@sdr.hu>*
|
*Andras Retzler, HA7ILM <randras@sdr.hu>*
|
||||||
|
|
||||||
|
I would like to maintain a list of online amateur radio receivers on <a href="http://openwebrx.org/">openwebrx.org</a>.
|
||||||
|
|
||||||
## Usage tips
|
## Usage tips
|
||||||
|
|
||||||
You can zoom the waterfall display by the mouse wheel. You can also drag the waterfall to pan across it.
|
You can zoom the waterfall display by the mouse wheel. You can also drag the waterfall to pan across it.
|
||||||
@ -98,16 +49,16 @@ The filter envelope can be dragged at its ends and moved around to set the passb
|
|||||||
|
|
||||||
However, if you hold down the shift key, you can drag the center line (BFO) or the whole passband (PBS).
|
However, if you hold down the shift key, you can drag the center line (BFO) or the whole passband (PBS).
|
||||||
|
|
||||||
## Setup tips
|
## Configuration tips
|
||||||
|
|
||||||
If you have any problems installing OpenWebRX, you should check out the <a href="https://github.com/simonyiszk/openwebrx/wiki">Wiki</a> about it, which has a page on the <a href="https://github.com/simonyiszk/openwebrx/wiki/Common-problems-and-their-solutions">common problems and their solutions</a>.
|
If you want to run OpenWebRX on a remote server instead of localhost, do not forget to set *server_hostname* in `config_webrx.py`, or you may get a WebSocket error.
|
||||||
|
|
||||||
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.
|
DSP CPU usage can be fine-tuned in `plugins/dsp/csdr/plugin.py`: you can set transition bandwidths higher (thus degrade filter performance by decreasing the length of the kernel, but also decrease CPU usage), and also set `fft_size` lower.
|
||||||
|
|
||||||
If you want to run OpenWebRX on a remote server instead of *localhost*, do not forget to set *server_hostname* in `config_webrx.py`.
|
If you constantly get *audio overrun* errors, you may change `audio_buffer_maximal_length_sec` in `openwebrx.js` from the default 1.7 to 3.
|
||||||
|
|
||||||
## Licensing
|
If you want a chat-box to the top of the page, <a href="https://gist.github.com/ha7ilm/15c4c5e4c80cef9b3144">here is a snippet</a> for you to include in `config_webrx.py`.
|
||||||
|
|
||||||
OpenWebRX is available under Affero GPL v3 license (<a href="https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0)">summary</a>).
|
## Todo
|
||||||
|
|
||||||
OpenWebRX is also available under a commercial license on request. Please contact me at the address *<randras@sdr.hu>* for licensing options.
|
Currently, clients use up a lot of bandwidth. This will be improved later.
|
||||||
|
87
config_rtl.py
Executable file
@ -0,0 +1,87 @@
|
|||||||
|
'''
|
||||||
|
This file is part of RTL Multi-User Server,
|
||||||
|
that makes multi-user access to your DVB-T dongle used as an SDR.
|
||||||
|
Copyright (c) 2013-2014 by Andras Retzler <randras@sdr.hu>
|
||||||
|
|
||||||
|
RTL Multi-User Server is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
RTL Multi-User Server is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with RTL Multi-User Server. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
'''
|
||||||
|
|
||||||
|
my_ip='127.0.0.1' # leave blank for listening on all interfaces
|
||||||
|
my_listening_port = 4951
|
||||||
|
|
||||||
|
rtl_tcp_host,rtl_tcp_port='localhost',8888
|
||||||
|
|
||||||
|
send_first=""
|
||||||
|
#send_first=chr(9)+chr(0)+chr(0)+chr(0)+chr(1) # set direct sampling
|
||||||
|
|
||||||
|
setuid_on_start = 0 # we normally start with root privileges and setuid() to another user
|
||||||
|
uid = 999 # determine by issuing: $ id -u username
|
||||||
|
ignore_clients_without_commands = 1 # we won't serve data to telnet sessions and things like that
|
||||||
|
# we'll start to serve data after getting the first valid command
|
||||||
|
|
||||||
|
freq_allowed_ranges = [[0,2200000000]]
|
||||||
|
|
||||||
|
client_cant_set_until=0
|
||||||
|
first_client_can_set=True # openwebrx - spectrum thread will set things on start # no good, clients set parameters and things
|
||||||
|
buffer_size=25000000 # per client
|
||||||
|
log_file_path = "/dev/null" # Might be set to /dev/null to turn off logging
|
||||||
|
|
||||||
|
'''
|
||||||
|
Allow any host to connect:
|
||||||
|
use_ip_access_control=0
|
||||||
|
|
||||||
|
Allow from specific ranges:
|
||||||
|
use_ip_access_control=1
|
||||||
|
order_allow_deny=0 # deny and then allow
|
||||||
|
denied_ip_ranges=() # deny from all
|
||||||
|
allowed_ip_ranges=('192.168.','44.','127.0.0.1') # allow only from ...
|
||||||
|
|
||||||
|
Deny from specific ranges:
|
||||||
|
use_ip_access_control=1
|
||||||
|
order_allow_deny=0 # allow and then deny
|
||||||
|
allowed_ip_ranges=() # allow from all
|
||||||
|
denied_ip_ranges=('192.168.') # deny any hosts from ...
|
||||||
|
'''
|
||||||
|
use_ip_access_control=1 #You may want to open up the I/Q server to the public, then set this to zero.
|
||||||
|
order_allow_deny=0
|
||||||
|
denied_ip_ranges=() # deny from all
|
||||||
|
allowed_ip_ranges=('127.0.0.1') # allow only local connections (from openwebrx).
|
||||||
|
allow_gain_set=1
|
||||||
|
|
||||||
|
use_dsp_command=False # you can process raw I/Q data with a custom command that starts a process that we can pipe the data into, and also pipe out of.
|
||||||
|
debug_dsp_command=False # show sample rate before and after the dsp command
|
||||||
|
dsp_command=""
|
||||||
|
|
||||||
|
'''
|
||||||
|
Example DSP commands:
|
||||||
|
* Compress I/Q data with FLAC:
|
||||||
|
flac --force-raw-format --channels 2 --sample-rate=250000 --sign=unsigned --bps=8 --endian=little -o - -
|
||||||
|
* Decompress FLAC-coded I/Q data:
|
||||||
|
flac --force-raw-format --decode --endian=little --sign=unsigned - -
|
||||||
|
'''
|
||||||
|
watchdog_interval=0
|
||||||
|
reconnect_interval=10
|
||||||
|
'''
|
||||||
|
If there's no input I/Q data after N seconds, input will be filled with zero samples,
|
||||||
|
so that GNU Radio won't fail in openwebrx. It may reconnect rtl_tcp_tread.
|
||||||
|
If watchdog_interval is 0, then watchdog thread is not started.
|
||||||
|
|
||||||
|
'''
|
||||||
|
cache_full_behaviour=2
|
||||||
|
'''
|
||||||
|
0 = drop samples
|
||||||
|
1 = close client
|
||||||
|
2 = openwebrx: don't care about that client until it wants samples again (gr-osmosdr bug workaround)
|
||||||
|
'''
|
||||||
|
|
208
config_webrx.py
Normal file → Executable file
@ -1,52 +1,39 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
config_webrx: configuration options for OpenWebRX
|
config_webrx: configuration options for OpenWebRX
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
OpenWebRX (c) Copyright 2013-2014 Andras Retzler <randras@sdr.hu>
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This file is part of OpenWebRX.
|
||||||
it under the terms of the GNU Affero General Public License as
|
|
||||||
published by the Free Software Foundation, either version 3 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
OpenWebRX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenWebRX is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenWebRX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
|
|
||||||
In addition, as a special exception, the copyright holders
|
|
||||||
state that config_rtl.py and config_webrx.py are not part of the
|
|
||||||
Corresponding Source defined in GNU AGPL version 3 section 1.
|
|
||||||
|
|
||||||
(It means that you do not have to redistribute config_rtl.py and
|
|
||||||
config_webrx.py if you make any changes to these two configuration files,
|
|
||||||
and use them for running your web service with OpenWebRX.)
|
|
||||||
"""
|
"""
|
||||||
|
#Server settings
|
||||||
# NOTE: you can find additional information about configuring OpenWebRX in the Wiki:
|
|
||||||
# https://github.com/simonyiszk/openwebrx/wiki
|
|
||||||
|
|
||||||
# ==== Server settings ====
|
|
||||||
web_port=8073
|
web_port=8073
|
||||||
server_hostname="localhost" # If this contains an incorrect value, the web UI may freeze on load (it can't open websocket)
|
server_hostname="localhost" # If this contains an incorrect value, the web UI may freeze on load (it can't open websocket)
|
||||||
max_clients=20
|
max_clients=20
|
||||||
|
|
||||||
# ==== Web GUI configuration ====
|
#Web GUI configuration
|
||||||
receiver_name="[Callsign]"
|
receiver_name="[Callsign]"
|
||||||
receiver_location="Budapest, Hungary"
|
receiver_location="Budapest, Hungary"
|
||||||
receiver_qra="JN97ML"
|
receiver_qra="JN97ML"
|
||||||
receiver_asl=200
|
receiver_asl=182
|
||||||
receiver_ant="Longwire"
|
receiver_ant="Longwire"
|
||||||
receiver_device="RTL-SDR"
|
receiver_device="RTL-SDR"
|
||||||
receiver_admin="example@example.com"
|
receiver_admin="localhost@localhost"
|
||||||
receiver_gps=(47.000000,19.000000)
|
receiver_gps=(47.000000,19.000000)
|
||||||
photo_height=350
|
photo_height=350
|
||||||
photo_title="Panorama of Budapest from Schönherz Zoltán Dormitory"
|
photo_title="Panorama of Budapest from Schönherz Zoltán Dormitory"
|
||||||
@ -58,159 +45,16 @@ Antenna: %[RX_ANT]<br />
|
|||||||
Website: <a href="http://localhost" target="_blank">http://localhost</a>
|
Website: <a href="http://localhost" target="_blank">http://localhost</a>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# ==== sdr.hu listing ====
|
#DSP/RX settings
|
||||||
# If you want your ham receiver to be listed publicly on sdr.hu, then take the following steps:
|
dsp_plugin="csdr"
|
||||||
# 1. Register at: http://sdr.hu/register
|
|
||||||
# 2. You will get an unique key by email. Copy it and paste here:
|
|
||||||
sdrhu_key = ""
|
|
||||||
# 3. Set this setting to True to enable listing:
|
|
||||||
sdrhu_public_listing = False
|
|
||||||
|
|
||||||
# ==== DSP/RX settings ====
|
|
||||||
fft_fps=9
|
fft_fps=9
|
||||||
fft_size=4096 #Should be power of 2
|
fft_size=4096
|
||||||
fft_voverlap_factor=0.3 #If fft_voverlap_factor is above 0, multiple FFTs will be used for creating a line on the diagram.
|
samp_rate = 250000
|
||||||
|
center_freq = 145525000
|
||||||
|
rf_gain = 5
|
||||||
|
|
||||||
# samp_rate = 250000
|
start_rtl_thread=True #rtl_sdr is more stable than rtl_tcp...
|
||||||
samp_rate = 2400000
|
start_rtl_command="rtl_sdr -s {samp_rate} -f {center_freq} - | nc -vvl 127.0.0.1 -p 8888".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate)
|
||||||
center_freq = 144250000
|
#start_rtl_tcp_command="rtl_tcp -s 250000 -f 145525000 -g 0 -p 8888"
|
||||||
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.
|
#You can use other SDR hardware as well, but if the command above outputs samples in a format other than [unsigned char], then the dsp plugin has to be slightly modified (at the csdr convert_u8_f part).
|
||||||
ppm = 0
|
|
||||||
|
|
||||||
audio_compression="adpcm" #valid values: "adpcm", "none"
|
|
||||||
fft_compression="adpcm" #valid values: "adpcm", "none"
|
|
||||||
|
|
||||||
digimodes_enable=True #Decoding digimodes come with higher CPU usage.
|
|
||||||
digimodes_fft_size=1024
|
|
||||||
|
|
||||||
start_rtl_thread=True
|
|
||||||
|
|
||||||
"""
|
|
||||||
Note: if you experience audio underruns while CPU usage is 100%, you can:
|
|
||||||
- decrease `samp_rate`,
|
|
||||||
- set `fft_voverlap_factor` to 0,
|
|
||||||
- decrease `fft_fps` and `fft_size`,
|
|
||||||
- limit the number of users by decreasing `max_clients`.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# ==== I/Q sources ====
|
|
||||||
# (Uncomment the appropriate by removing # characters at the beginning of the corresponding lines.)
|
|
||||||
|
|
||||||
#################################################################################################
|
|
||||||
# Is my SDR hardware supported? #
|
|
||||||
# Check here: https://github.com/simonyiszk/openwebrx/wiki#guides-for-receiver-hardware-support #
|
|
||||||
#################################################################################################
|
|
||||||
|
|
||||||
# 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):
|
|
||||||
|
|
||||||
# >> RTL-SDR via rtl_sdr
|
|
||||||
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)
|
|
||||||
format_conversion="csdr convert_u8_f"
|
|
||||||
|
|
||||||
#lna_gain=8
|
|
||||||
#rf_amp=1
|
|
||||||
#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)
|
|
||||||
#format_conversion="csdr convert_s8_f"
|
|
||||||
"""
|
|
||||||
To use a HackRF, compile the HackRF host tools from its "stdout" branch:
|
|
||||||
git clone https://github.com/mossmann/hackrf/
|
|
||||||
cd hackrf
|
|
||||||
git fetch
|
|
||||||
git checkout origin/stdout
|
|
||||||
cd host
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake .. -DINSTALL_UDEV_RULES=ON
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
"""
|
|
||||||
|
|
||||||
# >> Sound card SDR (needs ALSA)
|
|
||||||
# I did not have the chance to properly test it.
|
|
||||||
#samp_rate = 96000
|
|
||||||
#start_rtl_command="arecord -f S16_LE -r {samp_rate} -c2 -".format(samp_rate=samp_rate)
|
|
||||||
#format_conversion="csdr convert_s16_f | csdr gain_ff 30"
|
|
||||||
|
|
||||||
# >> /dev/urandom test signal source
|
|
||||||
# samp_rate = 2400000
|
|
||||||
# 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)
|
|
||||||
# format_conversion="csdr convert_u8_f"
|
|
||||||
|
|
||||||
# >> Pre-recorded raw I/Q file as signal source
|
|
||||||
# You will have to correctly specify: samp_rate, center_freq, format_conversion in order to correctly play an I/Q file.
|
|
||||||
#start_rtl_command="(while true; do cat my_iq_file.raw; done) | csdr flowcontrol {sr} 20 ".format(sr=samp_rate*2*1.05)
|
|
||||||
#format_conversion="csdr convert_u8_f"
|
|
||||||
|
|
||||||
#>> The rx_sdr command works with a variety of SDR harware: RTL-SDR, HackRF, SDRplay, UHD, Airspy, Red Pitaya, audio devices, etc.
|
|
||||||
# It will auto-detect your SDR hardware if the following tools are installed:
|
|
||||||
# * the vendor provided driver and library,
|
|
||||||
# * the vendor-specific SoapySDR wrapper library,
|
|
||||||
# * and SoapySDR itself.
|
|
||||||
# Check out this article on the OpenWebRX Wiki: https://github.com/simonyiszk/openwebrx/wiki/Using-rx_tools-with-OpenWebRX/
|
|
||||||
#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)
|
|
||||||
#format_conversion=""
|
|
||||||
|
|
||||||
# >> gr-osmosdr signal source using GNU Radio (follow this guide: https://github.com/simonyiszk/openwebrx/wiki/Using-GrOsmoSDR-as-signal-source)
|
|
||||||
#start_rtl_command="cat /tmp/osmocom_fifo"
|
|
||||||
#format_conversion=""
|
|
||||||
|
|
||||||
# ==== Misc settings ====
|
|
||||||
|
|
||||||
shown_center_freq = center_freq #you can change this if you use an upconverter
|
|
||||||
|
|
||||||
client_audio_buffer_size = 5
|
|
||||||
#increasing client_audio_buffer_size will:
|
|
||||||
# - also increase the latency
|
|
||||||
# - decrease the chance of audio underruns
|
|
||||||
|
|
||||||
start_freq = center_freq
|
|
||||||
start_mod = "nfm" #nfm, am, lsb, usb, cw
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
#access_log = "~/openwebrx_access.log"
|
|
||||||
|
|
||||||
# ==== Color themes ====
|
|
||||||
|
|
||||||
#A guide is available to help you set these values: https://github.com/simonyiszk/openwebrx/wiki/Calibrating-waterfall-display-levels
|
|
||||||
|
|
||||||
### default theme by teejez:
|
|
||||||
waterfall_colors = "[0x000000ff,0x0000ffff,0x00ffffff,0x00ff00ff,0xffff00ff,0xff0000ff,0xff00ffff,0xffffffff]"
|
|
||||||
waterfall_min_level = -88 #in dB
|
|
||||||
waterfall_max_level = -20
|
|
||||||
waterfall_auto_level_margin = (5, 40)
|
|
||||||
### old theme by HA7ILM:
|
|
||||||
#waterfall_colors = "[0x000000ff,0x2e6893ff, 0x69a5d0ff, 0x214b69ff, 0x9dc4e0ff, 0xfff775ff, 0xff8a8aff, 0xb20000ff]"
|
|
||||||
#waterfall_min_level = -115 #in dB
|
|
||||||
#waterfall_max_level = 0
|
|
||||||
#waterfall_auto_level_margin = (20, 30)
|
|
||||||
##For the old colors, you might also want to set [fft_voverlap_factor] to 0.
|
|
||||||
|
|
||||||
#Note: When the auto waterfall level button is clicked, the following happens:
|
|
||||||
# [waterfall_min_level] = [current_min_power_level] - [waterfall_auto_level_margin[0]]
|
|
||||||
# [waterfall_max_level] = [current_max_power_level] + [waterfall_auto_level_margin[1]]
|
|
||||||
#
|
|
||||||
# ___|____________________________________|____________________________________|____________________________________|___> signal power
|
|
||||||
# \_waterfall_auto_level_margin[0]_/ |__ current_min_power_level | \_waterfall_auto_level_margin[1]_/
|
|
||||||
# current_max_power_level __|
|
|
||||||
|
|
||||||
# 3D view settings
|
|
||||||
mathbox_waterfall_frequency_resolution = 128 #bins
|
|
||||||
mathbox_waterfall_history_length = 10 #seconds
|
|
||||||
mathbox_waterfall_colors = "[0x000000ff,0x2e6893ff, 0x69a5d0ff, 0x214b69ff, 0x9dc4e0ff, 0xfff775ff, 0xff8a8aff, 0xb20000ff]"
|
|
||||||
|
|
||||||
# === Experimental settings ===
|
|
||||||
#Warning! The settings below are very experimental.
|
|
||||||
csdr_dynamic_bufsize = False # This allows you to change the buffering mode of csdr.
|
|
||||||
csdr_print_bufsizes = False # This prints the buffer sizes used for csdr processes.
|
|
||||||
csdr_through = False # Setting this True will print out how much data is going into the DSP chains.
|
|
||||||
|
|
||||||
nmux_memory = 50 #in megabytes. This sets the approximate size of the circular buffer used by nmux.
|
|
||||||
|
|
||||||
#Look up external IP address automatically from icanhazip.com, and use it as [server_hostname]
|
|
||||||
"""
|
|
||||||
print "[openwebrx-config] Detecting external IP address..."
|
|
||||||
import urllib2
|
|
||||||
server_hostname=urllib2.urlopen("http://icanhazip.com").read()[:-1]
|
|
||||||
print "[openwebrx-config] External IP address detected:", server_hostname
|
|
||||||
"""
|
|
||||||
|
424
csdr.py
@ -1,424 +0,0 @@
|
|||||||
"""
|
|
||||||
OpenWebRX csdr plugin: do the signal processing with csdr
|
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as
|
|
||||||
published by the Free Software Foundation, either version 3 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
import subprocess
|
|
||||||
import time
|
|
||||||
import os
|
|
||||||
import code
|
|
||||||
import signal
|
|
||||||
import fcntl
|
|
||||||
|
|
||||||
class dsp:
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.samp_rate = 250000
|
|
||||||
self.output_rate = 11025 #this is default, and cannot be set at the moment
|
|
||||||
self.fft_size = 1024
|
|
||||||
self.fft_fps = 5
|
|
||||||
self.offset_freq = 0
|
|
||||||
self.low_cut = -4000
|
|
||||||
self.high_cut = 4000
|
|
||||||
self.bpf_transition_bw = 320 #Hz, and this is a constant
|
|
||||||
self.ddc_transition_bw_rate = 0.15 # of the IF sample rate
|
|
||||||
self.running = False
|
|
||||||
self.secondary_processes_running = False
|
|
||||||
self.audio_compression = "none"
|
|
||||||
self.fft_compression = "none"
|
|
||||||
self.demodulator = "nfm"
|
|
||||||
self.name = "csdr"
|
|
||||||
self.format_conversion = "csdr convert_u8_f"
|
|
||||||
self.base_bufsize = 512
|
|
||||||
self.nc_port = 4951
|
|
||||||
self.csdr_dynamic_bufsize = False
|
|
||||||
self.csdr_print_bufsizes = False
|
|
||||||
self.csdr_through = False
|
|
||||||
self.squelch_level = 0
|
|
||||||
self.fft_averages = 50
|
|
||||||
self.iqtee = False
|
|
||||||
self.iqtee2 = False
|
|
||||||
self.secondary_demodulator = None
|
|
||||||
self.secondary_fft_size = 1024
|
|
||||||
self.secondary_process_fft = None
|
|
||||||
self.secondary_process_demod = None
|
|
||||||
self.pipe_names=["bpf_pipe", "shift_pipe", "squelch_pipe", "smeter_pipe", "iqtee_pipe", "iqtee2_pipe"]
|
|
||||||
self.secondary_pipe_names=["secondary_shift_pipe"]
|
|
||||||
self.secondary_offset_freq = 1000
|
|
||||||
|
|
||||||
def chain(self,which):
|
|
||||||
any_chain_base="nc -v 127.0.0.1 {nc_port} | "
|
|
||||||
if self.csdr_dynamic_bufsize: any_chain_base+="csdr setbuf {start_bufsize} | "
|
|
||||||
if self.csdr_through: any_chain_base+="csdr through | "
|
|
||||||
any_chain_base+=self.format_conversion+(" | " if self.format_conversion!="" else "") ##"csdr flowcontrol {flowcontrol} auto 1.5 10 | "
|
|
||||||
if which == "fft":
|
|
||||||
fft_chain_base = any_chain_base+"csdr fft_cc {fft_size} {fft_block_size} | " + \
|
|
||||||
("csdr logpower_cf -70 | " if self.fft_averages == 0 else "csdr logaveragepower_cf -70 {fft_size} {fft_averages} | ") + \
|
|
||||||
"csdr fft_exchange_sides_ff {fft_size}"
|
|
||||||
if self.fft_compression=="adpcm":
|
|
||||||
return fft_chain_base+" | csdr compress_fft_adpcm_f_u8 {fft_size}"
|
|
||||||
else:
|
|
||||||
return fft_chain_base
|
|
||||||
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 | "
|
|
||||||
if self.secondary_demodulator:
|
|
||||||
chain_begin+="csdr tee {iqtee_pipe} | "
|
|
||||||
chain_begin+="csdr tee {iqtee2_pipe} | "
|
|
||||||
chain_end = ""
|
|
||||||
if self.audio_compression=="adpcm":
|
|
||||||
chain_end = " | csdr encode_ima_adpcm_i16_u8"
|
|
||||||
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
|
|
||||||
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
|
|
||||||
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
|
|
||||||
|
|
||||||
def secondary_chain(self, which):
|
|
||||||
secondary_chain_base="cat {input_pipe} | "
|
|
||||||
if which == "fft":
|
|
||||||
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 "")
|
|
||||||
elif which == "bpsk31":
|
|
||||||
return secondary_chain_base + "csdr shift_addition_cc --fifo {secondary_shift_pipe} | " + \
|
|
||||||
"csdr bandpass_fir_fft_cc $(csdr '=-(31.25)/{if_samp_rate}') $(csdr '=(31.25)/{if_samp_rate}') $(csdr '=31.25/{if_samp_rate}') | " + \
|
|
||||||
"csdr simple_agc_cc 0.001 0.5 | " + \
|
|
||||||
"csdr timing_recovery_cc GARDNER {secondary_samples_per_bits} 0.5 2 --add_q | " + \
|
|
||||||
"CSDR_FIXED_BUFSIZE=1 csdr dbpsk_decoder_c_u8 | " + \
|
|
||||||
"CSDR_FIXED_BUFSIZE=1 csdr psk31_varicode_decoder_u8_u8"
|
|
||||||
|
|
||||||
def set_secondary_demodulator(self, what):
|
|
||||||
self.secondary_demodulator = what
|
|
||||||
|
|
||||||
def secondary_fft_block_size(self):
|
|
||||||
return (self.samp_rate/self.decimation)/(self.fft_fps*2) #*2 is there because we do FFT on real signal here
|
|
||||||
|
|
||||||
def secondary_decimation(self):
|
|
||||||
return 1 #currently unused
|
|
||||||
|
|
||||||
def secondary_bpf_cutoff(self):
|
|
||||||
if self.secondary_demodulator == "bpsk31":
|
|
||||||
return (31.25/2) / self.if_samp_rate()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def secondary_bpf_transition_bw(self):
|
|
||||||
if self.secondary_demodulator == "bpsk31":
|
|
||||||
return (31.25/2) / self.if_samp_rate()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def secondary_samples_per_bits(self):
|
|
||||||
if self.secondary_demodulator == "bpsk31":
|
|
||||||
return int(round(self.if_samp_rate()/31.25))&~3
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def secondary_bw(self):
|
|
||||||
if self.secondary_demodulator == "bpsk31":
|
|
||||||
return 31.25
|
|
||||||
|
|
||||||
def start_secondary_demodulator(self):
|
|
||||||
if(not self.secondary_demodulator): return
|
|
||||||
print "[openwebrx] starting secondary demodulator from IF input sampled at %d"%self.if_samp_rate()
|
|
||||||
secondary_command_fft=self.secondary_chain("fft")
|
|
||||||
secondary_command_demod=self.secondary_chain(self.secondary_demodulator)
|
|
||||||
self.try_create_pipes(self.secondary_pipe_names, secondary_command_demod + secondary_command_fft)
|
|
||||||
|
|
||||||
secondary_command_fft=secondary_command_fft.format( \
|
|
||||||
input_pipe=self.iqtee_pipe, \
|
|
||||||
secondary_fft_input_size=self.secondary_fft_size, \
|
|
||||||
secondary_fft_size=self.secondary_fft_size, \
|
|
||||||
secondary_fft_block_size=self.secondary_fft_block_size(), \
|
|
||||||
)
|
|
||||||
secondary_command_demod=secondary_command_demod.format( \
|
|
||||||
input_pipe=self.iqtee2_pipe, \
|
|
||||||
secondary_shift_pipe=self.secondary_shift_pipe, \
|
|
||||||
secondary_decimation=self.secondary_decimation(), \
|
|
||||||
secondary_samples_per_bits=self.secondary_samples_per_bits(), \
|
|
||||||
secondary_bpf_cutoff=self.secondary_bpf_cutoff(), \
|
|
||||||
secondary_bpf_transition_bw=self.secondary_bpf_transition_bw(), \
|
|
||||||
if_samp_rate=self.if_samp_rate()
|
|
||||||
)
|
|
||||||
|
|
||||||
print "[openwebrx-dsp-plugin:csdr] secondary command (fft) =", secondary_command_fft
|
|
||||||
print "[openwebrx-dsp-plugin:csdr] secondary command (demod) =", secondary_command_demod
|
|
||||||
#code.interact(local=locals())
|
|
||||||
my_env=os.environ.copy()
|
|
||||||
#if self.csdr_dynamic_bufsize: my_env["CSDR_DYNAMIC_BUFSIZE_ON"]="1";
|
|
||||||
if self.csdr_print_bufsizes: my_env["CSDR_PRINT_BUFSIZES"]="1";
|
|
||||||
self.secondary_process_fft = subprocess.Popen(secondary_command_fft, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setpgrp, env=my_env)
|
|
||||||
print "[openwebrx-dsp-plugin:csdr] Popen on secondary command (fft)"
|
|
||||||
self.secondary_process_demod = subprocess.Popen(secondary_command_demod, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setpgrp, env=my_env) #TODO digimodes
|
|
||||||
print "[openwebrx-dsp-plugin:csdr] Popen on secondary command (demod)" #TODO digimodes
|
|
||||||
self.secondary_processes_running = True
|
|
||||||
|
|
||||||
#open control pipes for csdr and send initialization data
|
|
||||||
# print "==========> 1"
|
|
||||||
if self.secondary_shift_pipe != None: #TODO digimodes
|
|
||||||
# print "==========> 2", self.secondary_shift_pipe
|
|
||||||
self.secondary_shift_pipe_file=open(self.secondary_shift_pipe,"w") #TODO digimodes
|
|
||||||
# print "==========> 3"
|
|
||||||
self.set_secondary_offset_freq(self.secondary_offset_freq) #TODO digimodes
|
|
||||||
# print "==========> 4"
|
|
||||||
|
|
||||||
self.set_pipe_nonblocking(self.secondary_process_demod.stdout)
|
|
||||||
self.set_pipe_nonblocking(self.secondary_process_fft.stdout)
|
|
||||||
|
|
||||||
def set_secondary_offset_freq(self, value):
|
|
||||||
self.secondary_offset_freq=value
|
|
||||||
if self.secondary_processes_running:
|
|
||||||
self.secondary_shift_pipe_file.write("%g\n"%(-float(self.secondary_offset_freq)/self.if_samp_rate()))
|
|
||||||
self.secondary_shift_pipe_file.flush()
|
|
||||||
|
|
||||||
def stop_secondary_demodulator(self):
|
|
||||||
if self.secondary_processes_running == False: return
|
|
||||||
self.try_delete_pipes(self.secondary_pipe_names)
|
|
||||||
if self.secondary_process_fft: os.killpg(os.getpgid(self.secondary_process_fft.pid), signal.SIGTERM)
|
|
||||||
if self.secondary_process_demod: os.killpg(os.getpgid(self.secondary_process_demod.pid), signal.SIGTERM)
|
|
||||||
self.secondary_processes_running = False
|
|
||||||
|
|
||||||
def read_secondary_demod(self, size):
|
|
||||||
return self.secondary_process_demod.stdout.read(size)
|
|
||||||
|
|
||||||
def read_secondary_fft(self, size):
|
|
||||||
return self.secondary_process_fft.stdout.read(size)
|
|
||||||
|
|
||||||
def get_secondary_demodulator(self):
|
|
||||||
return self.secondary_demodulator
|
|
||||||
|
|
||||||
def set_secondary_fft_size(self,secondary_fft_size):
|
|
||||||
#to change this, restart is required
|
|
||||||
self.secondary_fft_size=secondary_fft_size
|
|
||||||
|
|
||||||
def set_audio_compression(self,what):
|
|
||||||
self.audio_compression = what
|
|
||||||
|
|
||||||
def set_fft_compression(self,what):
|
|
||||||
self.fft_compression = what
|
|
||||||
|
|
||||||
def get_fft_bytes_to_read(self):
|
|
||||||
if self.fft_compression=="none": return self.fft_size*4
|
|
||||||
if self.fft_compression=="adpcm": return (self.fft_size/2)+(10/2)
|
|
||||||
|
|
||||||
def get_secondary_fft_bytes_to_read(self):
|
|
||||||
if self.fft_compression=="none": return self.secondary_fft_size*4
|
|
||||||
if self.fft_compression=="adpcm": return (self.secondary_fft_size/2)+(10/2)
|
|
||||||
|
|
||||||
def set_samp_rate(self,samp_rate):
|
|
||||||
#to change this, restart is required
|
|
||||||
self.samp_rate=samp_rate
|
|
||||||
self.decimation=1
|
|
||||||
while self.samp_rate/(self.decimation+1)>self.output_rate:
|
|
||||||
self.decimation+=1
|
|
||||||
self.last_decimation=float(self.if_samp_rate())/self.output_rate
|
|
||||||
|
|
||||||
def if_samp_rate(self):
|
|
||||||
return self.samp_rate/self.decimation
|
|
||||||
|
|
||||||
def get_name(self):
|
|
||||||
return self.name
|
|
||||||
|
|
||||||
def get_output_rate(self):
|
|
||||||
return self.output_rate
|
|
||||||
|
|
||||||
def set_output_rate(self,output_rate):
|
|
||||||
self.output_rate=output_rate
|
|
||||||
self.set_samp_rate(self.samp_rate) #as it depends on output_rate
|
|
||||||
|
|
||||||
def set_demodulator(self,demodulator):
|
|
||||||
#to change this, restart is required
|
|
||||||
self.demodulator=demodulator
|
|
||||||
|
|
||||||
def get_demodulator(self):
|
|
||||||
return self.demodulator
|
|
||||||
|
|
||||||
def set_fft_size(self,fft_size):
|
|
||||||
#to change this, restart is required
|
|
||||||
self.fft_size=fft_size
|
|
||||||
|
|
||||||
def set_fft_fps(self,fft_fps):
|
|
||||||
#to change this, restart is required
|
|
||||||
self.fft_fps=fft_fps
|
|
||||||
|
|
||||||
def set_fft_averages(self,fft_averages):
|
|
||||||
#to change this, restart is required
|
|
||||||
self.fft_averages=fft_averages
|
|
||||||
|
|
||||||
def fft_block_size(self):
|
|
||||||
if self.fft_averages == 0: return self.samp_rate/self.fft_fps
|
|
||||||
else: return self.samp_rate/self.fft_fps/self.fft_averages
|
|
||||||
|
|
||||||
def set_format_conversion(self,format_conversion):
|
|
||||||
self.format_conversion=format_conversion
|
|
||||||
|
|
||||||
def set_offset_freq(self,offset_freq):
|
|
||||||
self.offset_freq=offset_freq
|
|
||||||
if self.running:
|
|
||||||
self.shift_pipe_file.write("%g\n"%(-float(self.offset_freq)/self.samp_rate))
|
|
||||||
self.shift_pipe_file.flush()
|
|
||||||
|
|
||||||
def set_bpf(self,low_cut,high_cut):
|
|
||||||
self.low_cut=low_cut
|
|
||||||
self.high_cut=high_cut
|
|
||||||
if self.running:
|
|
||||||
self.bpf_pipe_file.write( "%g %g\n"%(float(self.low_cut)/self.if_samp_rate(), float(self.high_cut)/self.if_samp_rate()) )
|
|
||||||
self.bpf_pipe_file.flush()
|
|
||||||
|
|
||||||
def get_bpf(self):
|
|
||||||
return [self.low_cut, self.high_cut]
|
|
||||||
|
|
||||||
def set_squelch_level(self, squelch_level):
|
|
||||||
self.squelch_level=squelch_level
|
|
||||||
if self.running:
|
|
||||||
self.squelch_pipe_file.write( "%g\n"%(float(self.squelch_level)) )
|
|
||||||
self.squelch_pipe_file.flush()
|
|
||||||
|
|
||||||
def get_smeter_level(self):
|
|
||||||
if self.running:
|
|
||||||
line=self.smeter_pipe_file.readline()
|
|
||||||
return float(line[:-1])
|
|
||||||
|
|
||||||
def mkfifo(self,path):
|
|
||||||
try:
|
|
||||||
os.unlink(path)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
os.mkfifo(path)
|
|
||||||
|
|
||||||
def ddc_transition_bw(self):
|
|
||||||
return self.ddc_transition_bw_rate*(self.if_samp_rate()/float(self.samp_rate))
|
|
||||||
|
|
||||||
def try_create_pipes(self, pipe_names, command_base):
|
|
||||||
# print "try_create_pipes"
|
|
||||||
for pipe_name in pipe_names:
|
|
||||||
# print "\t"+pipe_name
|
|
||||||
if "{"+pipe_name+"}" in command_base:
|
|
||||||
setattr(self, pipe_name, self.pipe_base_path+pipe_name)
|
|
||||||
self.mkfifo(getattr(self, pipe_name))
|
|
||||||
else:
|
|
||||||
setattr(self, pipe_name, None)
|
|
||||||
|
|
||||||
def try_delete_pipes(self, pipe_names):
|
|
||||||
for pipe_name in pipe_names:
|
|
||||||
pipe_path = getattr(self,pipe_name,None)
|
|
||||||
if pipe_path:
|
|
||||||
try: os.unlink(pipe_path)
|
|
||||||
except Exception as e: print "[openwebrx-dsp-plugin:csdr] try_delete_pipes() ::", e
|
|
||||||
|
|
||||||
def set_pipe_nonblocking(self, pipe):
|
|
||||||
flags = fcntl.fcntl(pipe, fcntl.F_GETFL)
|
|
||||||
fcntl.fcntl(pipe, fcntl.F_SETFL, flags | os.O_NONBLOCK)
|
|
||||||
|
|
||||||
def start(self):
|
|
||||||
command_base=self.chain(self.demodulator)
|
|
||||||
|
|
||||||
#create control pipes for csdr
|
|
||||||
self.pipe_base_path="/tmp/openwebrx_pipe_{myid}_".format(myid=id(self))
|
|
||||||
# self.bpf_pipe = self.shift_pipe = self.squelch_pipe = self.smeter_pipe = None
|
|
||||||
|
|
||||||
self.try_create_pipes(self.pipe_names, command_base)
|
|
||||||
|
|
||||||
# if "{bpf_pipe}" in command_base:
|
|
||||||
# self.bpf_pipe=pipe_base_path+"bpf"
|
|
||||||
# self.mkfifo(self.bpf_pipe)
|
|
||||||
# if "{shift_pipe}" in command_base:
|
|
||||||
# self.shift_pipe=pipe_base_path+"shift"
|
|
||||||
# self.mkfifo(self.shift_pipe)
|
|
||||||
# if "{squelch_pipe}" in command_base:
|
|
||||||
# self.squelch_pipe=pipe_base_path+"squelch"
|
|
||||||
# self.mkfifo(self.squelch_pipe)
|
|
||||||
# if "{smeter_pipe}" in command_base:
|
|
||||||
# self.smeter_pipe=pipe_base_path+"smeter"
|
|
||||||
# self.mkfifo(self.smeter_pipe)
|
|
||||||
# if "{iqtee_pipe}" in command_base:
|
|
||||||
# self.iqtee_pipe=pipe_base_path+"iqtee"
|
|
||||||
# self.mkfifo(self.iqtee_pipe)
|
|
||||||
# if "{iqtee2_pipe}" in command_base:
|
|
||||||
# self.iqtee2_pipe=pipe_base_path+"iqtee2"
|
|
||||||
# self.mkfifo(self.iqtee2_pipe)
|
|
||||||
|
|
||||||
#run the command
|
|
||||||
command=command_base.format( bpf_pipe=self.bpf_pipe, shift_pipe=self.shift_pipe, decimation=self.decimation, \
|
|
||||||
last_decimation=self.last_decimation, fft_size=self.fft_size, fft_block_size=self.fft_block_size(), fft_averages=self.fft_averages, \
|
|
||||||
bpf_transition_bw=float(self.bpf_transition_bw)/self.if_samp_rate(), ddc_transition_bw=self.ddc_transition_bw(), \
|
|
||||||
flowcontrol=int(self.samp_rate*2), start_bufsize=self.base_bufsize*self.decimation, nc_port=self.nc_port, \
|
|
||||||
squelch_pipe=self.squelch_pipe, smeter_pipe=self.smeter_pipe, iqtee_pipe=self.iqtee_pipe, iqtee2_pipe=self.iqtee2_pipe )
|
|
||||||
|
|
||||||
print "[openwebrx-dsp-plugin:csdr] Command =",command
|
|
||||||
#code.interact(local=locals())
|
|
||||||
my_env=os.environ.copy()
|
|
||||||
if self.csdr_dynamic_bufsize: my_env["CSDR_DYNAMIC_BUFSIZE_ON"]="1";
|
|
||||||
if self.csdr_print_bufsizes: my_env["CSDR_PRINT_BUFSIZES"]="1";
|
|
||||||
self.process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setpgrp, env=my_env)
|
|
||||||
self.running = True
|
|
||||||
|
|
||||||
#open control pipes for csdr and send initialization data
|
|
||||||
if self.bpf_pipe != None:
|
|
||||||
self.bpf_pipe_file=open(self.bpf_pipe,"w")
|
|
||||||
self.set_bpf(self.low_cut,self.high_cut)
|
|
||||||
if self.shift_pipe != None:
|
|
||||||
self.shift_pipe_file=open(self.shift_pipe,"w")
|
|
||||||
self.set_offset_freq(self.offset_freq)
|
|
||||||
if self.squelch_pipe != None:
|
|
||||||
self.squelch_pipe_file=open(self.squelch_pipe,"w")
|
|
||||||
self.set_squelch_level(self.squelch_level)
|
|
||||||
if self.smeter_pipe != None:
|
|
||||||
self.smeter_pipe_file=open(self.smeter_pipe,"r")
|
|
||||||
self.set_pipe_nonblocking(self.smeter_pipe_file)
|
|
||||||
|
|
||||||
self.start_secondary_demodulator()
|
|
||||||
|
|
||||||
def read(self,size):
|
|
||||||
return self.process.stdout.read(size)
|
|
||||||
|
|
||||||
def stop(self):
|
|
||||||
os.killpg(os.getpgid(self.process.pid), signal.SIGTERM)
|
|
||||||
self.stop_secondary_demodulator()
|
|
||||||
#if(self.process.poll()!=None):return # returns None while subprocess is running
|
|
||||||
#while(self.process.poll()==None):
|
|
||||||
# #self.process.kill()
|
|
||||||
# print "killproc",os.getpgid(self.process.pid),self.process.pid
|
|
||||||
# os.killpg(self.process.pid, signal.SIGTERM)
|
|
||||||
#
|
|
||||||
# time.sleep(0.1)
|
|
||||||
|
|
||||||
self.try_delete_pipes(self.pipe_names)
|
|
||||||
|
|
||||||
# if self.bpf_pipe:
|
|
||||||
# try: os.unlink(self.bpf_pipe)
|
|
||||||
# except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.bpf_pipe
|
|
||||||
# if self.shift_pipe:
|
|
||||||
# try: os.unlink(self.shift_pipe)
|
|
||||||
# except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.shift_pipe
|
|
||||||
# if self.squelch_pipe:
|
|
||||||
# try: os.unlink(self.squelch_pipe)
|
|
||||||
# except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.squelch_pipe
|
|
||||||
# if self.smeter_pipe:
|
|
||||||
# try: os.unlink(self.smeter_pipe)
|
|
||||||
# except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.smeter_pipe
|
|
||||||
# if self.iqtee_pipe:
|
|
||||||
# try: os.unlink(self.iqtee_pipe)
|
|
||||||
# except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.iqtee_pipe
|
|
||||||
# if self.iqtee2_pipe:
|
|
||||||
# try: os.unlink(self.iqtee2_pipe)
|
|
||||||
# except: print "[openwebrx-dsp-plugin:csdr] stop() :: unlink failed: " + self.iqtee2_pipe
|
|
||||||
|
|
||||||
self.running = False
|
|
||||||
|
|
||||||
def restart(self):
|
|
||||||
self.stop()
|
|
||||||
self.start()
|
|
||||||
|
|
||||||
def __del__(self):
|
|
||||||
self.stop()
|
|
||||||
del(self.process)
|
|
Before Width: | Height: | Size: 9.9 KiB |
0
htdocs/gfx/openwebrx-avatar-background.png
Normal file → Executable file
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 459 B |
BIN
htdocs/gfx/openwebrx-avatar.png
Normal file → Executable file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 742 B |
0
htdocs/gfx/openwebrx-background-cool-blue.png
Normal file → Executable file
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
0
htdocs/gfx/openwebrx-background-lingrad.png
Normal file → Executable file
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
0
htdocs/gfx/openwebrx-ha5kfu-top-logo.png
Normal file → Executable file
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
0
htdocs/gfx/openwebrx-logo-big.png
Normal file → Executable file
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 25 KiB |
0
htdocs/gfx/openwebrx-rx-details-arrow-up.png
Normal file → Executable file
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 518 B |
0
htdocs/gfx/openwebrx-rx-details-arrow.png
Normal file → Executable file
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 505 B |
0
htdocs/gfx/openwebrx-scale-background.png
Normal file → Executable file
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.3 KiB |
0
htdocs/gfx/openwebrx-top-logo.png
Normal file → Executable file
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
0
htdocs/gfx/openwebrx-top-photo.jpg
Normal file → Executable file
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB |
@ -1,85 +0,0 @@
|
|||||||
<html>
|
|
||||||
<!--
|
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as
|
|
||||||
published by the Free Software Foundation, either version 3 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
-->
|
|
||||||
<head><title>OpenWebRX</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<style>
|
|
||||||
html, body
|
|
||||||
{
|
|
||||||
font-family: "DejaVu Sans", Verdana, Geneva, sans-serif;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
img.logo
|
|
||||||
{
|
|
||||||
margin-top: 120px;
|
|
||||||
}
|
|
||||||
div.frame
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
margin:0px auto;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.panel
|
|
||||||
{
|
|
||||||
text-align: center;
|
|
||||||
background-color:#777777;
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: White;
|
|
||||||
font-size: 13pt;
|
|
||||||
/*text-shadow: 1px 1px 4px #444;*/
|
|
||||||
font-family: sans;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.alt
|
|
||||||
{
|
|
||||||
font-size: 10pt;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
body div a
|
|
||||||
{
|
|
||||||
color: #5ca8ff;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.browser
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="frame">
|
|
||||||
<img class="logo" src="gfx/openwebrx-logo-big.png" style="height: 60px;"/>
|
|
||||||
<div class="panel">
|
|
||||||
Sorry, the receiver is inactive due to internal error.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
247
htdocs/index.wrx
Normal file → Executable file
@ -1,180 +1,93 @@
|
|||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<!--
|
<!--
|
||||||
|
OpenWebRX (c) Copyright 2013-2014 Andras Retzler <randras@sdr.hu>
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
This file is part of OpenWebRX.
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
OpenWebRX is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation, either version 3 of the
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
License, or (at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
OpenWebRX is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenWebRX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>OpenWebRX | Open Source SDR Web App for Everyone!</title>
|
<title>OpenWebRX | Open Source Web-based SDR for everyone!</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//Global variables
|
//Local variables
|
||||||
var client_id="%[CLIENT_ID]";
|
client_id="%[CLIENT_ID]";
|
||||||
var ws_url="%[WS_URL]";
|
ws_url="%[WS_URL]";
|
||||||
var rx_photo_height=%[RX_PHOTO_HEIGHT];
|
rx_photo_height=%[RX_PHOTO_HEIGHT];
|
||||||
var audio_buffering_fill_to=%[AUDIO_BUFSIZE];
|
</script>
|
||||||
var starting_mod="%[START_MOD]";
|
<script src="openwebrx.js"></script>
|
||||||
var starting_offset_frequency = %[START_OFFSET_FREQ];
|
<link rel="stylesheet" type="text/css" href="openwebrx.css" />
|
||||||
var waterfall_colors=%[WATERFALL_COLORS];
|
<meta charset="utf-8">
|
||||||
var waterfall_min_level_default=%[WATERFALL_MIN_LEVEL];
|
</head>
|
||||||
var waterfall_max_level_default=%[WATERFALL_MAX_LEVEL];
|
<body onload="openwebrx_init();">
|
||||||
var waterfall_auto_level_margin=%[WATERFALL_AUTO_LEVEL_MARGIN];
|
|
||||||
var server_enable_digimodes=%[DIGIMODES_ENABLE];
|
|
||||||
var mathbox_waterfall_frequency_resolution=%[MATHBOX_WATERFALL_FRES];
|
|
||||||
var mathbox_waterfall_history_length=%[MATHBOX_WATERFALL_THIST];
|
|
||||||
var mathbox_waterfall_colors=%[MATHBOX_WATERFALL_COLORS];
|
|
||||||
</script>
|
|
||||||
<script src="sdr.js"></script>
|
|
||||||
<script src="mathbox-bundle.min.js"></script>
|
|
||||||
<script src="openwebrx.js"></script>
|
|
||||||
<script src="jquery-3.2.1.min.js"></script>
|
|
||||||
<script src="jquery.nanoscroller.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="nanoscroller.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="openwebrx.css" />
|
|
||||||
<meta charset="utf-8">
|
|
||||||
</head>
|
|
||||||
<body onload="openwebrx_init();">
|
|
||||||
<div id="webrx-page-container">
|
<div id="webrx-page-container">
|
||||||
<div id="webrx-top-container">
|
<div id="webrx-top-container">
|
||||||
<div id="webrx-top-photo-clip">
|
<div id="webrx-top-photo-clip">
|
||||||
<img src="gfx/openwebrx-top-photo.jpg" id="webrx-top-photo"/>
|
<img src="gfx/openwebrx-top-photo.jpg" id="webrx-top-photo"/>
|
||||||
<div id="webrx-rx-photo-title">%[RX_PHOTO_TITLE]</div>
|
<div id="webrx-rx-photo-title">%[RX_PHOTO_TITLE]</div>
|
||||||
<div id="webrx-rx-photo-desc">%[RX_PHOTO_DESC]</div>
|
<div id="webrx-rx-photo-desc">%[RX_PHOTO_DESC]</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="webrx-top-bar-background" class="webrx-top-bar-parts"></div>
|
<div id="webrx-top-bar-background" class="webrx-top-bar-parts"></div>
|
||||||
<div id="webrx-top-bar" class="webrx-top-bar-parts">
|
<div id="webrx-top-bar" class="webrx-top-bar-parts">
|
||||||
<a href="https://sdr.hu/openwebrx" target="_blank"><img src="gfx/openwebrx-top-logo.png" id="webrx-top-logo" /></a>
|
<a href="http://openwebrx.org/" target="_blank"><img src="gfx/openwebrx-top-logo.png" id="webrx-top-logo" /></a>
|
||||||
<a href="http://ha5kfu.sch.bme.hu/" target="_blank"><img src="gfx/openwebrx-ha5kfu-top-logo.png" id="webrx-ha5kfu-top-logo" /></a>
|
<a href="http://ha5kfu.sch.bme.hu/" target="_blank"><img src="gfx/openwebrx-ha5kfu-top-logo.png" id="webrx-ha5kfu-top-logo" /></a>
|
||||||
<img id="webrx-rx-avatar-background" src="gfx/openwebrx-avatar-background.png" onclick="toggle_rx_photo();"/>
|
<img id="webrx-rx-avatar-background" src="gfx/openwebrx-avatar-background.png" onclick="toggle_rx_photo();"/>
|
||||||
<img id="webrx-rx-avatar" src="gfx/openwebrx-avatar.png" onclick="toggle_rx_photo();"/>
|
<img id="webrx-rx-avatar" src="gfx/openwebrx-avatar.png" onclick="toggle_rx_photo();"/>
|
||||||
<div id="webrx-rx-title" onclick="toggle_rx_photo();">%[RX_TITLE]</div>
|
<div id="webrx-rx-title" onclick="toggle_rx_photo();">%[RX_TITLE]</div>
|
||||||
<div id="webrx-rx-desc" onclick="toggle_rx_photo();">%[RX_LOC] | Loc: %[RX_QRA], ASL: %[RX_ASL] m, <a href="https://www.google.hu/maps/place/%[RX_GPS]" target="_blank" onclick="dont_toggle_rx_photo();">[maps]</a></div>
|
<div id="webrx-rx-desc" onclick="toggle_rx_photo();">%[RX_LOC] | Loc: %[RX_QRA], ASL: %[RX_ASL] m, <a href="https://www.google.hu/maps/place/%[RX_GPS]" target="_blank" onclick="dont_toggle_rx_photo();">[maps]</a></div>
|
||||||
<div id="openwebrx-rx-details-arrow">
|
<div id="openwebrx-rx-details-arrow">
|
||||||
<a id="openwebrx-rx-details-arrow-up" onclick="toggle_rx_photo();"><img src="gfx/openwebrx-rx-details-arrow-up.png" /></a>
|
<a id="openwebrx-rx-details-arrow-up" onclick="toggle_rx_photo();"><img src="gfx/openwebrx-rx-details-arrow-up.png" /></a>
|
||||||
<a id="openwebrx-rx-details-arrow-down" onclick="toggle_rx_photo();"><img src="gfx/openwebrx-rx-details-arrow.png" /></a>
|
<a id="openwebrx-rx-details-arrow-down" onclick="toggle_rx_photo();"><img src="gfx/openwebrx-rx-details-arrow.png" /></a>
|
||||||
</div>
|
</div>
|
||||||
<section id="openwebrx-main-buttons">
|
</div>
|
||||||
<ul>
|
</div>
|
||||||
<li onmouseup="toggle_panel('openwebrx-panel-status');"><img src="gfx/openwebrx-panel-status.png" /><br/>Status</li>
|
<div id="webrx-main-container">
|
||||||
<li onmouseup="toggle_panel('openwebrx-panel-log');"><img src="gfx/openwebrx-panel-log.png" /><br/>Log</li>
|
<div id="openwebrx-scale-container">
|
||||||
<li onmouseup="toggle_panel('openwebrx-panel-receiver');"><img src="gfx/openwebrx-panel-receiver.png" /><br/>Receiver</li>
|
<canvas id="openwebrx-scale-canvas" width="0" height="0"></canvas>
|
||||||
</ul>
|
</div>
|
||||||
</section>
|
<div id="webrx-canvas-container">
|
||||||
</div>
|
<div id="openwebrx-phantom-canvas"></div>
|
||||||
</div>
|
<!-- add canvas here by javascript -->
|
||||||
<div id="webrx-main-container">
|
</div>
|
||||||
<div id="openwebrx-scale-container">
|
<div id="openwebrx-panels-container">
|
||||||
<canvas id="openwebrx-scale-canvas" width="0" height="0"></canvas>
|
<div class="openwebrx-panel" data-panel-name="client-params" data-panel-pos="right" data-panel-order="0" data-panel-size="215,70">
|
||||||
</div>
|
<div id="webrx-actual-freq">---.--- MHz</div>
|
||||||
<div id="openwebrx-mathbox-container"> </div>
|
<div id="webrx-mouse-freq">---.--- MHz</div>
|
||||||
<div id="webrx-canvas-container">
|
<!--<div class="openwebrx-button" onclick="ws.send('SET mod=wfm');" >WFM</div>-->
|
||||||
<div id="openwebrx-phantom-canvas"></div>
|
<div class="openwebrx-button" onclick="demodulator_analog_replace('nfm');">FM</div>
|
||||||
<!-- add canvas here by javascript -->
|
<div class="openwebrx-button" onclick="demodulator_analog_replace('am');">AM</div>
|
||||||
</div>
|
<div class="openwebrx-button" onclick="demodulator_analog_replace('lsb');">LSB</div>
|
||||||
<div id="openwebrx-panels-container">
|
<div class="openwebrx-button" onclick="demodulator_analog_replace('usb');">USB</div>
|
||||||
<div class="openwebrx-panel" id="openwebrx-panel-receiver" data-panel-name="client-params" data-panel-pos="right" data-panel-order="0" data-panel-size="259,115">
|
<div class="openwebrx-button" onclick="demodulator_analog_replace('cw');">CW</div>
|
||||||
<div id="webrx-actual-freq">---.--- MHz</div>
|
</div>
|
||||||
<div id="webrx-mouse-freq">---.--- MHz</div>
|
<div class="openwebrx-panel" id="webrx-config" data-panel-name="debug" data-panel-pos="left" data-panel-order="0" data-panel-size="585,130">
|
||||||
<div class="openwebrx-panel-line">
|
<div class="openwebrx-panel-inner">
|
||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-nfm"
|
<div id="openwebrx-client-log-title">openwebrx.js (beta) client log </strong><span id="openwebrx-problems"></span></div>
|
||||||
onclick="demodulator_analog_replace('nfm');">FM</div>
|
Author: <a href="javascript:sendmail2('pi7qtu=alz$pc');">HA7ILM</a>. Please send me bug reports and suggestions.<br/>
|
||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-am"
|
Client status: <span id="openwebrx-client-status">
|
||||||
onclick="demodulator_analog_replace('am');">AM</div>
|
<span id="openwebrx-audio-sps"></span><br/>
|
||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-lsb"
|
<!--Server status: <span id="openwebrx-server-status">no information</span><br/>-->
|
||||||
onclick="demodulator_analog_replace('lsb');">LSB</div>
|
Your client ID is: <em>%[CLIENT_ID]</em><br />
|
||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-usb"
|
<div id="openwebrx-debugdiv"></div>
|
||||||
onclick="demodulator_analog_replace('usb');">USB</div>
|
</div>
|
||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-cw"
|
</div>
|
||||||
onclick="demodulator_analog_replace('cw');">CW</div>
|
<div class="openwebrx-panel" data-panel-name="client-under-devel" data-panel-pos="none" data-panel-order="0" data-panel-size="245,55" style="background-color: Red;">
|
||||||
</div>
|
<span style="font-size: 15pt; font-weight: bold;">Under construction</span>
|
||||||
<div class="openwebrx-panel-line">
|
<br />We're working on the code right now, so the application might fail.
|
||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-dig" onclick="demodulator_digital_replace_last();">DIG</div>
|
</div>
|
||||||
<select id="openwebrx-secondary-demod-listbox" onchange="secondary_demod_listbox_changed();">
|
</div>
|
||||||
<option value="none"></option>
|
</div>
|
||||||
<option value="bpsk31">BPSK31</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel-line">
|
|
||||||
<div title="Mute on/off" id="openwebrx-mute-off" class="openwebrx-button" onclick="toggleMute();"><img src="gfx/openwebrx-speaker.png" class="openwebrx-sliderbtn-img" id="openwebrx-mute-img"></div>
|
|
||||||
<input title="Volume" id="openwebrx-panel-volume" class="openwebrx-panel-slider" type="range" min="0" max="150" value="50" step="1" onchange="updateVolume()" oninput="updateVolume()">
|
|
||||||
<div title="Auto-adjust waterfall colors" id="openwebrx-waterfall-colors-auto" class="openwebrx-button" onclick="waterfall_measure_minmax_now=true;"><img src="gfx/openwebrx-waterfall-auto.png" class="openwebrx-sliderbtn-img"></div>
|
|
||||||
<input title="Waterfall minimum level" id="openwebrx-waterfall-color-min" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(0);" oninput="updateVolume()">
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel-line">
|
|
||||||
<div title="Auto-set squelch level" id="openwebrx-squelch-default" class="openwebrx-button" onclick="setSquelchToAuto()"><img src="gfx/openwebrx-squelch-button.png" class="openwebrx-sliderbtn-img"></div>
|
|
||||||
<input title="Squelch" id="openwebrx-panel-squelch" class="openwebrx-panel-slider" type="range" min="-150" max="0" value="-150" step="1" onchange="updateSquelch()" oninput="updateSquelch()">
|
|
||||||
<div title="Set waterfall colors to default" id="openwebrx-waterfall-colors-default" class="openwebrx-button" onclick="waterfallColorsDefault()"><img src="gfx/openwebrx-waterfall-default.png" class="openwebrx-sliderbtn-img"></div>
|
|
||||||
<input title="Waterfall maximum level" id="openwebrx-waterfall-color-max" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(1);" oninput="updateVolume()">
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel-line">
|
|
||||||
<div class="openwebrx-button openwebrx-square-button" onclick="zoomInOneStep();" title="Zoom in one step"> <img src="gfx/openwebrx-zoom-in.png" /></div>
|
|
||||||
<div class="openwebrx-button openwebrx-square-button" onclick="zoomOutOneStep();" title="Zoom out one step"> <img src="gfx/openwebrx-zoom-out.png" /></div>
|
|
||||||
<div class="openwebrx-button openwebrx-square-button" onclick="zoomInTotal();" title="Zoom in totally"><img src="gfx/openwebrx-zoom-in-total.png" /></div>
|
|
||||||
<div class="openwebrx-button openwebrx-square-button" onclick="zoomOutTotal();" title="Zoom out totally"><img src="gfx/openwebrx-zoom-out-total.png" /></div>
|
|
||||||
<div class="openwebrx-button openwebrx-square-button" onclick="mathbox_toggle();" title="Toggle 3D view"><img src="gfx/openwebrx-3d-spectrum.png" /></div>
|
|
||||||
<div id="openwebrx-smeter-db">0 dB</div>
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel-line">
|
|
||||||
<div id="openwebrx-smeter-outer">
|
|
||||||
<div id="openwebrx-smeter-bar"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel" id="openwebrx-panel-log" data-panel-name="debug" data-panel-pos="left" data-panel-order="1" data-panel-size="619,137">
|
|
||||||
<div class="openwebrx-panel-inner nano" id="openwebrx-log-scroll">
|
|
||||||
<div class="nano-content">
|
|
||||||
<div id="openwebrx-client-log-title">OpenWebRX client log</strong><span id="openwebrx-problems"></span></div>
|
|
||||||
<span id="openwebrx-client-1">Author: </span><a href="http://blog.sdr.hu/about" target="_blank">András Retzler, HA7ILM</a><br />You can <a href="http://blog.sdr.hu/support" target="_blank">donate</a> to say thanks for former development (this is the final version).<br/>
|
|
||||||
<div id="openwebrx-debugdiv"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel" id="openwebrx-panel-status" data-panel-name="status" data-panel-pos="left" data-panel-order="0" data-panel-size="615,50" data-panel-transparent="true">
|
|
||||||
<div class="openwebrx-progressbar" id="openwebrx-bar-audio-buffer"> <span class="openwebrx-progressbar-text">Audio buffer [0 ms]</span><div class="openwebrx-progressbar-bar"></div></div>
|
|
||||||
<div class="openwebrx-progressbar" id="openwebrx-bar-audio-output"> <span class="openwebrx-progressbar-text">Audio output [0 sps]</span><div class="openwebrx-progressbar-bar"></div></div>
|
|
||||||
<div class="openwebrx-progressbar" id="openwebrx-bar-audio-speed"> <span class="openwebrx-progressbar-text">Audio stream [0 kbps]</span><div class="openwebrx-progressbar-bar"></div></div>
|
|
||||||
<div class="openwebrx-progressbar" id="openwebrx-bar-network-speed"> <span class="openwebrx-progressbar-text">Network usage [0 kbps]</span><div class="openwebrx-progressbar-bar"></div></div>
|
|
||||||
<div class="openwebrx-progressbar" id="openwebrx-bar-server-cpu"> <span class="openwebrx-progressbar-text">Server CPU [0%]</span><div class="openwebrx-progressbar-bar"></div></div>
|
|
||||||
<div class="openwebrx-progressbar" id="openwebrx-bar-clients"> <span class="openwebrx-progressbar-text">Clients [1]</span><div class="openwebrx-progressbar-bar"></div></div>
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel" data-panel-name="client-under-devel" data-panel-pos="none" data-panel-order="0" data-panel-size="245,55" style="background-color: Red;">
|
|
||||||
<span style="font-size: 15pt; font-weight: bold;">Under construction</span>
|
|
||||||
<br />We're working on the code right now, so the application might fail.
|
|
||||||
</div>
|
|
||||||
<div class="openwebrx-panel" id="openwebrx-panel-digimodes" data-panel-name="digimodes" data-panel-pos="left" data-panel-order="2" data-panel-size="619,210">
|
|
||||||
<div id="openwebrx-digimode-canvas-container">
|
|
||||||
<div id="openwebrx-digimode-select-channel"></div>
|
|
||||||
</div>
|
|
||||||
<div id="openwebrx-digimode-content-container">
|
|
||||||
<div class="gradient"></div>
|
|
||||||
<div id="openwebrx-digimode-content">
|
|
||||||
<span id="openwebrx-cursor-blink"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="openwebrx-big-grey" onclick="iosPlayButtonClick();">
|
</body>
|
||||||
<div id="openwebrx-play-button-text">
|
|
||||||
<img id="openwebrx-play-button" src="gfx/openwebrx-play-button.png" />
|
|
||||||
<br /><br />Start OpenWebRX
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
4
htdocs/jquery-3.2.1.min.js
vendored
33
htdocs/mathbox-bundle.min.js
vendored
@ -1,461 +0,0 @@
|
|||||||
.shadergraph-graph {
|
|
||||||
font: 12px sans-serif;
|
|
||||||
line-height: 25px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.shadergraph-graph:after {
|
|
||||||
content: ' ';
|
|
||||||
display: block;
|
|
||||||
height: 0;
|
|
||||||
font-size: 0;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.shadergraph-graph svg {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.shadergraph-clear {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.shadergraph-graph svg {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: auto;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
.shadergraph-column {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.shadergraph-node .shadergraph-graph {
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
.shadergraph-node .shadergraph-graph .shadergraph-node {
|
|
||||||
margin: 5px 15px 15px;
|
|
||||||
}
|
|
||||||
.shadergraph-node {
|
|
||||||
margin: 5px 15px 25px;
|
|
||||||
background: rgba(0, 0, 0, .1);
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .2),
|
|
||||||
0 1px 10px rgba(0, 0, 0, .2);
|
|
||||||
min-height: 35px;
|
|
||||||
float: left;
|
|
||||||
clear: left;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.shadergraph-type {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.shadergraph-header {
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
height: 25px;
|
|
||||||
background: rgba(0, 0, 0, .3);
|
|
||||||
text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
|
|
||||||
color: #fff;
|
|
||||||
border-top-left-radius: 5px;
|
|
||||||
border-top-right-radius: 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
.shadergraph-outlet div {
|
|
||||||
}
|
|
||||||
.shadergraph-outlet-in .shadergraph-name {
|
|
||||||
margin-right: 7px;
|
|
||||||
}
|
|
||||||
.shadergraph-outlet-out .shadergraph-name {
|
|
||||||
margin-left: 7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shadergraph-name {
|
|
||||||
margin: 0 4px;
|
|
||||||
}
|
|
||||||
.shadergraph-point {
|
|
||||||
margin: 6px;
|
|
||||||
width: 11px;
|
|
||||||
height: 11px;
|
|
||||||
border-radius: 7.5px;
|
|
||||||
background: rgba(255, 255, 255, 1);
|
|
||||||
}
|
|
||||||
.shadergraph-outlet-in {
|
|
||||||
float: left;
|
|
||||||
clear: left;
|
|
||||||
}
|
|
||||||
.shadergraph-outlet-in div {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.shadergraph-outlet-out {
|
|
||||||
float: right;
|
|
||||||
clear: right;
|
|
||||||
}
|
|
||||||
.shadergraph-outlet-out div {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shadergraph-node-callback {
|
|
||||||
background: rgba(205, 209, 221, .5);
|
|
||||||
box-shadow: 0 1px 2px rgba(0, 10, 40, .2),
|
|
||||||
0 1px 10px rgba(0, 10, 40, .2);
|
|
||||||
}
|
|
||||||
.shadergraph-node-callback > .shadergraph-header {
|
|
||||||
background: rgba(0, 20, 80, .3);
|
|
||||||
}
|
|
||||||
.shadergraph-graph .shadergraph-graph .shadergraph-node-callback {
|
|
||||||
background: rgba(0, 20, 80, .1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.shadergraph-node-call {
|
|
||||||
background: rgba(209, 221, 205, .5);
|
|
||||||
box-shadow: 0 1px 2px rgba(10, 40, 0, .2),
|
|
||||||
0 1px 10px rgba(10, 40, 0, .2);
|
|
||||||
}
|
|
||||||
.shadergraph-node-call > .shadergraph-header {
|
|
||||||
background: rgba(20, 80, 0, .3);
|
|
||||||
}
|
|
||||||
.shadergraph-graph .shadergraph-graph .shadergraph-node-call {
|
|
||||||
background: rgba(20, 80, 0, .1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.shadergraph-node-isolate {
|
|
||||||
background: rgba(221, 205, 209, .5);
|
|
||||||
box-shadow: 0 1px 2px rgba(40, 0, 10, .2),
|
|
||||||
0 1px 10px rgba(40, 0, 10, .2);
|
|
||||||
}
|
|
||||||
.shadergraph-node-isolate > .shadergraph-header {
|
|
||||||
background: rgba(80, 0, 20, .3);
|
|
||||||
}
|
|
||||||
.shadergraph-graph .shadergraph-graph .shadergraph-node-isolate {
|
|
||||||
background: rgba(80, 0, 20, .1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.shadergraph-node.shadergraph-has-code {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.shadergraph-node.shadergraph-has-code::before {
|
|
||||||
position: absolute;
|
|
||||||
content: ' ';
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
display: none;
|
|
||||||
border: 2px solid rgba(0, 0, 0, .25);
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.shadergraph-node.shadergraph-has-code:hover::before {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.shadergraph-code {
|
|
||||||
z-index: 10000;
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
background: #fff;
|
|
||||||
color: #000;
|
|
||||||
white-space: pre;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .2),
|
|
||||||
0 1px 10px rgba(0, 0, 0, .2);
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 10px;
|
|
||||||
line-height: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shadergraph-overlay {
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: #fff;
|
|
||||||
border-top: 1px solid #CCC;
|
|
||||||
}
|
|
||||||
.shadergraph-overlay .shadergraph-view {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.shadergraph-overlay .shadergraph-inside {
|
|
||||||
width: 4000px;
|
|
||||||
min-height: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.shadergraph-overlay .shadergraph-close {
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
right: 5px;
|
|
||||||
padding: 4px;
|
|
||||||
border-radius: 16px;
|
|
||||||
background: rgba(255,255,255,.3);
|
|
||||||
color: rgba(0, 0, 0, .3);
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 24px;
|
|
||||||
line-height: 24px;
|
|
||||||
width: 24px;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.shadergraph-overlay .shadergraph-close:hover {
|
|
||||||
background: rgba(255,255,255,1);
|
|
||||||
color: rgba(0, 0, 0, 1);
|
|
||||||
}
|
|
||||||
.shadergraph-overlay .shadergraph-graph {
|
|
||||||
padding-top: 10px;
|
|
||||||
overflow: visible;
|
|
||||||
min-height: 100%;
|
|
||||||
}
|
|
||||||
.shadergraph-overlay span {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 15px;
|
|
||||||
margin: 0;
|
|
||||||
background: rgba(0, 0, 0, .1);
|
|
||||||
font-weight: bold;
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
.mathbox-loader {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
-webkit-transform: translate(-50%, -50%);
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-loader.mathbox-exit {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition:
|
|
||||||
opacity .15s ease-in-out;
|
|
||||||
transition:
|
|
||||||
opacity .15s ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-progress {
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
width: 80px;
|
|
||||||
margin: 0 auto 20px;
|
|
||||||
box-shadow:
|
|
||||||
1px 1px 1px rgba(255, 255, 255, .2),
|
|
||||||
1px -1px 1px rgba(255, 255, 255, .2),
|
|
||||||
-1px 1px 1px rgba(255, 255, 255, .2),
|
|
||||||
-1px -1px 1px rgba(255, 255, 255, .2);
|
|
||||||
background: #ccc;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-progress > div {
|
|
||||||
display: block;
|
|
||||||
width: 0px;
|
|
||||||
height: 10px;
|
|
||||||
background: #888;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo {
|
|
||||||
position: relative;
|
|
||||||
width: 140px;
|
|
||||||
height: 100px;
|
|
||||||
margin: 0 auto 10px;
|
|
||||||
-webkit-perspective: 200px;
|
|
||||||
perspective: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > div {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
-webkit-transform-style: preserve-3d;
|
|
||||||
transform-style: preserve-3d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > :nth-child(1) {
|
|
||||||
-webkit-transform: rotateZ(22deg) rotateX(24deg) rotateY(30deg);
|
|
||||||
transform: rotateZ(22deg) rotateX(24deg) rotateY(30deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > :nth-child(2) {
|
|
||||||
-webkit-transform: rotateZ(11deg) rotateX(12deg) rotateY(15deg) scale3d(.6, .6, .6);
|
|
||||||
transform: rotateZ(11deg) rotateX(12deg) rotateY(15deg) scale3d(.6, .6, .6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > div > div {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -100px;
|
|
||||||
margin-top: -100px;
|
|
||||||
width: 200px;
|
|
||||||
height: 200px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > div > :nth-child(1) {
|
|
||||||
-webkit-transform: scale(0.5, 0.5);
|
|
||||||
transform: rotateX(30deg) scale(0.5, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > div > :nth-child(2) {
|
|
||||||
-webkit-transform: rotateX(90deg) scale(0.42, 0.42);
|
|
||||||
transform: rotateX(90deg) scale(0.42, 0.42);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > div > :nth-child(3) {
|
|
||||||
-webkit-transform: rotateY(90deg) scale(0.35, 0.35);
|
|
||||||
transform: rotateY(90deg) scale(0.35, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-logo > :nth-child(1) > :nth-child(1) {
|
|
||||||
border: 16px solid #808080;
|
|
||||||
}
|
|
||||||
.mathbox-logo > :nth-child(1) > :nth-child(2) {
|
|
||||||
border: 19px solid #A0A0A0;
|
|
||||||
}
|
|
||||||
.mathbox-logo > :nth-child(1) > :nth-child(3) {
|
|
||||||
border: 23px solid #C0C0C0;
|
|
||||||
}
|
|
||||||
.mathbox-logo > :nth-child(2) > :nth-child(1) {
|
|
||||||
border: 27px solid #808080;
|
|
||||||
}
|
|
||||||
.mathbox-logo > :nth-child(2) > :nth-child(2) {
|
|
||||||
border: 32px solid #A0A0A0;
|
|
||||||
}
|
|
||||||
.mathbox-logo > :nth-child(2) > :nth-child(3) {
|
|
||||||
border: 38px solid #C0C0C0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mathbox-splash-blue .mathbox-progress {
|
|
||||||
background: #def;
|
|
||||||
}
|
|
||||||
.mathbox-splash-blue .mathbox-progress > div {
|
|
||||||
background: #1979e7;
|
|
||||||
}
|
|
||||||
.mathbox-splash-blue .mathbox-logo > :nth-child(1) > :nth-child(1) {
|
|
||||||
border-color: #1979e7;
|
|
||||||
}
|
|
||||||
.mathbox-splash-blue .mathbox-logo > :nth-child(1) > :nth-child(2) {
|
|
||||||
border-color: #33b0ff;
|
|
||||||
}
|
|
||||||
.mathbox-splash-blue .mathbox-logo > :nth-child(1) > :nth-child(3) {
|
|
||||||
border-color: #75eaff;
|
|
||||||
}
|
|
||||||
.mathbox-splash-blue .mathbox-logo > :nth-child(2) > :nth-child(1) {
|
|
||||||
border-color: #18487F;
|
|
||||||
}
|
|
||||||
.mathbox-splash-blue .mathbox-logo > :nth-child(2) > :nth-child(2) {
|
|
||||||
border-color: #33b0ff;
|
|
||||||
}
|
|
||||||
.mathbox-splash-blue .mathbox-logo > :nth-child(2) > :nth-child(3) {
|
|
||||||
border-color: #75eaff;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.mathbox-overlays {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
transform-style: preserve-3d;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.mathbox-overlays > div {
|
|
||||||
transform-style: preserve-3d;
|
|
||||||
}
|
|
||||||
.mathbox-overlay > div {
|
|
||||||
position: absolute;
|
|
||||||
will-change: transform, opacity;
|
|
||||||
}
|
|
||||||
.mathbox-label {
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
.mathbox-outline-1 {
|
|
||||||
text-shadow:
|
|
||||||
-1px -1px 0px rgb(255, 255, 255),
|
|
||||||
1px 1px 0px rgb(255, 255, 255),
|
|
||||||
-1px 1px 0px rgb(255, 255, 255),
|
|
||||||
1px -1px 0px rgb(255, 255, 255),
|
|
||||||
1px 0px 1px rgb(255, 255, 255),
|
|
||||||
-1px 0px 1px rgb(255, 255, 255),
|
|
||||||
0px -1px 1px rgb(255, 255, 255),
|
|
||||||
0px 1px 1px rgb(255, 255, 255);
|
|
||||||
}
|
|
||||||
.mathbox-outline-2 {
|
|
||||||
text-shadow:
|
|
||||||
0px -2px 0px rgb(255, 255, 255),
|
|
||||||
0px 2px 0px rgb(255, 255, 255),
|
|
||||||
-2px 0px 0px rgb(255, 255, 255),
|
|
||||||
2px 0px 0px rgb(255, 255, 255),
|
|
||||||
-1px -2px 0px rgb(255, 255, 255),
|
|
||||||
-2px -1px 0px rgb(255, 255, 255),
|
|
||||||
-1px 2px 0px rgb(255, 255, 255),
|
|
||||||
-2px 1px 0px rgb(255, 255, 255),
|
|
||||||
1px 2px 0px rgb(255, 255, 255),
|
|
||||||
2px 1px 0px rgb(255, 255, 255),
|
|
||||||
1px -2px 0px rgb(255, 255, 255),
|
|
||||||
2px -1px 0px rgb(255, 255, 255);
|
|
||||||
}
|
|
||||||
.mathbox-outline-3 {
|
|
||||||
text-shadow:
|
|
||||||
3px 0px 0px rgb(255, 255, 255),
|
|
||||||
-3px 0px 0px rgb(255, 255, 255),
|
|
||||||
0px 3px 0px rgb(255, 255, 255),
|
|
||||||
0px -3px 0px rgb(255, 255, 255),
|
|
||||||
|
|
||||||
-2px -2px 0px rgb(255, 255, 255),
|
|
||||||
-2px 2px 0px rgb(255, 255, 255),
|
|
||||||
2px 2px 0px rgb(255, 255, 255),
|
|
||||||
2px -2px 0px rgb(255, 255, 255),
|
|
||||||
|
|
||||||
-1px -2px 1px rgb(255, 255, 255),
|
|
||||||
-2px -1px 1px rgb(255, 255, 255),
|
|
||||||
-1px 2px 1px rgb(255, 255, 255),
|
|
||||||
-2px 1px 1px rgb(255, 255, 255),
|
|
||||||
1px 2px 1px rgb(255, 255, 255),
|
|
||||||
2px 1px 1px rgb(255, 255, 255),
|
|
||||||
1px -2px 1px rgb(255, 255, 255),
|
|
||||||
2px -1px 1px rgb(255, 255, 255);
|
|
||||||
}
|
|
||||||
.mathbox-outline-4 {
|
|
||||||
text-shadow:
|
|
||||||
4px 0px 0px rgb(255, 255, 255),
|
|
||||||
-4px 0px 0px rgb(255, 255, 255),
|
|
||||||
0px 4px 0px rgb(255, 255, 255),
|
|
||||||
0px -4px 0px rgb(255, 255, 255),
|
|
||||||
|
|
||||||
-3px -2px 0px rgb(255, 255, 255),
|
|
||||||
-3px 2px 0px rgb(255, 255, 255),
|
|
||||||
3px 2px 0px rgb(255, 255, 255),
|
|
||||||
3px -2px 0px rgb(255, 255, 255),
|
|
||||||
|
|
||||||
-2px -3px 0px rgb(255, 255, 255),
|
|
||||||
-2px 3px 0px rgb(255, 255, 255),
|
|
||||||
2px 3px 0px rgb(255, 255, 255),
|
|
||||||
2px -3px 0px rgb(255, 255, 255),
|
|
||||||
|
|
||||||
-1px -2px 1px rgb(255, 255, 255),
|
|
||||||
-2px -1px 1px rgb(255, 255, 255),
|
|
||||||
-1px 2px 1px rgb(255, 255, 255),
|
|
||||||
-2px 1px 1px rgb(255, 255, 255),
|
|
||||||
1px 2px 1px rgb(255, 255, 255),
|
|
||||||
2px 1px 1px rgb(255, 255, 255),
|
|
||||||
1px -2px 1px rgb(255, 255, 255),
|
|
||||||
2px -1px 1px rgb(255, 255, 255);
|
|
||||||
|
|
||||||
}
|
|
||||||
.mathbox-outline-fill, .mathbox-outline-fill * {
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
/** initial setup **/
|
|
||||||
.nano {
|
|
||||||
position : relative;
|
|
||||||
width : 100%;
|
|
||||||
height : 100%;
|
|
||||||
overflow : hidden;
|
|
||||||
}
|
|
||||||
.nano > .nano-content {
|
|
||||||
position : absolute;
|
|
||||||
overflow : scroll;
|
|
||||||
overflow-x : hidden;
|
|
||||||
top : 0;
|
|
||||||
right : 0;
|
|
||||||
bottom : 0;
|
|
||||||
left : 0;
|
|
||||||
}
|
|
||||||
.nano > .nano-content:focus {
|
|
||||||
outline: thin dotted;
|
|
||||||
}
|
|
||||||
.nano > .nano-content::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.has-scrollbar > .nano-content::-webkit-scrollbar {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.nano > .nano-pane {
|
|
||||||
background : rgba(0,0,0,.25);
|
|
||||||
position : absolute;
|
|
||||||
width : 8px;
|
|
||||||
right : 0;
|
|
||||||
top : 0;
|
|
||||||
bottom : 0;
|
|
||||||
visibility : hidden\9; /* Target only IE7 and IE8 with this hack */
|
|
||||||
opacity : .01;
|
|
||||||
-webkit-transition : .2s;
|
|
||||||
-moz-transition : .2s;
|
|
||||||
-o-transition : .2s;
|
|
||||||
transition : .2s;
|
|
||||||
-moz-border-radius : 3px;
|
|
||||||
-webkit-border-radius : 3px;
|
|
||||||
border-radius : 3px;
|
|
||||||
}
|
|
||||||
.nano > .nano-pane > .nano-slider {
|
|
||||||
background: #444;
|
|
||||||
background: rgba(0,0,0,.5);
|
|
||||||
position : relative;
|
|
||||||
margin : 0 0px;
|
|
||||||
-moz-border-radius : 4px;
|
|
||||||
-webkit-border-radius : 4px;
|
|
||||||
border-radius : 4px;
|
|
||||||
}
|
|
||||||
.nano:hover > .nano-pane, .nano-pane.active, .nano-pane.flashed {
|
|
||||||
visibility : visible\9; /* Target only IE7 and IE8 with this hack */
|
|
||||||
opacity : 0.99;
|
|
||||||
}
|
|
600
htdocs/openwebrx.css
Normal file → Executable file
@ -1,152 +1,31 @@
|
|||||||
/*
|
/*
|
||||||
|
OpenWebRX (c) Copyright 2013-2014 Andras Retzler <randras@sdr.hu>
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
This file is part of OpenWebRX.
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
OpenWebRX is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation, either version 3 of the
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
License, or (at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
OpenWebRX is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenWebRX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
html, body
|
html, body
|
||||||
{
|
{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: "DejaVu Sans", Verdana, Geneva, sans-serif;
|
font-family: "DejaVu Sans", Verdana, Geneva, sans-serif;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
select
|
|
||||||
{
|
|
||||||
font-family: "DejaVu Sans", Verdana, Geneva, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
input
|
|
||||||
{
|
|
||||||
vertical-align:middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]
|
|
||||||
{
|
|
||||||
-webkit-appearance: none;
|
|
||||||
margin: 0 0;
|
|
||||||
}
|
|
||||||
input[type=range]:focus
|
|
||||||
{
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-webkit-slider-runnable-track
|
|
||||||
{
|
|
||||||
height: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
animate: 0.2s;
|
|
||||||
box-shadow: 0px 0px 0px #000000;
|
|
||||||
background: #B6B6B6;
|
|
||||||
/*border-radius: 11px;*/
|
|
||||||
border: 1px solid #8A8A8A;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-webkit-slider-thumb
|
|
||||||
{
|
|
||||||
box-shadow: 1px 1px 1px #828282;
|
|
||||||
border: 1px solid #8A8A8A;
|
|
||||||
height: 15px;
|
|
||||||
width: 15px;
|
|
||||||
border-radius: 10px;
|
|
||||||
background: #FFFFFF;
|
|
||||||
cursor: pointer;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
margin-top: -7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]:focus::-webkit-slider-runnable-track
|
|
||||||
{
|
|
||||||
background: #B6B6B6;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-moz-range-track
|
|
||||||
{
|
|
||||||
height: 3px;
|
|
||||||
cursor: pointer;
|
|
||||||
animate: 0.2s;
|
|
||||||
box-shadow: 0px 0px 0px #000000;
|
|
||||||
background: #B6B6B6;
|
|
||||||
border-radius: 11px;
|
|
||||||
border: 1px solid #8A8A8A;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-moz-range-thumb
|
|
||||||
{
|
|
||||||
box-shadow: 1px 1px 1px #828282;
|
|
||||||
border: 1px solid #8A8A8A;
|
|
||||||
height: 12px;
|
|
||||||
width: 12px;
|
|
||||||
border-radius: 10px;
|
|
||||||
background: #FFFFFF;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-ms-track
|
|
||||||
{
|
|
||||||
width: 100%;
|
|
||||||
height: 7px;
|
|
||||||
cursor: pointer;
|
|
||||||
animate: 0.2s;
|
|
||||||
background: transparent;
|
|
||||||
border-color: transparent;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-ms-fill-lower
|
|
||||||
{
|
|
||||||
background: #B6B6B6;
|
|
||||||
border: 1px solid #8A8A8A;
|
|
||||||
border-radius: 22px;
|
|
||||||
box-shadow: 0px 0px 0px #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-ms-fill-upper
|
|
||||||
{
|
|
||||||
background: #B6B6B6;
|
|
||||||
border: 1px solid #8A8A8A;
|
|
||||||
border-radius: 22px;
|
|
||||||
box-shadow: 0px 0px 0px #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]::-ms-thumb
|
|
||||||
{
|
|
||||||
box-shadow: 1px 1px 1px #828282;
|
|
||||||
border: 1px solid #8A8A8A;
|
|
||||||
height: 24px;
|
|
||||||
width: 7px;
|
|
||||||
border-radius: 0px;
|
|
||||||
background: #FFFFFF;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]:focus::-ms-fill-lower
|
|
||||||
{
|
|
||||||
background: #B6B6B6;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=range]:focus::-ms-fill-upper
|
|
||||||
{
|
|
||||||
background: #B6B6B6;
|
|
||||||
}
|
|
||||||
|
|
||||||
#webrx-top-container
|
#webrx-top-container
|
||||||
{
|
{
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -173,14 +52,9 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
{
|
{
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
user-select: none;
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#webrx-top-logo
|
#webrx-top-logo
|
||||||
{
|
{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -191,7 +65,7 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
#webrx-ha5kfu-top-logo
|
#webrx-ha5kfu-top-logo
|
||||||
{
|
{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 15px;
|
top: 19px;
|
||||||
right: 15px;
|
right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +120,7 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
background-image:url(gfx/webrx-photo-gradient-corner.png);
|
background-image:url(gfx/webrx-photo-gradient-corner.png);
|
||||||
width: 59px;
|
width: 59px;
|
||||||
height: 92px;
|
height: 92px;
|
||||||
|
|
||||||
@ -259,7 +133,7 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
left: 59px;
|
left: 59px;
|
||||||
right: 59px;
|
right: 59px;
|
||||||
height: 92px;
|
height: 92px;
|
||||||
background-image:url(gfx/webrx-photo-gradient-middle.png);
|
background-image:url(gfx/webrx-photo-gradient-middle.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
#webrx-photo-gradient-right
|
#webrx-photo-gradient-right
|
||||||
@ -267,7 +141,7 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
background-image:url(gfx/webrx-photo-gradient-corner.png);
|
background-image:url(gfx/webrx-photo-gradient-corner.png);
|
||||||
width: 59px;
|
width: 59px;
|
||||||
height: 92px;
|
height: 92px;
|
||||||
-webkit-transform:scaleX(-1);
|
-webkit-transform:scaleX(-1);
|
||||||
@ -303,10 +177,8 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
|
|
||||||
#webrx-rx-photo-desc a
|
#webrx-rx-photo-desc a
|
||||||
{
|
{
|
||||||
/*color: #007df1;*/
|
|
||||||
color: #5ca8ff;
|
color: #5ca8ff;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
/*text-shadow: 0px 0px 7px #fff;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#webrx-rx-title
|
#webrx-rx-title
|
||||||
@ -397,15 +269,6 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
{
|
{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
image-rendering: crisp-edges;
|
|
||||||
image-rendering: -webkit-optimize-contrast;
|
|
||||||
/*transition: left 200ms, width 200ms;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-mathbox-container
|
|
||||||
{
|
|
||||||
overflow: none;
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#openwebrx-phantom-canvas
|
#openwebrx-phantom-canvas
|
||||||
@ -422,15 +285,11 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
height: 396px;
|
height: 396px;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#openwebrx-log-scroll
|
/*#webrx-debugdiv
|
||||||
{
|
{
|
||||||
/*overflow-y:auto;*/
|
font-size: 10pt;
|
||||||
height: 125px;
|
/*overflow-y:scroll;*/
|
||||||
width: 619px
|
/*}*/
|
||||||
}
|
|
||||||
|
|
||||||
.nano .nano-pane { background: #444; }
|
|
||||||
.nano .nano-slider { background: #eee !important; }
|
|
||||||
|
|
||||||
#webrx-main-container
|
#webrx-main-container
|
||||||
{
|
{
|
||||||
@ -471,7 +330,7 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
background-color: #999999;
|
background-color: #999999;
|
||||||
color: White;
|
color: White;
|
||||||
z-index:9999; /*should be higher?
|
z-index:9999; /*should be higher?
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
/* removed non-free fonts like that: */
|
/* removed non-free fonts like that: */
|
||||||
@ -499,7 +358,7 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height:22px;
|
line-height:22px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#webrx-mouse-freq
|
#webrx-mouse-freq
|
||||||
@ -512,10 +371,8 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.openwebrx-panel
|
.openwebrx-panel
|
||||||
{
|
{
|
||||||
transform: perspective( 600px ) rotateX( 90deg );
|
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
background-color: #575757;
|
background-color: #575757;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@ -542,25 +399,20 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
.openwebrx-button
|
.openwebrx-button
|
||||||
{
|
{
|
||||||
background-color: #373737;
|
background-color: #373737;
|
||||||
padding: 4.2px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
color: White;
|
color: White;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: 1px;
|
width: auto;
|
||||||
|
float: left;
|
||||||
|
margin-right: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.0 , #373737), color-stop(1, #4F4F4F) );
|
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.0 , #373737), color-stop(1, #4F4F4F) );
|
||||||
background:-moz-linear-gradient( center top, #373737 0%, #4F4F4F 100% );
|
background:-moz-linear-gradient( center top, #373737 0%, #4F4F4F 100% );
|
||||||
user-select: none;
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.openwebrx-button:hover, .openwebrx-demodulator-button.highlighted
|
.openwebrx-button:hover
|
||||||
{
|
{
|
||||||
/*background:-webkit-gradient( linear, left top, left bottom, color-stop(0.0 , #3F3F3F), color-stop(1, #777777) );
|
/*background:-webkit-gradient( linear, left top, left bottom, color-stop(0.0 , #3F3F3F), color-stop(1, #777777) );
|
||||||
background:-moz-linear-gradient( center top, #373737 5%, #4F4F4F 100% );*/
|
background:-moz-linear-gradient( center top, #373737 5%, #4F4F4F 100% );*/
|
||||||
@ -568,406 +420,14 @@ input[type=range]:focus::-ms-fill-upper
|
|||||||
color: #FFFF50;
|
color: #FFFF50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openwebrx-button:active
|
.openwebrx-button:active
|
||||||
{
|
{
|
||||||
background: #777777;
|
background: #777777;
|
||||||
color: #FFFF50;
|
color: #FFFF50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openwebrx-demodulator-button
|
#openwebrx-client-log-title
|
||||||
{
|
|
||||||
width: 38px;
|
|
||||||
height: 19px;
|
|
||||||
font-size: 12pt;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-square-button img
|
|
||||||
{
|
|
||||||
height: 27px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-round-button
|
|
||||||
{
|
|
||||||
margin-right: -2px;
|
|
||||||
width: 35px;
|
|
||||||
height: 35px;
|
|
||||||
border-radius: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-round-button img
|
|
||||||
{
|
|
||||||
height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-round-button-small
|
|
||||||
{
|
|
||||||
margin-right: -3px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-round-button-small img
|
|
||||||
{
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img.openwebrx-mirror-img
|
|
||||||
{
|
|
||||||
transform: scale(-1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.openwebrx-round-rightarrow img
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
left: 12px;
|
|
||||||
top: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-round-leftarrow img
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
left: 7px;
|
|
||||||
top: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-client-log-title
|
|
||||||
{
|
{
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openwebrx-progressbar
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #003850; /*#006235;*/
|
|
||||||
display: inline-block;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 8pt;
|
|
||||||
font-weight: bold;
|
|
||||||
text-shadow: 0px 0px 4px #000000;
|
|
||||||
cursor: default;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-progressbar-bar
|
|
||||||
{
|
|
||||||
border-radius: 5px;
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-progressbar-text
|
|
||||||
{
|
|
||||||
position: absolute;
|
|
||||||
left:0px;
|
|
||||||
top:4px;
|
|
||||||
width: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-panel-status
|
|
||||||
{
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
background-color:rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-panel-status div.openwebrx-progressbar
|
|
||||||
{
|
|
||||||
width: 200px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-main-buttons img
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-main-buttons ul
|
|
||||||
{
|
|
||||||
display: table;
|
|
||||||
margin:0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#openwebrx-main-buttons ul li
|
|
||||||
{
|
|
||||||
display: table-cell;
|
|
||||||
padding-left: 5px;
|
|
||||||
padding-right: 5px;
|
|
||||||
cursor:pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-main-buttons li:hover
|
|
||||||
{
|
|
||||||
background-color: rgba(255, 255, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-main-buttons li:active
|
|
||||||
{
|
|
||||||
background-color: rgba(255, 255, 255, 0.55);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#openwebrx-main-buttons
|
|
||||||
{
|
|
||||||
position: absolute;
|
|
||||||
right: 133px;
|
|
||||||
top: 3px;
|
|
||||||
margin:0;
|
|
||||||
color: white;
|
|
||||||
text-shadow: 0px 0px 4px #000000;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 9pt;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-panel-receiver
|
|
||||||
{
|
|
||||||
width:110px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-mute-on
|
|
||||||
{
|
|
||||||
color: lime;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-mute-off
|
|
||||||
{
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-panel-slider
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
top: -2px;
|
|
||||||
width: 95px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-sliderbtn-img
|
|
||||||
{
|
|
||||||
width: 14px;
|
|
||||||
position:relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openwebrx-panel-line
|
|
||||||
{
|
|
||||||
padding-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-smeter-outer
|
|
||||||
{
|
|
||||||
border-color: #888;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0px;
|
|
||||||
width: 255px;
|
|
||||||
height: 7px;
|
|
||||||
background-color: #373737;
|
|
||||||
border-radius: 3px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
#openwebrx-smeter-bar
|
|
||||||
{
|
|
||||||
transition: all 0.2s linear;
|
|
||||||
width: 0px;
|
|
||||||
height: 7px;
|
|
||||||
background: linear-gradient(to top, #ff5939 , #961700);
|
|
||||||
position: absolute;
|
|
||||||
margin: 0; padding: 0; left: 0;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-smeter-db
|
|
||||||
{
|
|
||||||
color: #aaa;
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 10pt;
|
|
||||||
float: right;
|
|
||||||
margin-right: 5px;
|
|
||||||
margin-top: 24px;
|
|
||||||
font-family: 'expletus-sans-medium';
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-big-grey
|
|
||||||
{
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
opacity: 0.8;
|
|
||||||
background-color: #777;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1001;
|
|
||||||
display: none;
|
|
||||||
vertical-align: middle;
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 20pt;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: opacity 0.3s linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-big-grey img
|
|
||||||
{
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-canvas-container
|
|
||||||
{
|
|
||||||
/*margin: -10px -10px 10px -10px;*/
|
|
||||||
margin: -10px -10px 0px -10px;
|
|
||||||
border-radius: 15px;
|
|
||||||
height: 150px;
|
|
||||||
background-color: #333;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-canvas-container canvas
|
|
||||||
{
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
transition: width 500ms, left 500ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-secondary-demod-listbox
|
|
||||||
{
|
|
||||||
width: 201px;
|
|
||||||
height: 27px;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #373737;
|
|
||||||
color: White;
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 13pt;
|
|
||||||
margin-right: 1px;
|
|
||||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.0 , #373737), color-stop(1, #4F4F4F) );
|
|
||||||
background:-moz-linear-gradient( center top, #373737 0%, #4F4F4F 100% );
|
|
||||||
border-color: transparent;
|
|
||||||
border-width: 0px;
|
|
||||||
-moz-appearance: none;
|
|
||||||
padding-left:3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-secondary-demod-listbox option
|
|
||||||
{
|
|
||||||
border-width: 0px;
|
|
||||||
background-color: #373737;
|
|
||||||
color: White;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-cursor-blink
|
|
||||||
{
|
|
||||||
animation: cursor-blink 1s infinite;
|
|
||||||
/*animation: cursor-3d 2s infinite;*/
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-direction: alternate;
|
|
||||||
height: 1em;
|
|
||||||
width: 8px;
|
|
||||||
background-color: White;
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
/*perspective: 60px;*/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes cursor-blink
|
|
||||||
{
|
|
||||||
0%{ opacity: 0; }
|
|
||||||
50% { opacity: 1; }
|
|
||||||
100%{ opacity: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes cursor-3d
|
|
||||||
{
|
|
||||||
0%{ transform: rotateX(0deg) rotateX(Ydeg); }
|
|
||||||
50% { transform: rotateX(180deg) rotateY(360deg); opacity: 0.1; }
|
|
||||||
100%{ transform: rotateX(360deg) rotateY(720deg); }
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-content
|
|
||||||
{
|
|
||||||
word-wrap: break-word;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-content-container
|
|
||||||
{
|
|
||||||
overflow-y: hidden;
|
|
||||||
display: block;
|
|
||||||
height: 50px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-content-container .gradient
|
|
||||||
{
|
|
||||||
width: 100%;
|
|
||||||
height: 20px;
|
|
||||||
background: linear-gradient(to top, rgba(87,87,87,0) 0%,rgba(87,87,87,1) 100%);
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#openwebrx-digimode-content .part
|
|
||||||
{
|
|
||||||
perspective: 700px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-content .part
|
|
||||||
{
|
|
||||||
animation: new-digimode-data-3d 100ms;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
display: inline-block;
|
|
||||||
perspective-origin: 50% 50%;
|
|
||||||
transform-origin: 0% 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-content .part .subpart
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@keyframes new-digimode-data
|
|
||||||
{
|
|
||||||
0%{ opacity: 0; }
|
|
||||||
100%{ opacity: 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes new-digimode-data-3d
|
|
||||||
{
|
|
||||||
0%{ transform: rotateX(0deg) rotateY(-90deg) translateX(-5px) scale(1.3); }
|
|
||||||
100%{ transform: rotateX(0deg) rotateY(0deg) translateX(0) scale(1); }
|
|
||||||
}
|
|
||||||
|
|
||||||
#openwebrx-digimode-select-channel
|
|
||||||
{
|
|
||||||
transition: all 500ms;
|
|
||||||
background-color: Yellow;
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
height: 100%;
|
|
||||||
width: 0px;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
opacity: 0.7;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0px;
|
|
||||||
border-color: Red;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
1491
htdocs/openwebrx.js
Normal file → Executable file
@ -1,23 +1,21 @@
|
|||||||
<html>
|
<html>
|
||||||
<!--
|
<!--
|
||||||
|
OpenWebRX (c) Copyright 2013 Andras Retzler <ha7ilm@sdr.hu>
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
This file is part of OpenWebRX.
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
OpenWebRX is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation, either version 3 of the
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
License, or (at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
OpenWebRX is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenWebRX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<head><title>OpenWebRX</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<head><title>OpenWebRX</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<style>
|
<style>
|
||||||
|
11679
htdocs/sdr.js
@ -1,23 +1,21 @@
|
|||||||
<html>
|
<html>
|
||||||
<!--
|
<!--
|
||||||
|
OpenWebRX (c) Copyright 2013 Andras Retzler <ha7ilm@sdr.hu>
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
This file is part of OpenWebRX.
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
OpenWebRX is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation, either version 3 of the
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
License, or (at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
OpenWebRX is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenWebRX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<head><title>OpenWebRX</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<head><title>OpenWebRX</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<style>
|
<style>
|
||||||
|
1007
openwebrx.py
0
plugins/__init__.py
Executable file
0
plugins/dsp/__init__.py
Executable file
0
plugins/dsp/csdr/__init__.py
Executable file
137
plugins/dsp/csdr/plugin.py
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
import subprocess
|
||||||
|
import time
|
||||||
|
import os
|
||||||
|
import code
|
||||||
|
import signal
|
||||||
|
|
||||||
|
class dsp_plugin:
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.samp_rate = 250000
|
||||||
|
self.output_rate = 44100 #this is default, and cannot be set at the moment
|
||||||
|
self.fft_size = 1024
|
||||||
|
self.fft_fps = 5
|
||||||
|
self.offset_freq = 0
|
||||||
|
self.low_cut = -4000
|
||||||
|
self.high_cut = 4000
|
||||||
|
self.bpf_transition_bw = 320 #Hz, and this is a constant
|
||||||
|
self.ddc_transition_bw_rate = 0.15 # of the IF sample rate
|
||||||
|
self.running = False
|
||||||
|
chain_begin="nc localhost 4951 | csdr convert_u8_f | 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 | "
|
||||||
|
self.chains = {
|
||||||
|
"nfm" : chain_begin + "csdr fmdemod_quadri_cf | csdr limit_ff | csdr fractional_decimator_ff {last_decimation} | csdr deemphasis_nfm_ff 44100 | csdr fastagc_ff | csdr convert_f_i16",
|
||||||
|
"am" : chain_begin + "csdr amdemod_cf | csdr fastdcblock_ff | csdr fractional_decimator_ff {last_decimation} | csdr agc_ff | csdr limit_ff | csdr convert_f_i16",
|
||||||
|
"ssb" : chain_begin + "csdr realpart_cf | csdr fractional_decimator_ff {last_decimation} | csdr agc_ff | csdr limit_ff | csdr convert_f_i16",
|
||||||
|
"fft" : "nc -vv localhost 4951 | csdr convert_u8_f | csdr fft_cc {fft_size} {fft_block_size} | csdr logpower_cf -70"
|
||||||
|
}
|
||||||
|
self.demodulator = "nfm"
|
||||||
|
self.name = "csdr"
|
||||||
|
try:
|
||||||
|
subprocess.Popen("nc",stdout=subprocess.PIPE,stderr=subprocess.PIPE).kill()
|
||||||
|
except:
|
||||||
|
print "[openwebrx-plugin:csdr] error: netcat not found, please install netcat!"
|
||||||
|
|
||||||
|
def set_samp_rate(self,samp_rate):
|
||||||
|
#to change this, restart is required
|
||||||
|
self.samp_rate=samp_rate
|
||||||
|
self.decimation=1
|
||||||
|
while self.samp_rate/(self.decimation+1)>self.output_rate:
|
||||||
|
self.decimation+=1
|
||||||
|
self.last_decimation=float(self.if_samp_rate())/self.output_rate
|
||||||
|
|
||||||
|
def if_samp_rate(self):
|
||||||
|
return self.samp_rate/self.decimation
|
||||||
|
|
||||||
|
def get_name(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
def get_output_rate(self):
|
||||||
|
return self.output_rate
|
||||||
|
|
||||||
|
|
||||||
|
def set_demodulator(self,demodulator):
|
||||||
|
#to change this, restart is required
|
||||||
|
self.demodulator=demodulator
|
||||||
|
|
||||||
|
def set_fft_size(self,fft_size):
|
||||||
|
#to change this, restart is required
|
||||||
|
self.fft_size=fft_size
|
||||||
|
|
||||||
|
def set_fft_fps(self,fft_fps):
|
||||||
|
#to change this, restart is required
|
||||||
|
self.fft_fps=fft_fps
|
||||||
|
|
||||||
|
def fft_block_size(self):
|
||||||
|
return self.samp_rate/self.fft_fps
|
||||||
|
|
||||||
|
def set_offset_freq(self,offset_freq):
|
||||||
|
self.offset_freq=offset_freq
|
||||||
|
if self.running:
|
||||||
|
self.shift_pipe_file.write("%g\n"%(-float(self.offset_freq)/self.samp_rate))
|
||||||
|
self.shift_pipe_file.flush()
|
||||||
|
|
||||||
|
def set_bpf(self,low_cut,high_cut):
|
||||||
|
self.low_cut=low_cut
|
||||||
|
self.high_cut=high_cut
|
||||||
|
if self.running:
|
||||||
|
self.bpf_pipe_file.write( "%g %g\n"%(float(self.low_cut)/self.if_samp_rate(), float(self.high_cut)/self.if_samp_rate()) )
|
||||||
|
self.bpf_pipe_file.flush()
|
||||||
|
|
||||||
|
def get_bpf(self):
|
||||||
|
return [self.low_cut, self.high_cut]
|
||||||
|
|
||||||
|
def mkfifo(self,path):
|
||||||
|
try:
|
||||||
|
os.unlink(path)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
os.mkfifo(path)
|
||||||
|
|
||||||
|
def ddc_transition_bw(self):
|
||||||
|
return self.ddc_transition_bw_rate*(self.if_samp_rate()/float(self.samp_rate))
|
||||||
|
|
||||||
|
def start(self):
|
||||||
|
command_base=self.chains[self.demodulator]
|
||||||
|
|
||||||
|
#create control pipes for csdr
|
||||||
|
pipe_base_path="/tmp/openwebrx_pipe_{myid}_".format(myid=id(self))
|
||||||
|
self.bpf_pipe = self.shift_pipe = None
|
||||||
|
if "{bpf_pipe}" in command_base:
|
||||||
|
self.bpf_pipe=pipe_base_path+"bpf"
|
||||||
|
self.mkfifo(self.bpf_pipe)
|
||||||
|
if "{shift_pipe}" in command_base:
|
||||||
|
self.shift_pipe=pipe_base_path+"shift"
|
||||||
|
self.mkfifo(self.shift_pipe)
|
||||||
|
|
||||||
|
#run the command
|
||||||
|
command=command_base.format(bpf_pipe=self.bpf_pipe,shift_pipe=self.shift_pipe,decimation=self.decimation,last_decimation=self.last_decimation,fft_size=self.fft_size,fft_block_size=self.fft_block_size(),bpf_transition_bw=float(self.bpf_transition_bw)/self.if_samp_rate(),ddc_transition_bw=self.ddc_transition_bw())
|
||||||
|
print "[openwebrx-dsp-plugin:csdr] Command =",command
|
||||||
|
#code.interact(local=locals())
|
||||||
|
self.process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setpgrp)
|
||||||
|
self.running = True
|
||||||
|
|
||||||
|
#open control pipes for csdr and send initialization data
|
||||||
|
if self.bpf_pipe != None:
|
||||||
|
self.bpf_pipe_file=open(self.bpf_pipe,"w")
|
||||||
|
self.set_bpf(self.low_cut,self.high_cut)
|
||||||
|
if self.shift_pipe != None:
|
||||||
|
self.shift_pipe_file=open(self.shift_pipe,"w")
|
||||||
|
self.set_offset_freq(self.offset_freq)
|
||||||
|
|
||||||
|
def read(self,size):
|
||||||
|
return self.process.stdout.read(size)
|
||||||
|
|
||||||
|
def stop(self):
|
||||||
|
os.killpg(os.getpgid(self.process.pid), signal.SIGTERM)
|
||||||
|
os.unlink(self.bpf_pipe)
|
||||||
|
os.unlink(self.shift_pipe)
|
||||||
|
self.running = False
|
||||||
|
|
||||||
|
def restart(self):
|
||||||
|
self.stop()
|
||||||
|
self.start()
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
self.stop()
|
||||||
|
del(self.process)
|
||||||
|
|
532
rtl_mus.py
Normal file
@ -0,0 +1,532 @@
|
|||||||
|
'''
|
||||||
|
This file is part of RTL Multi-User Server,
|
||||||
|
that makes multi-user access to your DVB-T dongle used as an SDR.
|
||||||
|
Copyright (c) 2013-2014 by Andras Retzler, HA7ILM <randras@sdr.hu>
|
||||||
|
|
||||||
|
RTL Multi-User Server is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
RTL Multi-User Server is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with RTL Multi-User Server. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
2013-11? Asyncore version
|
||||||
|
2014-03 Fill with null on no data
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
import socket
|
||||||
|
import sys
|
||||||
|
import array
|
||||||
|
import time
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import subprocess
|
||||||
|
import fcntl
|
||||||
|
import thread
|
||||||
|
import pdb
|
||||||
|
import asyncore
|
||||||
|
import multiprocessing
|
||||||
|
import signal
|
||||||
|
#pypy compatiblity
|
||||||
|
try: import dl
|
||||||
|
except: pass
|
||||||
|
|
||||||
|
import code
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
def handle_signal(signal, frame):
|
||||||
|
log.info("Ctrl+C: aborting.")
|
||||||
|
os._exit(1) #not too graceful exit
|
||||||
|
|
||||||
|
def ip_match(this,ip_ranges,for_allow):
|
||||||
|
if not len(ip_ranges):
|
||||||
|
return 1 #empty list matches all ip addresses
|
||||||
|
for ip_range in ip_ranges:
|
||||||
|
#print this[0:len(ip_range)], ip_range
|
||||||
|
if this[0:len(ip_range)]==ip_range:
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def ip_access_control(ip):
|
||||||
|
if(not cfg.use_ip_access_control): return 1
|
||||||
|
allowed=0
|
||||||
|
if(cfg.order_allow_deny):
|
||||||
|
if ip_match(ip,cfg.allowed_ip_ranges,1): allowed=1
|
||||||
|
if ip_match(ip,cfg.denied_ip_ranges,0): allowed=0
|
||||||
|
else:
|
||||||
|
if ip_match(ip,cfg.denied_ip_ranges,0):
|
||||||
|
allowed=0
|
||||||
|
if ip_match(ip,cfg.allowed_ip_ranges,1):
|
||||||
|
allowed=1
|
||||||
|
return allowed
|
||||||
|
|
||||||
|
def add_data_to_clients(new_data):
|
||||||
|
# might be called from:
|
||||||
|
# -> dsp_read
|
||||||
|
# -> rtl_tcp_asyncore.handle_read
|
||||||
|
global clients
|
||||||
|
global clients_mutex
|
||||||
|
clients_mutex.acquire()
|
||||||
|
for client in clients:
|
||||||
|
#print "client %d size: %d"%(client[0].ident,client[0].waiting_data.qsize())
|
||||||
|
if(client[0].waiting_data.full()):
|
||||||
|
if cfg.cache_full_behaviour == 0:
|
||||||
|
log.error("client cache full, dropping samples: "+str(client[0].ident)+"@"+client[0].socket[1][0])
|
||||||
|
while not client[0].waiting_data.empty(): # clear queue
|
||||||
|
client[0].waiting_data.get(False, None)
|
||||||
|
elif cfg.cache_full_behaviour == 1:
|
||||||
|
#rather closing client:
|
||||||
|
log.error("client cache full, dropping client: "+str(client[0].ident)+"@"+client[0].socket[1][0])
|
||||||
|
client[0].close(False)
|
||||||
|
elif cfg.cache_full_behaviour == 2:
|
||||||
|
pass #client cache full, just not taking care
|
||||||
|
else: log.error("invalid value for cfg.cache_full_behaviour")
|
||||||
|
else:
|
||||||
|
client[0].waiting_data.put(new_data)
|
||||||
|
clients_mutex.release()
|
||||||
|
|
||||||
|
def dsp_read_thread():
|
||||||
|
global proc
|
||||||
|
global dsp_data_count
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
my_buffer=proc.stdout.read(1024)
|
||||||
|
except IOError:
|
||||||
|
log.error("DSP subprocess is not ready for reading.")
|
||||||
|
time.sleep(1)
|
||||||
|
continue
|
||||||
|
add_data_to_clients(my_buffer)
|
||||||
|
if cfg.debug_dsp_command:
|
||||||
|
dsp_data_count+=len(my_buffer)
|
||||||
|
|
||||||
|
def dsp_write_thread():
|
||||||
|
global proc
|
||||||
|
global dsp_input_queue
|
||||||
|
global original_data_count
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
my_buffer=dsp_input_queue.get(timeout=0.3)
|
||||||
|
except:
|
||||||
|
continue
|
||||||
|
proc.stdin.write(my_buffer)
|
||||||
|
proc.stdin.flush()
|
||||||
|
if cfg.debug_dsp_command:
|
||||||
|
original_data_count+=len(my_buffer)
|
||||||
|
|
||||||
|
class client_handler(asyncore.dispatcher):
|
||||||
|
|
||||||
|
def __init__(self,client_param):
|
||||||
|
self.client=client_param
|
||||||
|
self.client[0].asyncore=self
|
||||||
|
self.sent_dongle_id=False
|
||||||
|
self.last_waiting_buffer=""
|
||||||
|
asyncore.dispatcher.__init__(self, self.client[0].socket[0])
|
||||||
|
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||||
|
|
||||||
|
def handle_read(self):
|
||||||
|
global commands
|
||||||
|
new_command = self.recv(5)
|
||||||
|
if len(new_command)>=5:
|
||||||
|
if handle_command(new_command, self.client):
|
||||||
|
commands.put(new_command)
|
||||||
|
|
||||||
|
def handle_error(self):
|
||||||
|
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||||
|
log.info("client error: "+str(self.client[0].ident)+"@"+self.client[0].socket[1][0])
|
||||||
|
traceback.print_tb(exc_traceback)
|
||||||
|
self.close()
|
||||||
|
|
||||||
|
def handle_close(self):
|
||||||
|
self.client[0].close()
|
||||||
|
log.info("client disconnected: "+str(self.client[0].ident)+"@"+self.client[0].socket[1][0])
|
||||||
|
|
||||||
|
def writable(self):
|
||||||
|
#print "queryWritable",not self.client[0].waiting_data.empty()
|
||||||
|
return not self.client[0].waiting_data.empty()
|
||||||
|
|
||||||
|
def handle_write(self):
|
||||||
|
global last_waiting
|
||||||
|
global rtl_dongle_identifier
|
||||||
|
global sample_rate
|
||||||
|
if not self.sent_dongle_id:
|
||||||
|
self.send(rtl_dongle_identifier)
|
||||||
|
self.sent_dongle_id=True
|
||||||
|
return
|
||||||
|
#print "write2client",self.client[0].waiting_data.qsize()
|
||||||
|
next=self.last_waiting_buffer+self.client[0].waiting_data.get()
|
||||||
|
sent=asyncore.dispatcher.send(self, next)
|
||||||
|
self.last_waiting_buffer=next[sent:]
|
||||||
|
|
||||||
|
class server_asyncore(asyncore.dispatcher):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
asyncore.dispatcher.__init__(self)
|
||||||
|
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
self.set_reuse_addr()
|
||||||
|
self.bind((cfg.my_ip, cfg.my_listening_port))
|
||||||
|
self.listen(5)
|
||||||
|
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||||
|
log.info("Server listening on port: "+str(cfg.my_listening_port))
|
||||||
|
|
||||||
|
def handle_accept(self):
|
||||||
|
global max_client_id
|
||||||
|
global clients_mutex
|
||||||
|
global clients
|
||||||
|
my_client=[client()]
|
||||||
|
my_client[0].socket=self.accept()
|
||||||
|
if (my_client[0].socket is None): # not sure if required
|
||||||
|
return
|
||||||
|
if (ip_access_control(my_client[0].socket[1][0])):
|
||||||
|
my_client[0].ident=max_client_id
|
||||||
|
max_client_id+=1
|
||||||
|
my_client[0].start_time=time.time()
|
||||||
|
my_client[0].waiting_data=multiprocessing.Queue(500)
|
||||||
|
clients_mutex.acquire()
|
||||||
|
clients.append(my_client)
|
||||||
|
clients_mutex.release()
|
||||||
|
handler = client_handler(my_client)
|
||||||
|
log.info("client accepted: "+str(len(clients)-1)+"@"+my_client[0].socket[1][0]+":"+str(my_client[0].socket[1][1])+" users now: "+str(len(clients)))
|
||||||
|
else:
|
||||||
|
log.info("client denied: "+str(len(clients)-1)+"@"+my_client[0].socket[1][0]+":"+str(my_client[0].socket[1][1])+" blocked by ip")
|
||||||
|
my_client.socket.close()
|
||||||
|
|
||||||
|
rtl_tcp_resetting=False #put me away
|
||||||
|
|
||||||
|
def rtl_tcp_asyncore_reset(timeout):
|
||||||
|
global rtl_tcp_core
|
||||||
|
global rtl_tcp_resetting
|
||||||
|
if rtl_tcp_resetting: return
|
||||||
|
#print "rtl_tcp_asyncore_reset"
|
||||||
|
rtl_tcp_resetting=True
|
||||||
|
time.sleep(timeout)
|
||||||
|
try:
|
||||||
|
rtl_tcp_core.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
del rtl_tcp_core
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
rtl_tcp_core=rtl_tcp_asyncore()
|
||||||
|
#print asyncore.socket_map
|
||||||
|
rtl_tcp_resetting=False
|
||||||
|
|
||||||
|
class rtl_tcp_asyncore(asyncore.dispatcher):
|
||||||
|
def __init__(self):
|
||||||
|
global server_missing_logged
|
||||||
|
asyncore.dispatcher.__init__(self)
|
||||||
|
self.ok=True
|
||||||
|
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
try:
|
||||||
|
self.connect((cfg.rtl_tcp_host, cfg.rtl_tcp_port))
|
||||||
|
self.socket.settimeout(0.1)
|
||||||
|
except:
|
||||||
|
log.error("rtl_tcp connection refused. Retrying.")
|
||||||
|
thread.start_new_thread(rtl_tcp_asyncore_reset, (1,))
|
||||||
|
self.close()
|
||||||
|
return
|
||||||
|
|
||||||
|
def handle_error(self):
|
||||||
|
global server_missing_logged
|
||||||
|
global rtl_tcp_connected
|
||||||
|
rtl_tcp_connected=False
|
||||||
|
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||||
|
self.ok=False
|
||||||
|
server_is_missing=hasattr(exc_value,"errno") and exc_value.errno==111
|
||||||
|
if (not server_is_missing) or (not server_missing_logged):
|
||||||
|
log.error("with rtl_tcp host connection: "+str(exc_value))
|
||||||
|
#traceback.print_tb(exc_traceback)
|
||||||
|
server_missing_logged|=server_is_missing
|
||||||
|
try:
|
||||||
|
self.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
thread.start_new_thread(rtl_tcp_asyncore_reset, (2,))
|
||||||
|
|
||||||
|
def handle_connect(self):
|
||||||
|
global server_missing_logged
|
||||||
|
global rtl_tcp_connected
|
||||||
|
self.socket.settimeout(0.1)
|
||||||
|
rtl_tcp_connected=True
|
||||||
|
if self.ok:
|
||||||
|
log.info("rtl_tcp host connection estabilished")
|
||||||
|
server_missing_logged=False
|
||||||
|
|
||||||
|
def handle_close(self):
|
||||||
|
global rtl_tcp_connected
|
||||||
|
global rtl_tcp_core
|
||||||
|
rtl_tcp_connected=False
|
||||||
|
log.error("rtl_tcp host connection has closed, now trying to reopen")
|
||||||
|
try:
|
||||||
|
self.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
thread.start_new_thread(rtl_tcp_asyncore_reset, (2,))
|
||||||
|
|
||||||
|
def handle_read(self):
|
||||||
|
global rtl_dongle_identifier
|
||||||
|
global dsp_input_queue
|
||||||
|
global watchdog_data_count
|
||||||
|
if(len(rtl_dongle_identifier)==0):
|
||||||
|
rtl_dongle_identifier=self.recv(12)
|
||||||
|
return
|
||||||
|
new_data_buffer=self.recv(1024*16)
|
||||||
|
if cfg.watchdog_interval:
|
||||||
|
watchdog_data_count+=1024*16
|
||||||
|
if cfg.use_dsp_command:
|
||||||
|
dsp_input_queue.put(new_data_buffer)
|
||||||
|
#print "did put anyway"
|
||||||
|
else:
|
||||||
|
add_data_to_clients(new_data_buffer)
|
||||||
|
|
||||||
|
def writable(self):
|
||||||
|
#check if any new commands to write
|
||||||
|
global commands
|
||||||
|
return not commands.empty()
|
||||||
|
|
||||||
|
def handle_write(self):
|
||||||
|
global commands
|
||||||
|
while not commands.empty():
|
||||||
|
mcmd=commands.get()
|
||||||
|
self.send(mcmd)
|
||||||
|
|
||||||
|
def xxd(data):
|
||||||
|
#diagnostic purposes only
|
||||||
|
output=""
|
||||||
|
for d in data:
|
||||||
|
output+=hex(ord(d))[2:].zfill(2)+" "
|
||||||
|
return output
|
||||||
|
|
||||||
|
def handle_command(command, client_param):
|
||||||
|
global sample_rate
|
||||||
|
client=client_param[0]
|
||||||
|
param=array.array("I", command[1:5])[0]
|
||||||
|
param=socket.ntohl(param)
|
||||||
|
command_id=ord(command[0])
|
||||||
|
client_info=str(client.ident)+"@"+client.socket[1][0]+":"+str(client.socket[1][1])
|
||||||
|
if(time.time()-client.start_time<cfg.client_cant_set_until and not (cfg.first_client_can_set and client.ident==0) ):
|
||||||
|
log.info("deny: "+client_info+" -> client can't set anything until "+str(cfg.client_cant_set_until)+" seconds")
|
||||||
|
return 0
|
||||||
|
if command_id == 1:
|
||||||
|
if max(map((lambda r: param>=r[0] and param<=r[1]),cfg.freq_allowed_ranges)):
|
||||||
|
log.debug("allow: "+client_info+" -> set freq "+str(param))
|
||||||
|
return 1
|
||||||
|
else:
|
||||||
|
log.debug("deny: "+client_info+" -> set freq - out of range: "+str(param))
|
||||||
|
elif command_id == 2:
|
||||||
|
log.debug("deny: "+client_info+" -> set sample rate: "+str(param))
|
||||||
|
sample_rate=param
|
||||||
|
return 0 # ordinary clients are not allowed to do this
|
||||||
|
elif command_id == 3:
|
||||||
|
log.debug("deny/allow: "+client_info+" -> set gain mode: "+str(param))
|
||||||
|
return cfg.allow_gain_set
|
||||||
|
elif command_id == 4:
|
||||||
|
log.debug("deny/allow: "+client_info+" -> set gain: "+str(param))
|
||||||
|
return cfg.allow_gain_set
|
||||||
|
elif command_id == 5:
|
||||||
|
log.debug("deny: "+client_info+" -> set freq correction: "+str(param))
|
||||||
|
return 0
|
||||||
|
elif command_id == 6:
|
||||||
|
log.debug("deny/allow: set if stage gain")
|
||||||
|
return cfg.allow_gain_set
|
||||||
|
elif command_id == 7:
|
||||||
|
log.debug("deny: set test mode")
|
||||||
|
return 0
|
||||||
|
elif command_id == 8:
|
||||||
|
log.debug("deny/allow: set agc mode")
|
||||||
|
return cfg.allow_gain_set
|
||||||
|
elif command_id == 9:
|
||||||
|
log.debug("deny: set direct sampling")
|
||||||
|
return 0
|
||||||
|
elif command_id == 10:
|
||||||
|
log.debug("deny: set offset tuning")
|
||||||
|
return 0
|
||||||
|
elif command_id == 11:
|
||||||
|
log.debug("deny: set rtl xtal")
|
||||||
|
return 0
|
||||||
|
elif command_id == 12:
|
||||||
|
log.debug("deny: set tuner xtal")
|
||||||
|
return 0
|
||||||
|
elif command_id == 13:
|
||||||
|
log.debug("deny/allow: set tuner gain by index")
|
||||||
|
return cfg.allow_gain_set
|
||||||
|
else:
|
||||||
|
log.debug("deny: "+client_info+" sent an ivalid command: "+str(param))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def watchdog_thread():
|
||||||
|
global rtl_tcp_connected
|
||||||
|
global rtl_tcp_core
|
||||||
|
global watchdog_data_count
|
||||||
|
global sample_rate
|
||||||
|
zero_buffer_size=16348
|
||||||
|
second_frac=10
|
||||||
|
zero_buffer='\x7f'*zero_buffer_size
|
||||||
|
watchdog_data_count=0
|
||||||
|
rtl_tcp_connected=False
|
||||||
|
null_fill=False
|
||||||
|
time.sleep(4) # wait before activating this thread
|
||||||
|
log.info("watchdog started")
|
||||||
|
first_start=True
|
||||||
|
n=0
|
||||||
|
while True:
|
||||||
|
wait_altogether=cfg.watchdog_interval if rtl_tcp_connected or first_start else cfg.reconnect_interval
|
||||||
|
first_start=False
|
||||||
|
if null_fill:
|
||||||
|
log.error("watchdog: filling buffer with zeros.")
|
||||||
|
while wait_altogether>0:
|
||||||
|
wait_altogether-=1.0/second_frac
|
||||||
|
for i in range(0,((2*sample_rate)/second_frac)/zero_buffer_size):
|
||||||
|
add_data_to_clients(zero_buffer)
|
||||||
|
n+=len(zero_buffer)
|
||||||
|
time.sleep(0) #yield
|
||||||
|
if watchdog_data_count: break
|
||||||
|
if watchdog_data_count: break
|
||||||
|
time.sleep(1.0/second_frac)
|
||||||
|
#print "sent altogether",n
|
||||||
|
else:
|
||||||
|
time.sleep(wait_altogether)
|
||||||
|
null_fill=not watchdog_data_count
|
||||||
|
if not watchdog_data_count:
|
||||||
|
log.error("watchdog: restarting rtl_tcp_asyncore() now.")
|
||||||
|
rtl_tcp_asyncore_reset(0)
|
||||||
|
watchdog_data_count=0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def dsp_debug_thread():
|
||||||
|
global dsp_data_count
|
||||||
|
global original_data_count
|
||||||
|
while 1:
|
||||||
|
time.sleep(1)
|
||||||
|
print "[rtl-mus] DSP | Original data: "+str(int(original_data_count/1000))+"kB/sec | Processed data: "+str(int(dsp_data_count/1000))+"kB/sec"
|
||||||
|
dsp_data_count = original_data_count=0
|
||||||
|
|
||||||
|
class client:
|
||||||
|
ident=None #id
|
||||||
|
to_close=False
|
||||||
|
waiting_data=None
|
||||||
|
start_time=None
|
||||||
|
socket=None
|
||||||
|
asyncore=None
|
||||||
|
|
||||||
|
def close(self, use_mutex=True):
|
||||||
|
global clients_mutex
|
||||||
|
global clients
|
||||||
|
if use_mutex: clients_mutex.acquire()
|
||||||
|
correction=0
|
||||||
|
for i in range(0,len(clients)):
|
||||||
|
i-=correction
|
||||||
|
if clients[i][0].ident==self.ident:
|
||||||
|
try:
|
||||||
|
self.socket.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
self.asyncore.close()
|
||||||
|
del self.asyncore
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
del clients[i]
|
||||||
|
correction+=1
|
||||||
|
if use_mutex: clients_mutex.release()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
global server_missing_logged
|
||||||
|
global rtl_dongle_identifier
|
||||||
|
global log
|
||||||
|
global clients
|
||||||
|
global clients_mutex
|
||||||
|
global original_data_count
|
||||||
|
global dsp_input_queue
|
||||||
|
global dsp_data_count
|
||||||
|
global proc
|
||||||
|
global commands
|
||||||
|
global max_client_id
|
||||||
|
global rtl_tcp_core
|
||||||
|
global sample_rate
|
||||||
|
|
||||||
|
#Set signal handler
|
||||||
|
signal.signal(signal.SIGINT, handle_signal) #http://stackoverflow.com/questions/1112343/how-do-i-capture-sigint-in-python
|
||||||
|
|
||||||
|
# set up logging
|
||||||
|
log = logging.getLogger("rtl_mus")
|
||||||
|
log.setLevel(logging.DEBUG)
|
||||||
|
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
|
||||||
|
stream_handler = logging.StreamHandler()
|
||||||
|
stream_handler.setLevel(logging.DEBUG)
|
||||||
|
stream_handler.setFormatter(formatter)
|
||||||
|
log.addHandler(stream_handler)
|
||||||
|
file_handler = logging.FileHandler(cfg.log_file_path)
|
||||||
|
file_handler.setLevel(logging.INFO)
|
||||||
|
file_handler.setFormatter(formatter)
|
||||||
|
log.addHandler(file_handler)
|
||||||
|
log.info("Server is UP")
|
||||||
|
|
||||||
|
server_missing_logged=0 # Not to flood the screen with messages related to rtl_tcp disconnect
|
||||||
|
rtl_dongle_identifier='' # rtl_tcp sends some identifier on dongle type and gain values in the first few bytes right after connection
|
||||||
|
clients=[]
|
||||||
|
dsp_data_count=original_data_count=0
|
||||||
|
commands=multiprocessing.Queue()
|
||||||
|
dsp_input_queue=multiprocessing.Queue()
|
||||||
|
clients_mutex=multiprocessing.Lock()
|
||||||
|
max_client_id=0
|
||||||
|
sample_rate=250000 # so far only watchdog thread uses it to fill buffer up with zeros on missing input
|
||||||
|
|
||||||
|
# start dsp threads
|
||||||
|
if cfg.use_dsp_command:
|
||||||
|
print "[rtl_mus] Opening DSP process..."
|
||||||
|
proc = subprocess.Popen (cfg.dsp_command.split(" "), stdin = subprocess.PIPE, stdout = subprocess.PIPE) #!! should fix the split :-S
|
||||||
|
dsp_read_thread_v=thread.start_new_thread(dsp_read_thread, ())
|
||||||
|
dsp_write_thread_v=thread.start_new_thread(dsp_write_thread, ())
|
||||||
|
if cfg.debug_dsp_command:
|
||||||
|
dsp_debug_thread_v=thread.start_new_thread(dsp_debug_thread,())
|
||||||
|
|
||||||
|
# start watchdog thread
|
||||||
|
if cfg.watchdog_interval != 0:
|
||||||
|
watchdog_thread_v=thread.start_new_thread(watchdog_thread,())
|
||||||
|
|
||||||
|
# start asyncores
|
||||||
|
rtl_tcp_core = rtl_tcp_asyncore()
|
||||||
|
server_core = server_asyncore()
|
||||||
|
|
||||||
|
asyncore.loop(0.1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__=="__main__":
|
||||||
|
print
|
||||||
|
print "rtl_mus: Multi-User I/Q Data Server for RTL-SDR v0.22, made at HA5KFU Amateur Radio Club (http://ha5kfu.hu)"
|
||||||
|
print " code by Andras Retzler, HA7ILM <randras@sdr.hu>"
|
||||||
|
print " distributed under GNU GPL v3"
|
||||||
|
print
|
||||||
|
|
||||||
|
try:
|
||||||
|
for libcpath in ["/lib/i386-linux-gnu/libc.so.6","/lib/libc.so.6"]:
|
||||||
|
if os.path.exists(libcpath):
|
||||||
|
libc = dl.open(libcpath)
|
||||||
|
libc.call("prctl", 15, "rtl_mus", 0, 0, 0)
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# === Load configuration script ===
|
||||||
|
if len(sys.argv)==1:
|
||||||
|
print "[rtl_mus] Warning! Configuration script not specified. I will use: \"config_rtl.py\""
|
||||||
|
config_script="config_rtl"
|
||||||
|
else:
|
||||||
|
config_script=sys.argv[1]
|
||||||
|
cfg=__import__(config_script)
|
||||||
|
if cfg.setuid_on_start:
|
||||||
|
os.setuid(cfg.uid)
|
||||||
|
main()
|
253
rxws.py
@ -1,22 +1,23 @@
|
|||||||
"""
|
"""
|
||||||
rxws: WebSocket methods implemented for OpenWebRX
|
rxws: WebSocket methods implemented for OpenWebRX
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
This file is part of OpenWebRX.
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
OpenWebRX is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation, either version 3 of the
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
License, or (at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
OpenWebRX is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenWebRX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
Andras Retzler, HA7ILM <retzlerandras@gmail.com>
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -26,146 +27,146 @@ import select
|
|||||||
import code
|
import code
|
||||||
|
|
||||||
class WebSocketException(Exception):
|
class WebSocketException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def handshake(myself):
|
def handshake(myself):
|
||||||
my_client_id=myself.path[4:]
|
my_client_id=myself.path[4:]
|
||||||
my_headers=myself.headers.items()
|
my_headers=myself.headers.items()
|
||||||
my_header_keys=map(lambda x:x[0],my_headers)
|
my_header_keys=map(lambda x:x[0],my_headers)
|
||||||
h_key_exists=lambda x:my_header_keys.count(x)
|
h_key_exists=lambda x:my_header_keys.count(x)
|
||||||
h_value=lambda x:my_headers[my_header_keys.index(x)][1]
|
h_value=lambda x:my_headers[my_header_keys.index(x)][1]
|
||||||
#print "The Lambdas(tm)"
|
#print "The Lambdas(tm)"
|
||||||
#print h_key_exists("upgrade")
|
#print h_key_exists("upgrade")
|
||||||
#print h_value("upgrade")
|
#print h_value("upgrade")
|
||||||
#print h_key_exists("sec-websocket-key")
|
#print h_key_exists("sec-websocket-key")
|
||||||
if (not h_key_exists("upgrade")) or not (h_value("upgrade")=="websocket") or (not h_key_exists("sec-websocket-key")):
|
if (not h_key_exists("upgrade")) or not (h_value("upgrade")=="websocket") or (not h_key_exists("sec-websocket-key")):
|
||||||
raise WebSocketException
|
raise WebSocketException
|
||||||
ws_key=h_value("sec-websocket-key")
|
ws_key=h_value("sec-websocket-key")
|
||||||
ws_key_toreturn=base64.b64encode(sha.new(ws_key+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11").digest())
|
ws_key_toreturn=base64.b64encode(sha.new(ws_key+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11").digest())
|
||||||
#A sample list of keys we get: [('origin', 'http://localhost:8073'), ('upgrade', 'websocket'), ('sec-websocket-extensions', 'x-webkit-deflate-frame'), ('sec-websocket-version', '13'), ('host', 'localhost:8073'), ('sec-websocket-key', 't9J1rgy4fc9fg2Hshhnkmg=='), ('connection', 'Upgrade'), ('pragma', 'no-cache'), ('cache-control', 'no-cache')]
|
#A sample list of keys we get: [('origin', 'http://localhost:8073'), ('upgrade', 'websocket'), ('sec-websocket-extensions', 'x-webkit-deflate-frame'), ('sec-websocket-version', '13'), ('host', 'localhost:8073'), ('sec-websocket-key', 't9J1rgy4fc9fg2Hshhnkmg=='), ('connection', 'Upgrade'), ('pragma', 'no-cache'), ('cache-control', 'no-cache')]
|
||||||
myself.wfile.write("HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "+ws_key_toreturn+"\r\nCQ-CQ-de: HA5KFU\r\n\r\n")
|
myself.wfile.write("HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "+ws_key_toreturn+"\r\nCQ-CQ-de: HA5KFU\r\n\r\n")
|
||||||
|
|
||||||
def get_header(size):
|
def get_header(size):
|
||||||
#this does something similar: https://github.com/lemmingzshadow/php-websocket/blob/master/server/lib/WebSocket/Connection.php
|
#this does something similar: https://github.com/lemmingzshadow/php-websocket/blob/master/server/lib/WebSocket/Connection.php
|
||||||
ws_first_byte=0b10000010 # FIN=1, OP=2
|
ws_first_byte=0b10000010 # FIN=1, OP=2
|
||||||
if(size>125):
|
if(size>125):
|
||||||
ws_second_byte=126 # The following two bytes will indicate frame size
|
ws_second_byte=126 # The following two bytes will indicate frame size
|
||||||
extended_size=chr((size>>8)&0xff)+chr(size&0xff) #Okay, it uses reverse byte order (little-endian) compared to anything else sent on TCP
|
extended_size=chr((size>>8)&0xff)+chr(size&0xff) #Okay, it uses reverse byte order (little-endian) compared to anything else sent on TCP
|
||||||
else:
|
else:
|
||||||
ws_second_byte=size
|
ws_second_byte=size
|
||||||
#256 bytes binary message in a single unmasked frame | 0x82 0x7E 0x0100 [256 bytes of binary data]
|
#256 bytes binary message in a single unmasked frame | 0x82 0x7E 0x0100 [256 bytes of binary data]
|
||||||
extended_size=""
|
extended_size=""
|
||||||
return chr(ws_first_byte)+chr(ws_second_byte)+extended_size
|
return chr(ws_first_byte)+chr(ws_second_byte)+extended_size
|
||||||
|
|
||||||
def code_payload(data, masking_key=""):
|
def code_payload(data, masking_key=""):
|
||||||
# both encode or decode
|
# both encode or decode
|
||||||
if masking_key=="":
|
if masking_key=="":
|
||||||
key = (61, 84, 35, 6)
|
key = (61, 84, 35, 6)
|
||||||
else:
|
else:
|
||||||
key = [ord(i) for i in masking_key]
|
key = [ord(i) for i in masking_key]
|
||||||
encoded=""
|
encoded=""
|
||||||
for i in range(0,len(data)):
|
for i in range(0,len(data)):
|
||||||
encoded+=chr(ord(data[i])^key[i%4])
|
encoded+=chr(ord(data[i])^key[i%4])
|
||||||
return encoded
|
return encoded
|
||||||
|
|
||||||
def xxdg(data):
|
def xxdg(data):
|
||||||
output=""
|
output=""
|
||||||
for i in range(0,len(data)/8):
|
for i in range(0,len(data)/8):
|
||||||
output+=xxd(data[i:i+8])
|
output+=xxd(data[i:i+8])
|
||||||
if i%2: output+="\n"
|
if i%2: output+="\n"
|
||||||
else: output+=" "
|
else: output+=" "
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
def xxd(data):
|
def xxd(data):
|
||||||
#diagnostic purposes only
|
#diagnostic purposes only
|
||||||
output=""
|
output=""
|
||||||
for d in data:
|
for d in data:
|
||||||
output+=hex(ord(d))[2:].zfill(2)+" "
|
output+=hex(ord(d))[2:].zfill(2)+" "
|
||||||
return output
|
return output
|
||||||
|
|
||||||
#for R/W the WebSocket, use recv/send
|
#for R/W the WebSocket, use recv/send
|
||||||
#for reading the TCP socket, use readsock
|
#for reading the TCP socket, use readsock
|
||||||
#for writing the TCP socket, use myself.wfile.write and flush
|
#for writing the TCP socket, use myself.wfile.write and flush
|
||||||
|
|
||||||
def readsock(myself,size,blocking):
|
def readsock(myself,size,blocking):
|
||||||
#http://thenestofheliopolis.blogspot.hu/2011/01/how-to-implement-non-blocking-two-way.html
|
#http://thenestofheliopolis.blogspot.hu/2011/01/how-to-implement-non-blocking-two-way.html
|
||||||
if blocking:
|
if blocking:
|
||||||
return myself.rfile.read(size)
|
return myself.rfile.read(size)
|
||||||
else:
|
else:
|
||||||
poll = select.poll()
|
poll = select.poll()
|
||||||
poll.register(myself.rfile.fileno(), select.POLLIN or select.POLLPRI)
|
poll.register(myself.rfile.fileno(), select.POLLIN or select.POLLPRI)
|
||||||
fd = poll.poll(0) #timeout is 0
|
fd = poll.poll(0) #timeout is 0
|
||||||
if len(fd):
|
if len(fd):
|
||||||
f = fd[0]
|
f = fd[0]
|
||||||
if f[1] > 0:
|
if f[1] > 0:
|
||||||
return myself.rfile.read(size)
|
return myself.rfile.read(size)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def recv(myself, blocking=False, debug=False):
|
def recv(myself, blocking=False, debug=False):
|
||||||
bufsize=70000
|
bufsize=70000
|
||||||
#myself.connection.setblocking(blocking) #umm... we cannot do that with rfile
|
#myself.connection.setblocking(blocking) #umm... we cannot do that with rfile
|
||||||
if debug: print "ws_recv begin"
|
if debug: print "ws_recv begin"
|
||||||
try:
|
try:
|
||||||
data=readsock(myself,6,blocking)
|
data=readsock(myself,6,blocking)
|
||||||
#print "rxws.recv bytes:",xxd(data)
|
#print "rxws.recv bytes:",xxd(data)
|
||||||
except:
|
except:
|
||||||
if debug: print "ws_recv error"
|
if debug: print "ws_recv error"
|
||||||
return ""
|
return ""
|
||||||
if debug: print "ws_recv recved"
|
if debug: print "ws_recv recved"
|
||||||
if(len(data)==0): return ""
|
if(len(data)==0): return ""
|
||||||
fin=ord(data[0])&128!=0
|
fin=ord(data[0])&128!=0
|
||||||
is_text_frame=ord(data[0])&15==1
|
is_text_frame=ord(data[0])&15==1
|
||||||
length=ord(data[1])&0x7f
|
length=ord(data[1])&0x7f
|
||||||
data+=readsock(myself,length,blocking)
|
data+=readsock(myself,length,blocking)
|
||||||
#print "rxws.recv length is ",length," (multiple packets together?) len(data) =",len(data)
|
#print "rxws.recv length is ",length," (multiple packets together?) len(data) =",len(data)
|
||||||
has_one_byte_length=length<125
|
has_one_byte_length=length<125
|
||||||
masked=ord(data[1])&0x80!=0
|
masked=ord(data[1])&0x80!=0
|
||||||
#print "len=", length, len(data)-2
|
#print "len=", length, len(data)-2
|
||||||
#print "fin, is_text_frame, has_one_byte_length, masked = ", (fin, is_text_frame, has_one_byte_length, masked)
|
#print "fin, is_text_frame, has_one_byte_length, masked = ", (fin, is_text_frame, has_one_byte_length, masked)
|
||||||
#print xxd(data)
|
#print xxd(data)
|
||||||
if fin and is_text_frame and has_one_byte_length:
|
if fin and is_text_frame and has_one_byte_length:
|
||||||
if masked:
|
if masked:
|
||||||
return code_payload(data[6:], data[2:6])
|
return code_payload(data[6:], data[2:6])
|
||||||
else:
|
else:
|
||||||
return data[2:]
|
return data[2:]
|
||||||
|
|
||||||
#Useful links for ideas on WebSockets:
|
#Useful links for ideas on WebSockets:
|
||||||
# http://stackoverflow.com/questions/8125507/how-can-i-send-and-receive-websocket-messages-on-the-server-side
|
# http://stackoverflow.com/questions/8125507/how-can-i-send-and-receive-websocket-messages-on-the-server-side
|
||||||
# https://developer.mozilla.org/en-US/docs/WebSockets/Writing_WebSocket_server
|
# https://developer.mozilla.org/en-US/docs/WebSockets/Writing_WebSocket_server
|
||||||
# http://tools.ietf.org/html/rfc6455#section-5.2
|
# http://tools.ietf.org/html/rfc6455#section-5.2
|
||||||
|
|
||||||
|
|
||||||
def flush(myself):
|
def flush(myself):
|
||||||
myself.wfile.flush()
|
myself.wfile.flush()
|
||||||
#or the socket, not the rfile:
|
#or the socket, not the rfile:
|
||||||
#lR,lW,lX = select.select([],[myself.connection,],[],60)
|
#lR,lW,lX = select.select([],[myself.connection,],[],60)
|
||||||
|
|
||||||
|
|
||||||
def send(myself, data, begin_id="", debug=0):
|
def send(myself, data, begin_id="", debug=0):
|
||||||
base_frame_size=35000 #could guess by MTU?
|
base_frame_size=35000 #could guess by MTU?
|
||||||
debug=0
|
debug=0
|
||||||
#try:
|
#try:
|
||||||
while True:
|
while True:
|
||||||
counter=0
|
counter=0
|
||||||
from_end=len(data)-counter
|
from_end=len(data)-counter
|
||||||
if from_end+len(begin_id)>base_frame_size:
|
if from_end+len(begin_id)>base_frame_size:
|
||||||
data_to_send=begin_id+data[counter:counter+base_frame_size-len(begin_id)]
|
data_to_send=begin_id+data[counter:counter+base_frame_size-len(begin_id)]
|
||||||
header=get_header(len(data_to_send))
|
header=get_header(len(data_to_send))
|
||||||
flush(myself)
|
flush(myself)
|
||||||
myself.wfile.write(header+data_to_send)
|
myself.wfile.write(header+data_to_send)
|
||||||
flush(myself)
|
flush(myself)
|
||||||
if debug: print "rxws.send ==================== #1 if branch :: from={0} to={1} dlen={2} hlen={3}".format(counter,counter+base_frame_size-len(begin_id),len(data_to_send),len(header))
|
if debug: print "rxws.send ==================== #1 if branch :: from={0} to={1} dlen={2} hlen={3}".format(counter,counter+base_frame_size-len(begin_id),len(data_to_send),len(header))
|
||||||
else:
|
else:
|
||||||
data_to_send=begin_id+data[counter:]
|
data_to_send=begin_id+data[counter:]
|
||||||
header=get_header(len(data_to_send))
|
header=get_header(len(data_to_send))
|
||||||
flush(myself)
|
flush(myself)
|
||||||
myself.wfile.write(header+data_to_send)
|
myself.wfile.write(header+data_to_send)
|
||||||
flush(myself)
|
flush(myself)
|
||||||
if debug: print "rxws.send :: #2 else branch :: dlen={0} hlen={1}".format(len(data_to_send),len(header))
|
if debug: print "rxws.send :: #2 else branch :: dlen={0} hlen={1}".format(len(data_to_send),len(header))
|
||||||
#if debug: print "header:\n"+xxdg(header)+"\n\nws data:\n"+xxdg(data_to_send)
|
#if debug: print "header:\n"+xxdg(header)+"\n\nws data:\n"+xxdg(data_to_send)
|
||||||
break
|
break
|
||||||
counter+=base_frame_size-len(begin_id)
|
counter+=base_frame_size-len(begin_id)
|
||||||
#except:
|
#except:
|
||||||
# pass
|
# pass
|
||||||
|
BIN
screenshot.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
50
sdrhu.py
@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/python2
|
|
||||||
"""
|
|
||||||
|
|
||||||
This file is part of OpenWebRX,
|
|
||||||
an open-source SDR receiver software with a web UI.
|
|
||||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as
|
|
||||||
published by the Free Software Foundation, either version 3 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
import config_webrx as cfg, time, subprocess
|
|
||||||
|
|
||||||
def run(continuously=True):
|
|
||||||
if not cfg.sdrhu_key: return
|
|
||||||
firsttime="(Your receiver is soon getting listed on sdr.hu!)"
|
|
||||||
while True:
|
|
||||||
cmd = "wget --timeout=15 -4qO- https://sdr.hu/update --post-data \"url=http://"+cfg.server_hostname+":"+str(cfg.web_port)+"&apikey="+cfg.sdrhu_key+"\" 2>&1"
|
|
||||||
print "[openwebrx-sdrhu]", cmd
|
|
||||||
returned=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).communicate()
|
|
||||||
returned=returned[0]
|
|
||||||
#print returned
|
|
||||||
if "UPDATE:" in returned:
|
|
||||||
retrytime_mins = 20
|
|
||||||
value=returned.split("UPDATE:")[1].split("\n",1)[0]
|
|
||||||
if value.startswith("SUCCESS"):
|
|
||||||
print "[openwebrx-sdrhu] Update succeeded! "+firsttime
|
|
||||||
firsttime=""
|
|
||||||
else:
|
|
||||||
print "[openwebrx-sdrhu] Update failed, your receiver cannot be listed on sdr.hu! Reason:", value
|
|
||||||
else:
|
|
||||||
retrytime_mins = 2
|
|
||||||
print "[openwebrx-sdrhu] wget failed while updating, your receiver cannot be listed on sdr.hu!"
|
|
||||||
if not continuously: break
|
|
||||||
time.sleep(60*retrytime_mins)
|
|
||||||
|
|
||||||
if __name__=="__main__":
|
|
||||||
run(False)
|
|
||||||
|
|