AirConsole phone controller screen not loading - unity3d

I've set up a project in Unity using AirConsole. I was able to put together a simple game pretty quickly, but I've since run into issues. I was initially developing on a Mac and then switched to my work computer which is a Dell PC. On my Mac I was able to test my game using the simulator in Unity. Since I switched to my PC I have been unable to connect from my phone to the webserver in the debug simulator. The phone gets through the "Enter the Code" screen, the developer console makes a connection noise, but then my phone just sits at the "Loading..." screen.
I've reverted back to the Pong sample project to confirm that my code is not the problem. I've tested the phone using both Chrome and the AirConsole app. I've tried temporarily disabling my firewall in case my firewall was blocking the ports. If I run the simulator in Browser Start Mode = "Virtual Controllers" the controllers on my PC load fine, but I'm still not able to connect with my phone. I'm using AirConsole v1.3.0.b which was still the most recent version when I posted this.

Steps to resolve this issue:
Start the game using the simulator.
Make sure the virtual controllers of the simulator load your controller.
If that is the case try to load the controller.html directly in the phones browser. Assuming your run your game on in the simulator using http://www.airconsole.com/simulator/#http://192.168.0.2:7834/ then take the part behind the # and append controller.html. In this example try to load: http://192.168.0.2:7834/controller.html on your smartphone. Note that this controller wont be working - it's just to try if the page that AirConsole loads internally works. If this does not work, you are either not in the same network or you network has client isolation activated (this needs to be deactivated). To resolve this, check: Using Airconsole on a standard University/Corporate network for dev
If this also works, you probably have javascript errors before the AirConsole constructor is called. Use chrome to remotely debug the phone browser: https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging?hl=en
Update: here is a detailed guide for Unity
https://developers.airconsole.com/#!/guides/unity-ngrok

Related

Why can't I get a MediaStream from back camera when front camera is in use on Android Chrome?

Consider this:
What I'm trying to do here is to get a MediaStream for environment facing camera (back) when another MediaStream for user facing camera (front) is active.
This is happening on Android Chrome 94 and Android MS Edge 93, therefore I think it's probably a webview related issue, not sure. I tested this on an Xiaomi phone and on 2 different Samsung tablets.
If I stop the track from the front stream before creating the new stream, I don't have any issue at all.
It's really strange, because same piece of code works perfectly on PC (Windows) Chrome (not tried macOS or iOS at the moment).
Thing is that stopping the first track before creating the second stream will give the user a pretty bad experience (with blank screen for a while), which I'd like to avoid.
Also there could be some use cases (e.g. PiP) in which using both cameras at once could be necessary... I can't see why this isn't/shouldn't be working.
Do you guys have any suggestion?
Thanks

How to get CC2650 Sensortag to original state

I tried various way's compile and update the firmware on my CC2650 Sensortag, more or less failed that.
Now I want the original functionality back. So I went to where I installed BLE 2.02 (simplelink\ble_sdk_2_02_01_18\examples\hex) and fetched the cc2650stk_sensortag_rel.hex. Programmed that with SmartRF. Now the Sensor tag is back in "near" normal operation. If I detach the programmer, remove the battery, then attach battery. The Simplelink on my Iphone can see a Sensortag 2.0. It notice when I push the buttons, but I can't see anything when using/pushing Sensor view or service explore. What can I do to get it back in it's original working state?
I don't know if I somewhat bricked the device trying to go over to Zigbee OTA and then trying to build/debug the IT resource explorer CC26xx Bluetooth Smart.
This is embarrassing. The SensorTag was working all along, a very important step was missed. Since I already tried uninstall/install the iPhone app I didn't think of switching off/on my bluetooth. The last step fixed the issue. Somehow settings where cashed there.

Apple Reachability sample doesn't work in background mode

I've seen that there's a lot of entries in the forum about Apple's Reachability Class, but I haven't seen a solution for this one.
I'm developing a VoIP app that needs to detect connectivity changes in background mode and real time. SCNetworkReachability API should do the job, but I'm facing some problems...
First of all, I've downloaded Reachability sample code from Apple (v2.2) but I haven't been able to make it work in background mode. It works great if I launch the app on the simulator and plug/unplug de network cable. But if I try on the device, launching the app and then going to background mode for enable/disable wifi, the app isn't been notified at all.
I've set "Application does not run in background = NO" and "Required background modes=App provides Voice over IP services" in the info.plist without success. The Donoho version of this sample code has the same problem.
Second one... I've integrated the Reachability sample code on the VoIP app that I'm developing (Linphone based) and... the connectivity changes are detected on background mode...!!!
Nevertheless, it doesn't work well always:
if I launch the app with wifi on, all the following reachability changes, even in background mode, are detected -> OK
but if I launch the app without wifi off, the app doesn't detect the wifi recovery... -> KO
So, the questions are:
how can I make Apple Reachability sample works in background mode?
and... when Reachability class looks to be working on background mode, why it only works really when the first reachability check finds connection available?
I'm running the apps on iPhone4 with iOS 5.1.1 (maybe some problem with iOS version > 5.0...??)
I've checked too the pointed solution on this thread, but last version of Reachability sample is already taking care of that retain/release issues...
Thanks in advance
I've been around this issue for some days, and finally the problem looks to be closely related with the NSStreamNetworkServiceTypeVoIp connection mode,
Looks like a suspended app only could listen to connectivity changes once it has established an active NSStreamNetworkServiceTypeVoIp connection with the remote server.
That explains why Reachability sample is not responding to the connectivity changes in background mode (no NSStreamNetworkServiceTypeVoIp connection within the app) and why the voip app neither responds if wifi's off on first launch...
So, looks like some kind of workaround will be needed for this one...
This Reachability may help you which also comes with sample code.This notifies you whenever your internet goes down or comes up instantly.

How can i Open Serial Port of Dock connector in iOS 5.0.1

I can successfully open the serial port of iPhone/iPad in lower version than iOs 5. with the use of
open("/dev/tty.iap", O_RDWR | O_NOCTTY | O_ASYNC))
but i got error "Operation not permitted" in iOS 5 .
(I used the Serial Programming for communicating accessory and iPhone)
Is there any one have idea about this.
Thanks.
Since it also doesn't work for me I think Apple blocked serial access on iOS5+. Stefan Esser (#i0n1c on twitter) just had a talk about this at a security conference. I'm waiting for the slides so then we know what happened to serial
Not sure if you got this working, but from what I have read you can not access the iPhone's serial port for communication while your app is in the sandbox. By sandbox, I mean when you click "run" in Xcode and transfer your app to your iDevice the app lives in a sandbox environment. This environment prohibits your app from accessing things such /dev/tty.iap the serial port within the dock connector. One solution I have read is to copy your app /Applications/which is a link to the location /var/stash/Applications.XXXXXX/ which should take your app out the sandbox environment, and give it access to /dev/tty.iap Let me know if this works for you as this is something I am eventually going to have to do with the app I am developing.
I got the same error and was able to solve it by putting the app in the directory where Cydia apps go rather than where Xcode automatically puts it (Found this hint in the second link in this related/identical post).

Debugging iPhone App from Command Line

I can do it from XCode, but I want to be able to launch an iPhone App (on the device) from the command line. Is it possible?
Why? Because I want to capture some of the output for semi-automated testing. I'm guessing I need to use a debug build for NSLog output, but I'd also be interested to know about other methods for getting NSLog / stdio data back to the host Mac.
There is a project on github called titanium_mobile (part of Titanium Developer).
I use a utility from that project called iphonesim. It launches an iPhone app from the command line (though I am not sure how, I think there is a way to do that with SpringBoard.app). If you take a step up one level in the Titanium Mobile code and look at builder.py you can see how they launch an app in the simulator and capture the output.
Ultimately I solved my specific need a different way. I needed to get data from the iPhone's accelerometers into a prototype app in Adobe AIR(Flash).
I used this app on the iPhone which drops UDP packets with X,Y,Z forces in them.
http://code.google.com/p/accelerometer-simulator/wiki/Home
Found that from this blog post which might be of interest to people trying to do other similar things.
http://ifiddling.blogspot.com/2009/01/dummy2.html
I used a Python script to present a server to Flash, grab UDP accelerometer packets, munge them into AMF and send them to Flash. Flash uses a socket to connect to this server and receive the accelerometer data.
A few parts, but it works nicely.
You can do this on the device if it is jailbroken. You can put a debug build and symbols on your device and run gdb on it. It is totally unsupported but I hear it works. Not sure if there is a good tutorial. Google?
One method would be to use the AsyncSocket class, and pass whatever data you want to log from the iPhone to a basic host app on the Mac, which NSLogs whatever it receives. If you follow the EchoServer application, you should be able to integrate it in just a few minutes