ICE fails even with TURN/STUN servers - webrtc

I have implemented video chat. It works perfectly on local, but doesn't work on production server.
this.rtc.oniceconnectionstatechange = () => {
console.log(this.rtc.iceConnectionState);
}
On local server the code above prints: checking, then after some time: connected
On the production server it's: checking then failed
I tried to use Google's STUN server and free TURN server by https://numb.viagenie.ca/ (You need to register in order to get access)
I checked both TURN and STUN servers via https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ and it seems work fine.
The code is written in Vue js and you can see it in this pen:
https://codepen.io/4unkur/pen/orNyvy?editors=1010
What is wrong with my code, or is this an issue of that free TURN server?
Dump of chrome://webrtc-internals https://pastebin.com/whhibysu
UPDATE
I was testing my app using 2 laptops: HP (Windows) and Macbook and it didn't work. Then I tried to test is using my mobile phone + Macbook and it worked, then phone + HP - didn't work.
So I thought maybe the problem is in HP? So I tested HP + HP i.e. opened 2 tabs in browser on HP and it did work. Why the issue happens only on HP, might it be the issue of Windows OS?
UPDATE 2
I run WebRTC Troubleshooter at https://test.webrtc.org/
on HP and it gave me errors in Connectivity tab:
On Macbook: I don't get such errors

Related

STM32 Virtual COM Port appears as Device in DFU Mode on Windows 10

So, my knowladge in embedded development is quite bad and now I am trying to receive some data from PC inside my MCu STM32F429IGT6 which is on WaveShare Core4X9I dev-board and send it back via USB Virtual COM Port.
I realized how to set up connection from MCu part and I even see connected device from Windows 10 Device Manager but... it appears as STM Device in DFU Mode
I have tryed already to install drivers from ST for such things but they are useless and official documentation says that they are not needed for Windows 10.
I have been following tutorials where guys just clicked several times inside Cube MX, generated code and VCP worked out of the box.
The question is what am I doing wrong? I don`t even know what information you might ask for thats why I created GitHub repo: https://github.com/dessy4oko/stm32f429-vcp-appears-as-dfu
And this is events from Device Manager of Windows 10 (translation from ru lang):
Device USB\VID_0483&PID_DF11\305233703237 is running. code 410
Device USB\VID_0483&PID_DF11\305233703237 is configured. code 400
Device USB\VID_0483&PID_DF11\305233703237 have not been moved due to partial or ambiguous matching. code 442
Device USB\VID_0483&PID_DF11\305233703237 requires further installation. code 430
Thank you for any information about my mistakes.
STM32 starts in DFU mode if BOOT-pins are pulled accordingly:
"System memory" means embedded bootloader, DFU in this case. You need "Main Flash" to run your app.
Check jumpers and switches on your board. Refer also to the AN2606 app note for complete information.

Can't use phone ase controller

I want to test my airconsole game on a smartphone before publishing. The problem is, I can't connect it to the simulator.
If i try to connect (Chrome on Android) it says connecting, after a few seconds it shows the enter code screen but no input is possible. After about 30 seconds I get the message download the app for next time. (Screenshots attached)
Do you know where the problem is?
My files are hosted on a webserver, accessible from everywhere.
Kind regards
Make sure your screen.html and controller.html are accessible from all devices.
Let's assume you are running your local web server on http://192.168.0.2:8080/
Try to access http://192.168.0.2:8080/screen.html and http://192.168.0.2:8080/controller.html using a normal web browser on the device that doesn't work. It should display the screen/controller html.
If you can't access http://192.168.0.2:8080/controller.html from your phone, but from your computer, make sure you are in the same network and that your router does not have "Client Isolation" activated.
If you are testing with real smartphones, make sure you do not use http://localhost/ or http://127.0.0.1/, because localhost is not your computer on the phone but the phone itself!
If you are still unable to connect your phone, you can use the ngrok tool to forward your local url. See our Ngrok Unity Guide for how to do this in the Unity Engine: https://developers.airconsole.com/#!/guides/unity-ngrok

The Local Testing connection could not be configured

I can’t run local testing(for example http://localhost:3000) on browserstack.
I'm using Linux Mint 18.3 Sylvia x64. Browser is Chromium.
The browser’s extension (app) is installed.
The screenshot shows that there is no connection.
http://joxi.ru/Y2LJBv0H9MBv8r
The checkbox is checked.
http://joxi.ru/1A5PvVpCnzMww2
I tried this manual https://www.browserstack.com/local-testing.
./BrowserStackLocal --key
The above command is started, but nothing happened.
BrowserStack's Support Answer:
Thank you for joining the screen share session. As per our investigation, it seems that few of the IP's of our servers hosted on AWS are blocked due to Telegram blockage by Roskomnadzor which is leading towards the issue.
Having said that, our team is evaluating alternate solutions for our Russian users and I will be sure to notify you of the developments.
Cool!
But my neighbour doesn't have problems, he has Windows.
We have a common Internet provider.
Try replacing 'localhost' in the URL you are using with the IP address of the machine. For example, if you are testing the URL "http://localhost:3000/index.html" try using http://<machine_ip_address>:3000/index.html instead.

Google Drive API only working on tablet, not smartphone

I have created an app that connects to Google Drive via this code:
googleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API).addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this).build();
googleApiClient.connect();
This code works on my tablet (Samsung Galaxy Tablet 2, with 4.4.2 running on it), however when I try running this same code on either a Nexus 5 with 5.0.1 or a Galaxy S5 with 4.4.4, connecting to Google Drive crashes every time.
I do one initialization of the googleApiClient object, and one call to connect, but for some reason I keep getting this error:
04-13 15:27:44.563: E/AndroidRuntime(5402): java.lang.IllegalStateException: Client must be connected
Both phones have 3G and Wifi access, and the tablet just has Wifi access. I am calling connect to Google Drive, but for some reason I keep getting this error.
Has anyone ever encountered this issue before?
I believe your problem stems from a mismatch in Google Play Services versions. I think, the 7.0.+ version on your phone needs revision 23 in your IDE. Try to run SDK Manager and download rev 23 or higher. Your tablet will probably update to 7.00.+ when Google decides the time is right. But rev. 23 (or higher) should be compatible with everything 7.00 and lower. I can't be more specific here, since I am on Android Studio.
Good Luck

chrome.socket UDP API useless on Chromebook?

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