gearvr-controller-webbluetooth icon indicating copy to clipboard operation
gearvr-controller-webbluetooth copied to clipboard

Latest Chrome version(s) fail

Open g8ecj opened this issue 6 years ago • 12 comments

Linux Version 66.0.3359.181 (Official Build) (64-bit) Windows Version 66.0.3359.181 (Official Build) (32-bit) both fail with the following error: ControllerBluetoothInterface.js:154 Uncaught TypeError: Cannot read property 'writeValue' of null at ControllerBluetoothInterface.runCommand (:152:44) at ControllerDisplay.onClickDeviceActionButton (:320:50) runCommand @ ControllerBluetoothInterface.js:154 onClickDeviceActionButton @ ControllerDisplay.js:319

I've been unable to 'downgrade' chrome due to dependency issues.

Any ideas?

g8ecj avatar May 23 '18 22:05 g8ecj

Not working here either. Arch Linux/Chrome Beta 70 with the flags enabled and -E passed to bluetoothd.

GearVR sample says I don't have support, while https://googlechrome.github.io/samples/web-bluetooth/discover-services-and-characteristics.html works

EDIT: Windows 10 with Chrome 69 also not detected.

EDIT2: Got it to load with https in the URL bar. Pairs but fails to do anything. May be running into the same issue as OP now.

Yep same thing

ControllerBluetoothInterface.js:154 Uncaught TypeError: Cannot read property 'writeValue' of null at ControllerBluetoothInterface.runCommand (:152:44) at ControllerDisplay.onClickDeviceActionButton (:320:50)

parkerlreed avatar Oct 05 '18 22:10 parkerlreed

Hey guys, I'm just late to the party on this. Super cool idea, I hoped to use this controller to control a project. Ordered my controller and tried to use it before finding the same issues you guys already found, and then this thread. Did anyone move this forward at all? It's a shame to let this great start falter, I would greatly appreciate it if anyone got this working at all to let me know. Thanks!

sbierly avatar Aug 29 '19 06:08 sbierly

@sbierly Got it working locally with the nodejs http-server https://github.com/jsyang/gearvr-controller-webbluetooth/issues/3#issuecomment-460777741

parkerlreed avatar Aug 30 '19 05:08 parkerlreed

Many thanks @parkerlreed, I'm not a software guy so kind of floundering here. I managed to boot up Ubuntu 18.04.1 LTS, get the nodejs http-server setup, clone the repository, install Chromium, enable the experimental features, and browsing to http://localhost:8080/ up came the test page without complaints. But nothing works at all, this is a step back from my original Windows Chrome where it popped up the Bluetooth window, scanned devices, let me pick one, and connected. Now, it does nothing. In the browser console it displays some errors I have no idea what to do with (upon clicking the pair option):

babel.min.js:24 You are using the in-browser Babel transformer. Be sure to precompile your scripts for production - https://babeljs.io/docs/setup/ three.min.js:167 THREE.WebGLRenderer 90 OBJLoader.js:783 OBJLoader: 95.89208984375ms ControllerBluetoothInterface.js:35 Web Bluetooth is experimental on this platform. See https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md localhost/:1 Uncaught (in promise) DOMException Promise.then (async) pair @ ControllerBluetoothInterface.js:58 onClickDeviceActionButton @ ControllerDisplay.js:303

Any clue? --Scott

On Fri, Aug 30, 2019 at 5:09 AM parkerlreed [email protected] wrote:

@sbierly https://github.com/sbierly Got it working locally with the nodejs http-server #3 (comment) https://github.com/jsyang/gearvr-controller-webbluetooth/issues/3#issuecomment-460777741

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jsyang/gearvr-controller-webbluetooth/issues/2?email_source=notifications&email_token=ACSSVRDQGV7EALBD2AM7JRTQHCTRTA5CNFSM4FBNGI22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5QRUUQ#issuecomment-526457426, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSSVRGZX7U7AI4DYXQ7ECLQHCTRTANCNFSM4FBNGI2Q .

sbierly avatar Aug 30 '19 19:08 sbierly

Actually, on that Linux boot this doesn't work either: https://googlechrome.github.io/samples/web-bluetooth/discover-services-and-characteristics.html

The Bluetooth UI tool turns on/off, and sees devices, and connects to them. I've tried the browser stuff in basically all such combinations, same errors always:

Discover services & characteristicsLive Output

Requesting any Bluetooth Device... Argh! NotFoundError: Bluetooth adapter not available.

--Scott

On Fri, Aug 30, 2019 at 7:10 PM Scott Bierly [email protected] wrote:

Many thanks @parkerlreed, I'm not a software guy so kind of floundering here. I managed to boot up Ubuntu 18.04.1 LTS, get the nodejs http-server setup, clone the repository, install Chromium, enable the experimental features, and browsing to http://localhost:8080/ up came the test page without complaints. But nothing works at all, this is a step back from my original Windows Chrome where it popped up the Bluetooth window, scanned devices, let me pick one, and connected. Now, it does nothing. In the browser console it displays some errors I have no idea what to do with (upon clicking the pair option):

babel.min.js:24 You are using the in-browser Babel transformer. Be sure to precompile your scripts for production - https://babeljs.io/docs/setup/ three.min.js:167 THREE.WebGLRenderer 90 OBJLoader.js:783 OBJLoader: 95.89208984375ms ControllerBluetoothInterface.js:35 Web Bluetooth is experimental on this platform. See https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md localhost/:1 Uncaught (in promise) DOMException Promise.then (async) pair @ ControllerBluetoothInterface.js:58 onClickDeviceActionButton @ ControllerDisplay.js:303

Any clue? --Scott

On Fri, Aug 30, 2019 at 5:09 AM parkerlreed [email protected] wrote:

@sbierly https://github.com/sbierly Got it working locally with the nodejs http-server #3 (comment) https://github.com/jsyang/gearvr-controller-webbluetooth/issues/3#issuecomment-460777741

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jsyang/gearvr-controller-webbluetooth/issues/2?email_source=notifications&email_token=ACSSVRDQGV7EALBD2AM7JRTQHCTRTA5CNFSM4FBNGI22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5QRUUQ#issuecomment-526457426, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSSVRGZX7U7AI4DYXQ7ECLQHCTRTANCNFSM4FBNGI2Q .

sbierly avatar Aug 30 '19 19:08 sbierly

Oh you have to pass an extra argument to the bluetooth daemon itself.

sudo systemctl edit --full bluetooth.service

Add a -E after bluetoothd and save the file.

Then

sudo systemctl restart bluetooth.service

parkerlreed avatar Aug 30 '19 20:08 parkerlreed

Thanks, I just tried that but sadly no effect.

So here's a question for you, all I really want to do is enable my embedded linux software on an Arm platform read the state of this controller to control my application. I have no need for this to run in a web browser, is there any reason that this exploit requires doing it this way (which presumably is the source of my headaches), or can this easily be ported into a standalone software application? Not sure why we are tied into this whole web bluetooth thing.

Thanks! --Scott

On Fri, Aug 30, 2019 at 8:22 PM parkerlreed [email protected] wrote:

Oh you have to pass an extra argument to the bluetooth daemon itself.

sudo systemctl edit --full bluetooth.service

Add a -C after bluetoothd and save the file.

Then

sudo systemctl restart bluetooth.service

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jsyang/gearvr-controller-webbluetooth/issues/2?email_source=notifications&email_token=ACSSVREVMBNUDZAXAX3QHY3QHF6R3A5CNFSM4FBNGI22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5SV4ZI#issuecomment-526736997, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSSVRC3KFR7I4LINQYCSE3QHF6R3ANCNFSM4FBNGI2Q .

sbierly avatar Aug 30 '19 23:08 sbierly

I just spent some hours building a completely fresh persistent Ubuntu thumb drive (don't have a dedicated Linux machine) and carefully retraced all the steps per below. Same, identical failures.

Wondering how @parkerlreed got this to work, perhaps some subtle differences in versions.


sudo systemctl edit --full bluetooth.service

--> Add a -E after bluetoothd and save the file. sudo systemctl restart bluetooth.service ps -guax | grep bluetooth # to check

sudo apt update sudo apt-get upgrade sudo apt-get install npm sudo npm install http-server -g

sudo apt install git sudo git clone https://github.com/jsyang/gearvr-controller-webbluetooth.git cd gearvr-controller-webbluetooth/ http-server

sudo apt install chromium chrome://flags/#enable-experimental-web-platform-features

http://localhost:8080/

sbierly avatar Aug 31 '19 06:08 sbierly

I think I still have the controller. Let me check

parkerlreed avatar Aug 31 '19 14:08 parkerlreed

Chrome Beta 77 works. I did connect to the controller once from the system side, opened the web page, pair, selected the GearVR, then went to the start controller data updates.

image

parkerlreed avatar Aug 31 '19 14:08 parkerlreed

I do notice however that no matter how I use the controller PC side now, it disconnects after about 10 seconds. This includes even in https://github.com/rdady/gear-vr-controller-linux

parkerlreed avatar Aug 31 '19 14:08 parkerlreed

Anyone ever figure this out? Could the issue be related to the one mentioned re: Daydream controller, here: https://github.com/mrdoob/daydream-controller.js/issues/9, where a firmware update now prevents access due to some additional security protocol?

bigrig2212 avatar Oct 13 '19 19:10 bigrig2212