chrome.socket UDP API useless on Chromebook? - udp

I am working on a Chrome packaged app that requires multicast communication over the local network and is specifically targeting Chromebook users. The 'Network Communication' documentation on the packaged app site is outdated and the chrome.socket API documentation is lacking. I was able to get some idea of how to get multicast working by looking through Chrome's 'multicast' sample app (https://github.com/GoogleChrome/chrome-app-samples/tree/master/multicast).
I tested my app by loading it into the Chrome browser on my Mac and everything worked great. I loaded it onto my Chromebook and multicast did not work. I then tried the 'multicast' sample app on my Mac and Chromebook with the same result. The 'multicast' sample app is a chat app. When loaded on both computers on the same network, everything works as expected on the Mac - I can send chat messages out and receive chat messages. On the Chromebook I can send chat messages but not receive them - including the ones that the Chromebook sent.
According to this post - Chrome Sockets API Behaves Differently on Chrome OS (vs. Ubuntu, Windows)? - it looks like Chromebook has a restricted firewall that is blocking UDP packets. I followed the instructions on the post to turn on developer mode and allow UDP packets and that allowed my app to run as expected, but that is not a solution for me. I can't expect Chromebook users to run in developer mode to run my app.
Anyone know if it is possible to allow UDP packets on the Chromebook without going into developer mode? Is there an undocumented permission I can add to my manifest to override the Chromebook UDP restrictions (this seems possible since the 'udp-multicast-membership' permission included in the 'multicast' sample app is undocumented)? This seems like a long shot but chrome.socket.create can be given optional socket options which don't appear to be documented anywhere. Maybe there is something I can add there? And why have Chrome sample apps that don't run on a Chromebook???
---UPDATE---
In case someone is having a similar problem, it looks like this has already been filed as a bug and been looked at just within the past couple of weeks.
https://code.google.com/p/chromium/issues/detail?id=275737
I have no idea when it will actually make its way to a Chromebook update.

Regarding:
I have no idea when it will actually make its way to a Chromebook
update.
usually ChromeOS follows the same release schedule as desktop chrome, with new stable versions coming out about every 6 weeks. But because of the holidays in December when lots of people are on vacation, there is sometimes a hiccup. You can give the dev channel a try and see if the fix showed up there yet: https://support.google.com/chromebook/answer/1086915?hl=en

Related

Mobile Test Workbench - Status of the RTW server

I've been testing MTWWW for about a couple of days, and I've come to notice something.
I have to add the device to MTWW by going to a url on the device that looks like this,
protocol://hostname:+port/mobile
However, sometimes my device can't reach that address neither when I restart eclipse. When that happens I typically restart my computer and everything is fine and dandy again.
There was even one time that on that same screen that display the QRCode and URL to add a device, a notification appeared which showed something close to "RTW server could not start properly" or something like that.
This led me to believe that MTWW uses some other web server other that WL server to receive the recordings from the instrumented apps.
This also led me to believe that perhaps sometimes when the server tries to start the ports are already binded to some socket and it fails the initialization. Just speculation here.
However if there is a slight sense in what I written, is there a way to inspect the status of the RTW server, some dashboard perhaps?
Besides that, what should I do to fix when the RTW server didn't start properly? Rebooting the computer is pretty lame, there must be something more clever to do.
Oh, I've found this behavior on a mac osx box, on a windows one I haven't done so much testing.
Thanks in advance.
There is no dashboard for the server. But if yoy think that the issue come from the port, you can change it in the preferences. Please read http://www-01.ibm.com/support/docview.wss?uid=swg21678980
Hope its help

Bluetooth LE on iOS cannot work with many services and characteristics

I develop a BLE application, using Core Bluetooth in my iPhone app.
My iPhone communicates with linux with bleno launched.
The problem is that it cannot work with more than one characteristic or service, though just one characteristic works nice.
Here is my code for iOS and .js code for Node.js:
http://pastebin.com/k5pUrbLt
http://pastebin.com/biCWLmJ3
Thank you!
P.S. That's what i get in console:
2014-07-24 13:18:02.819 lexy[142:60b] didDiscoverPeripheral
2014-07-24 13:18:04.503 lexy[142:60b] didDiscoverServices
2014-07-24 13:18:04.506 lexy[142:60b] D61191C0-FCE8-4F5A-912C-15EE39D927B4
I.e. I successfully discover and connect to the peripheral, but I do not find any characteristics. In that case I have one service with many characteristics.
iOS can work with multiple characteristics and multiple services on a remote device.
Your ObjC code seems okay (1 service with 2 characteristics).
Console output suggests that you send a discoverCharacteristics request but that it hangs and never returns. You could add logging to the didDisconnectPeripheral delegate method to see if there is a disconnect happening.
What you could also do is to look at the logs of the Bluetooth stack and to compare them to how the logs look like if you access a TI Sensor Tag (those tags are the hello world of BLE).
iOS 7.1 instructions for Bluetooth logs are located here, for iOS 8 you'll have to resort to Apple's official way to get the logs (installation of a configuration profile) but their logs contain less information than the ones by BluetoothCompanion.
Apparently, it works on Ubuntu 14.04, but doesn't work on OpenSuse 13.1.

Cannot view video from publisher using Chrome to iPad with OpenTok

I'm currently trying to set up a connection between my web client and my iOS app, but for some reason my iOS client only sees a black box when using Chrome (version 33). I can see the video just fine if I use Firefox (both in my app and when I put the browsers side-by-side, they can see each other).
This doesn't appear to be a documented known issue with the JavaScript SDK, and I can't see any recent discussion about this on the forums (last post was mine).
The iOS sample can be located here (samples/OpenTokHelloWorld) with the browser page in samples/OpenTokHelloWorld/browser_demo.html
I suggest cd'ing into samples/OpenTokHelloWorld and running python -m SimpleHTTPServer, as it can't be run from a file:/// path.
Here is what my iPad sees:
Chrome:
Firefox:
And Chrome/Firefox (respectively), both publishing video from the same camera
Edit: after testing on other machines, it may be something specific to my environment even though none of my extensions run in Incognito and I don't have any custom plugins installed.
It looks like the OpenTok mobile SDKs with the specific webcam I was using has issues. On Android the video stream will display for a brief moment then segfault, and on iOS there will be no video at all.
I have tested this many times and could not reproduce what you are seeing in your chrome.
Without seeing any console errors or iOS logs the best suggestion is to try clearing your cache, or maybe restarting your computer (longshot)

Wireless Authentication Page iOS app

I'm not really sure how to word this exactly, so hopefully someone can make sense of it. I've been working on an iPad app that syncs files from a server to your iPad and lets you build presentations with the various files. The corporation I'm working with on this app has a wireless network that requires you to re-authenticate every hour. So every hour instead of getting the expected JSON api response, any HTTP request pulls down the page needed to reauth with the wireless network. I was wondering is there is a specific HTTP response code related to getting sent that page or a "best-practice" way of testing for that page as opposed to JSON.
Granted I could just test to see if the response is HTML, but that doesn't account for other redirect responses that I haven't found yet. I could just test part of the HTML to see if it matches a predetermined portion of the html, but I'm an outside contractor. I can't guarantee they won't change the markup or verbiage of the page after I've made my deliverable.
So does anyone out in the ether know a "best practices" methodology for testing if the app needs to reauth before syncing?
I noticed that on Mac OS X and maybe even iOS, when you connect to a new Wi-Fi network, it will try to contact www.apple.com. This is being done to check if the internet connectivity is available. If it's not available, the Captive Network Assistant will pop-up, showing you the authentication page, or sometimes when I'm in Starbucks, an advertisement.
Following your question, since Apple themselves is doing it this way, I think you could check for HTTP response code, look for something in the HTML markup (slightly discouraged though) or trying to connect to a known server (Reachability).
For a corporation practicing well-documented projects, I am quite sure they won't be changing things without making sure that your app, once deployed will continue to work.

Do all Android devices include Android Browser?

(e.g. the Chrome browser for Android)
Talking about factory defaults here, not what users can install later.
(Sorry if this is a stupid question, I just can't find an answer anywhere)
Typically consumer facing Android devices do come with the browser. It is part of the core platform.
However, there is nothing stopping a manufacturer from removing the Browser for whatever reason. For example, that Android powered watch will not come with a web browser.
Yes, as it's part of Android OS.