The Experiment: In this experiment were going to prove that it is possible to develop a Ham Radio Remote Base using HTML5 Microphone/Speaker Audio and a Node.js Serial Server. All the servers will be hosted on a Raspberry Pi. The Node2Serial Server will receive command from the Browser, sends them to the radio, in-turn it will return any reply’s from the radio back to the Browser. The Mic2Speaker server will stream Microphone audio from Browser to the server speaker, then though the audio interface to the radio Microphone input.
Well been working on this for the last four weeks, had to solve a lot of issues with HTML5 audio, but finally have them resolved. Now have a working remote base application working through a web page using HTML5 Audio for the Microphone/Speaker, and Node.js Serial Server controlling the radio all from a Raspberry Pi.
To change the frequency: Use mouse wheel to change the frequency digest or left mouse click buttons below the frequency to increase/decrease in 1, 10, 100, 1000 steps. The other controls are self explanatory. Left clicking the TX button will mutes the speaker audio, and the VOX will tigers the PTT on the remote transceiver.
Have tested this on iPhone, could control the radio without any issues, but HTML5 audio not working on iPhone, possibly because mobile devices don’t allow automatic back ground audio streaming. iPhone requires the users to start the audio stream. Tried some hacks to emulate a user click on the iPhone but still no audio stream. Will do some more research on this later.
So far things are working well on Linux Debian / Windows PC. Used the my remote base interface, built in a previous remote base experiment to send commands to the radio, and all is working well.
On 11/10/2016 updated the Ham Radio Web Remote Base to a Raspberry Pi3 Model B with Raspbian Jessie Lite. The addition of the on board 802.11n Wireless LAN, add wireless access to the Web Remote Base via a hot-spot on the Raspberry Pi. The hot-spot is a very nice addition can now access the Remote Base anywhere around the property. The hot-spot allow access to the Web Remote Base via the phone, no problems controlling the radio on the phone, but there are issues with HTML5 audio on the phone.
- Raspbian Jessie Lite
- Raspberry Pi
- USB Sound Card
- Micro USB 5V AC Adapters
- Serial Level Converter here
- Audio Interface here here
The biggest issue getting low latency HTML5 Audio, most of the time spent was getting except-able HTML5 low latency audio from server microphone to the browser, then from browser microphone to the server speaker.
One problem which has not been completely resolved, Win7 microphone AGC level control, unable to disable this in windows, so have a work around script which reset mic AGC every 5 seconds, this is not best solution, because still getting some crackling on microphone audio.
1/9/2016 Tried to add a low-pass filter to the browser HTML5 player audio tag, but found out that Firefox currently has a problem with createMediaElementSource.
1/11/2016 Finally figured out why createMediaElementSource would not play the audio stream. Like always a security problem, createMediaElementSource won’t cross domain, had to add ‘Access-Control-Allow-Origin’ : ‘*’ to the header to play the audio stream, but createMediaElementSource buffered the stream so audio latency is really bad.
And another problem: After updating Firefox from v33.1 to v43.0.4, the audio stream stops playing when left clicking the title bar. After a small delay the audio comes back buffered with a 15 second delay. To return the audio back to low latency audio stream it has to be reloaded.
1/13/2016 Well after trying everything to stop Firefoxv43.0.4 from buffering the audio stream when left clicked the title bar in any open Firefox browser. I down-graded back to Firefox v33.1. It also has the same problem but only buffers the audio stream for 2 seconds.
1/17/2016 Solved a lot off the HTML5 issues and now have been using the remote base every daily.
11/23/2016 Finally have a stable Node.js serial port connection to the transceiver, found that the CIV – RS232 selection switch had some cross talk causing the CIV option on the remote inter face board to work sporadically. On the new remote PCB ill just use jumpers to select the CIV or RS232 input.
One issue with ICOM Cat commands: unable to figure out the command to select the band-registers to switch bands and there is no On/Off command on older ICOM HF transceivers. Yause / Kenwood / Elecraft have a lot better CAT commands then ICOM.
11/27/2016 Working on the phone audio issue, and a new Raspberry Pi Ham Radio Web Remote Base inter-face board.
At this time HTML5 audio not the best quality, but will probably get better in the future. Adding filter to the audio stream definitely improve the audio quality.
Node.js Serial has a problem with the serial.close() command. If the serial port isn’t closed after processing a command it will freeze the serial port .
It’s a lot easier to remote a Kenwood/Yaesu transceiver, ICOM 756 PROIII civ commands are difficult to use and there is also no On/OFF radio command. Will code a second version for Yeasu FT950/FT2000.
It is totally possible to develop a web based Remote Base application using HTML5 Audio with Node.js Serial server on a Raspberry Pi. With future Html5 audio improvements it will be really easy to write a web application to control your Ham Radio station though a web page.