shinysdr icon indicating copy to clipboard operation
shinysdr copied to clipboard

shinysdr in google chrome at iPad

Open mr-suw opened this issue 10 years ago • 5 comments

Hi,

Great development progress. Shortly I did try shinysdr in google chrome at my iPad. I am using the latest iOS version and I want to report how it's working. Good thing is that the web interface elements of shinysdr are controllable. There are some minor design issues, but that's not the problem. One problem is, that you have no sound output. Do you think you can fix it? Let me know when you need further information.

Regards, e-skulk

mr-suw avatar May 10 '14 06:05 mr-suw

Thanks for the report! Unfortunately, I don't have an iOS device to test ShinySDR on, so I can't troubleshoot it myself. If the main UI is working, but audio is not, the most likely thing is that iOS WebView has some difference in its implementation of the Web Audio API. (Since Apple prohibits apps implementing web renderers, Chrome for iOS is using the system provided renderer and for compatibility purposes it's more like Safari than Chrome — to my understanding.)

To help spot the problem, could you provide:

  • A screenshot and description of behavior of the “Audio stream” section of the UI, which reports on the audio buffering.
  • Any errors appearing in the JavaScript console output.
  • A donated iPad for me to test on :-)

kpreid avatar May 10 '14 14:05 kpreid

I did take some screenshots. The first screenshot shows how the UI elements are positioned. I can select another frequency by clicking at the spectrum. But it's not possible to enter another frequency in a receiver window at radio config. img_0229

The next two screenshots show a receiver window at radio config. I can see that the values for RF and Audio is changing. The squelch settings does not have any effect. I have still no audio output. img_0231 img_0232

The JavaScript console does output an interest message: Extreme audio overrun. I did decrease the volume and also adjust squelch. But the above message is still thrown.

The audio stream output of shinysdr does show the following: Buffered value increases until it hits 5 and than it drops to 0. Target value shows values around 1.00s and sometimes values around 5s.

I hope I could provide some additional information.

mr-suw avatar Jun 01 '14 09:06 mr-suw

Please provide an exact copy of all console messages, or at least which messages exist other than the overrun one.

(Overrun means the data is arriving from the server but not being delivered to the audio hardware in a timely fashion, which makes sense here, but what we want to know is what else might have failed to cause that.)

kpreid avatar Jun 01 '14 14:06 kpreid

There are no other messages (only extreme audio overruns):

img_0239

What you see is a JavaScript console. This screenshot is taken after I connected to shinysdr server and after I idled for a moment.

Shinysdr output is:

INFO:shinysdr:Log opened.
gr-osmosdr v0.1.1-9-gc65d205d (0.1.2git) gnuradio 3.7.3
built-in source types: rtl rtl_tcp 
Using device #0 Generic RTL2832U SN: *
Found Rafael Micro R820T tuner
INFO:shinysdr:Constructing flow graph...
Using Volk machine: sse4_2_64_orc
INFO:shinysdr:Flow graph: Switching RF source
INFO:shinysdr:Flow graph: Changing sample rates
INFO:shinysdr:Flow graph: Rebuilding connections
INFO:shinysdr:Flow graph: ...done reconnecting.
INFO:shinysdr:Restoring state...
INFO:shinysdr:Warning: Discarding erroneous state OsmoSDR sample_rate=27.0e6.bandwidth = 0.0 (IndexError: list index out of range)
INFO:shinysdr:Flow graph: Rebuilding connections
INFO:shinysdr:Flow graph: ...done reconnecting.
INFO:shinysdr:Starting web server...
INFO:shinysdr:OurStreamFactory (WebSocketFactory) starting on 8101
INFO:shinysdr:Starting factory <shinysdr.web.OurStreamFactory instance at 0x354d830>
INFO:shinysdr:Starting factory <txws.WebSocketFactory instance at 0x354dcf8>
INFO:shinysdr:Site starting on 8100
INFO:shinysdr:Starting factory <twisted.web.server.Site instance at 0x3544878>
INFO:shinysdr:ShinySDR is ready.
INFO:shinysdr:Visit *
INFO:shinysdr:Flow graph: Rebuilding connections                                                                                     
INFO:shinysdr:Flow graph: ...done reconnecting.                                                                                      
INFO:shinysdr:192.168.10.88 - - [01/Jun/2014:18:26:59 +0000] "GET /www HTTP/1.1" 301 - "-" "Mozilla/5.0 (iPad; CPU OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201"                                                                        
INFO:shinysdr:192.168.10.88 - - [01/Jun/2014:18:26:59 +0000] "GET /www/ HTTP/1.1" 200 3161 "-" "Mozilla/5.0 (iPad; CPU OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201"                                                                    
INFO:shinysdr:192.168.10.88 - - [01/Jun/2014:18:26:59 +0000] "GET /client/openlayers/OpenLayers.debug.js HTTP/1.1" 200 2942033 "http://192.168.10.83:8100/www/" "Mozilla/5.0 (iPad; CPU OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201"   
INFO:shinysdr:192.168.10.88 - - [01/Jun/2014:18:27:00 +0000] "GET /www/dbs/ HTTP/1.1" 200 39 "*" "Mozilla/5.0 (iPad; CPU OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201"
INFO:shinysdr:192.168.10.88 - - [01/Jun/2014:18:27:00 +0000] "GET /www/wdb/ HTTP/1.1" 200 2 "*" "Mozilla/5.0 (iPad; CPU OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201"
INFO:shinysdr:192.168.10.88 - - [01/Jun/2014:18:27:00 +0000] "GET /client/plugin-index.json HTTP/1.1" 200 100 "*" "Mozilla/5.0 (iPad; CPU OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201"
INFO:shinysdr:Starting RFC 6455 conversation
INFO:shinysdr:Starting RFC 6455 conversation
INFO:shinysdr:Stream connection to  /www/state
INFO:shinysdr:Stream connection to  /www/audio?rate=44100
INFO:shinysdr:Flow graph: Rebuilding connections
INFO:shinysdr:Flow graph: ...done reconnecting.
INFO:shinysdr:Flow graph: Rebuilding connections
INFO:shinysdr:Flow graph: ...done reconnecting.
^CINFO:shinysdr:Received SIGINT, shutting down.
INFO:shinysdr:(TCP Port 8100 Closed)
INFO:shinysdr:Stopping factory <twisted.web.server.Site instance at 0x3544878>
INFO:shinysdr:(TCP Port 8101 Closed)
INFO:shinysdr:Stopping factory <shinysdr.web.OurStreamFactory instance at 0x354d830>
INFO:shinysdr:Stopping factory <txws.WebSocketFactory instance at 0x354dcf8>
INFO:shinysdr:Main loop terminated.

It would be great when we find a solution. Anything more I could try?

mr-suw avatar Jun 01 '14 18:06 mr-suw

I think this will take more troubleshooting actually on the device. The most likely theory I see is that UIWebView's (WebKit engine) implementation of the Web Audio API is different from normal Chrome (Chromium/Blink engine)'s in some way that's just resulting in nothing happening.

If you or anyone else wants to start investigating, the relevant code is at shinysdr/webstatic/client/audio.js. If I had an iPad in front of me, what I'd do first is add logging to the audioCallback to find out whether it's being called at all, and if so what size of outputBuffer it's getting, and so on; and if that didn't work, try fiddling with how the AudioContext is being set up.

(I've already tried it on Mac Safari, and the audio works fine, so I can't debug there.)

kpreid avatar Jun 01 '14 22:06 kpreid