Repository navigation
OnAir Web
Let many people listen to your radio from a browser. Quick start, Cloudflare Tunnel and troubleshooting.
OnAir Web turns the headless server (onair-server) into a WebSDR-style receiver for many people at once. Your SDR captures a wide piece of spectrum; everyone who opens your page gets their own virtual receiver inside it: own frequency, mode, audio and waterfall.
You need: a computer with OnAir's onair-server and an SDR (HackRF, RTL-SDR, Airspy and so on). With a HackRF Pro use 10 Msps. OnAir Web is receive-only: nobody who listens can transmit or change your radio.
- Start the server with the web part switched on:
No radio at hand? Add
onair-server --web --web-lan--device testand you get a built-in test signal. - On the same computer open
http://127.0.0.1:8073/. On another computer or phone in your home network openhttp://<address of the server>:8073/. - You see the waterfall. Click on it to tune, pick a mode (AM, NFM, WFM, USB, LSB, CW) and press the speaker to hear it. Every person who opens the page gets their own tuning, nobody tunes anybody else away.
- Choose what the listeners can tune: the radio's centre frequency and sample rate are set in the control page (port 8765) or with
freq_mhz=andrate_msps=in~/.config/onair/server.conf. A wider rate gives more spectrum but uses more processor time.
That is all for your own network. To let people from outside listen, read on.
https://web.on-air.dev is only the viewer: a copy of the browser page, nothing else. It has no radio. Without a receiver behind the address it says "There is no OnAir receiver behind this address". A receiver exists only where somebody runs onair-server --web. If you want your own public address, you run the server and put a name in front of it, as below. (The page also works from your own server at port 8073; you do not need web.on-air.dev for that.)
A tunnel gives your server an https:// address without opening a port on your router, and it works behind CGNAT. Free, needs no domain for a quick test.
- Install
cloudflared(https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/). - Put these in
~/.config/onair/server.confand start the server (do not use--web-lanfor the public part; the tunnel comes from this same computer):Theweb=1 web_trust_proxy=1 web_auth=invite web_max_users=4 web_origin=https://YOUR-NAME.trycloudflare.comweb_originline must be exactly the page address the listeners will open (scheme and name, no slash at the end, no path). You only know the name after step 3, so start the tunnel first, copy the name, then add the line and restart the server. - Start the tunnel:
It prints an
cloudflared tunnel --url http://127.0.0.1:8073https://something.trycloudflare.comaddress. That is your page origin. (A quick tunnel gets a new random name each time it starts. For a fixed name make a named tunnel on your own domain in the Cloudflare dashboard, pointing athttp://127.0.0.1:8073.) - Make an invite for each person you want to let in (see the OnAir repo file docs/ONAIR-WEB.md, section "Admin API"), or use
web_auth=passwordwithweb_password=(8 characters or more). Send the link in this form:The part afterhttps://YOUR-NAME.trycloudflare.com/#invite=TOKEN#never reaches the server's logs. - Keep
web_max_userssmall. Everybody who listens uses your upload bandwidth (about 10 to 50 kbit/s audio each, more with the waterfall zoomed) and sits on your computer's processor.
Honest status: the server is tested with synthetic signals and many simulated clients. We have not yet tried it with real browsers over the internet beyond one demo, so expect rough edges and tell us what you find. Radio laws differ by country: you, the host, are responsible for what your receiver lets people listen to. See docs/ONAIR-WEB.md "Safety and legal defaults", and use web_allow_range to limit the frequencies if needed.
-
"There is no OnAir receiver behind this address" / status "no receiver". The page was loaded from a plain web host (such as web.on-air.dev), or the server is not running, or the tunnel/proxy points at the wrong port. Start
onair-server --weband checkhttp://127.0.0.1:8073/web/v1/infoon that computer; it must answer with JSON. The tunnel or proxy must forward to127.0.0.1:8073. -
"Connection lost. Reconnecting." The browser's WebSocket closed and it retries by itself. Common causes: the server or tunnel was stopped; a proxy that does not pass WebSockets (nginx needs the
Upgradelines, see docs/ONAIR-WEB.md "On the internet"); wrong origin (next point). Check the server's log for the reason. -
Wrong origin. The page was opened under an address the server does not know (for example the tunnel's name changed, or you use
https://at the tunnel butweb_originstill has the old name). Setweb_origin=<exactly the address in the browser's address bar, without the path>(the option can be repeated) and restart the server. Also setweb_trust_proxy=1when a tunnel or proxy sits in front. -
"Server busy or full".
web_max_userslisteners are already in. The page tries again by itself every few seconds. Raiseweb_max_usersonly if your processor and upload can carry it. -
"Access refused: wrong or missing password or invite". The link has no
#invite=TOKEN, the token was revoked, or the password is wrong. Five wrong tries from one address block it for a minute. -
"This server needs HTTPS". The page was opened over plain
http://from outside your network. Use the tunnel'shttps://address. - No sound. Browsers want one click before they play audio: press the speaker button. Check that the mode and bandwidth fit the signal and that squelch is not closed.
-
Port 8073 shows nothing from another computer. You started without
--web-lan(then only this computer is let in), or a firewall blocks the port.
Full reference (limits, admin API, frequency ranges, sizing, protocol): docs/ONAIR-WEB.md and headless server.
Related: Command line, Remote API, Network radios.
Getting started
Using OnAir
Tools and guides (0.2.7)
- Band survey
- Message database
- Watchlists
- TV recorder
- Time machine
- Pass scheduler
- Plugin SDK
- Headless server
- All guides
Radios
Modes by group
- TV
- Broadcast radio
- Aviation
- Maritime
- Satellite & navigation
- Two-way radio
- Cellular & rail
- Pagers
- IoT & sensors
- Weather & science
- Amateur: digital
- Amateur: voice & packet
- HF utility
- General & tools
Tutorials
- DVB-T2 TV with a HackRF
- FM radio with RDS
- Aircraft with ADS-B and the map
- Ships with AIS
- DAB+ digital radio
- Weather satellite images
- HF digital: FT8 and WSPR
- Digital voice: DMR, D-STAR, P25
- Pagers: POCSAG and FLEX
- Time stations and the clock
- Record IQ, then the Signal workbench
- The signal sample library
- Control a rig with Hamlib
- Two receivers and the multi-decoder
Reference
- Command line
- Remote-control API
- OnAir Web
- Voice codecs
- Transmit
- Build from source
- Contributing
- Code map
Help
Legal and privacy
More