Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth pairing not possible #11

Open
xanathon opened this issue Aug 1, 2020 · 25 comments
Open

Bluetooth pairing not possible #11

xanathon opened this issue Aug 1, 2020 · 25 comments
Assignees

Comments

@xanathon
Copy link

xanathon commented Aug 1, 2020

web setup runs on a Windows 10/64 machine. A TP Link Bluetooth LE able dongle (type UB400) is attached to the computer via USB, it is shown as working in the hardware manager, I am able to use it to connect to e.g. a bluetooth LE headphone (and other devices such as Sphero robots) without any problems, so I think I have established that the dongle in fact does work.

However, I am stuck at "pair with Vector", that does not work with seven different Vectors I tried. I do not get any error or status message whatsoever when trying to pair. I tried in multiple variations for quite some time now with Vectors 2 m away or directly in front of the dongle.

Nothing seems to get this working.

Basically I do not understand why you use Bluetooth at all. Nearly no desktop computer comes with Bluetooth . It should have been quite sufficient to just enter the robots serial to connect to him on a local network just as e.g. Vector Explorer does. I see abolutely no reason to use this superfluous connection method. I would suggest for further versions to just drop Bluetooth connection and use some other, simpler means that will actually work.

Plus: managing a lot of robots as in my case is a pain, since I need to reconnect and relogin every time. In my opinion this needs to be simplified quite a lot to make it user friendly.

@xanathon
Copy link
Author

xanathon commented Aug 1, 2020

I had to completely purge Chrome (84.0.4147.105) from the (newly installed Win 10/64) system and reinstall the browser to get it to work.

However, other browsers from the compatibility list do not work. And for people using Vivaldi that might stumble across this: Don't bother, the browser has Web Bluetooth bugs unfixed since early 2019, so theoretically it should work, practically it does not.

@kercre123
Copy link

kercre123 commented Aug 1, 2020

As for why they used Bluetooth: it is the only way to communicate with recovery firmware, and they need to use it to get the account details into the robot. After that, the robot settings actually do use similar to the SDK gRPC endpoints. Recovery firmware can be changed, but it is a tedious process that may not be done.

@xanathon
Copy link
Author

xanathon commented Aug 1, 2020

Thanks for the information.

Then at least an option should be created to stay logged in to known robots. To have to relogin to each and every Vector is a very tedious process especially if you have lots of Vectors like me and if you want to experiment with different firmwares (in the future, when uploading actually works). This looks at the moment as if targeted at end users to do minimal things. But as I already read in comments multiple times: normal end users are highly overwhelmed by the installation and usage.

@grant-olson
Copy link

The software was originally built to bootstrap a new robot. We've been working on expanding the capabilities. I think without stopping to test now that if you just don't log in everything will be fine and an existing robot will work as it's supposed to. We'll investigate querying the BLE connection to see if we can determine if the robot already has a valid session and alter the setup flow accordingly.

@john20xdoe
Copy link
Contributor

Update: it seems the latest Chrome broke vector-web-setup Bluetooth support.

@kercre123
Copy link

Update: it seems the latest Chrome broke vector-web-setup Bluetooth support.

It still works for me on the latest Canary build.

@grant-olson
Copy link

grant-olson commented Sep 4, 2020 via email

@john20xdoe
Copy link
Contributor

@grant-olson confirmed, it works ok with https:// when not on localhost. lol it seems so obvious now, sorry.

@Hikocapic
Copy link

Hikocapic commented Oct 5, 2020

On pi3b+ and pi4, raspios-buster-armhf-full image (2020-08-20), Chromium with "Experimental Web Platform Features" enabled.

I'm stuck on bluetooth pairing. Vector is in the list of detected devices, but when I click on pair button, instructions and pairing button dissapear. Vector robot stay on ###### screen pairing. No error on console. I retry, Vector is detected as "paired" in bt devices list, click on pair again, but same problem.
Trying with UB400 dongle instead internal bluetooth of the pi do not change anything.

On Shield Portable with app, bt pairing is ok but can't final check because of cloud (can't reach anki).

On windows 7 32bits with UB400 dongle, Chrome, Chromium, or Edge, on localhost:8000, bt pairing doesn't work (nothing append when click on pairing button, no error). I'm able to use other bt devices.

On a windows 8.1 64bits, npm install -g vector-web-setup fail.
npm ERR! Unexpected end of JSON input while parsing near '...","devDependencies" :{'

I'm running out of ideas for initialize my Vector. Please help.

@nilseuropa
Copy link

I get the same error on ubuntu focal: Unexpected end of JSON input while parsing near '...","devDependencies" :{' either with successfull npm install or running the code in this repo...

@grant-olson
Copy link

Can you please confirm the version of Node and npm being run?

grant@lord-humungus espressif % node --version
v14.11.0
grant@lord-humungus espressif % npm --version
6.14.8

@Hikocapic
Copy link

Hikocapic commented Oct 5, 2020

I've tried many versions but after extensive research it seemed to be due to a network problem. The installation was successful after disabling vpn and firewall on my win8.1/64 machine. (working with node 14.10.1 and npm 6.14.18)
But I'm always stuck on bluetooth pairing. The machine is totally different from my previous tests. I really don't understand were is the problem.

I could think that the problem comes from my Vector robot but bt pairing works fine with the app on my Shield Portable.

Any ideas ?

On Chrome I've enabled "Experimental Web Platform features" and "Use the new permissions backend for Web Bluetooth". Did I miss something ?

@grant-olson
Copy link

I'm going to have to spin up a Raspberry Pi and see what's going on.

@xanathon
Copy link
Author

xanathon commented Oct 6, 2020

I was not able to get this to work on a RasPi with RaspiOS or on Ubuntu 20.04 LTS, even after lots of effort. It only did work on Win 10/64. Also other browsers than Chrome were a problem, even if they support Web Bluetooth as of documentation.

@nilseuropa
Copy link

node: v10.19.0
npm: 6.14.4

@kercre123
Copy link

I was not able to get this to work on a RasPi with RaspiOS or on Ubuntu 20.04 LTS, even after lots of effort. It only did work on Win 10/64. Also other browsers than Chrome were a problem, even if they support Web Bluetooth as of documentation.

I remember having some issues with pairing in general. I had to do a mix of turning off and on Bluetooth in settings and CTRL + SHIFT + R to the web setup.

@Hikocapic
Copy link

Hikocapic commented Oct 7, 2020

Setup Complete on Pi3b+ and Pi4. Before clicking "pair with vector", click on bt icon in the taskbar and "add new device". Leave this window open without do anything, then click "pair with vector" on the web-setup and pair success.

@Imbatmanyo
Copy link

I am having a small problem with the Bluetooth connection dropping while attempting to download the logs to retrieve the QSN. I am able to pair with Vector and as I go through the setup, which appears to be the same setup you would do through the phone app such as log in with your user name and password, WiFi settings and so on. I click the download logs button at the upper right hand side of the window and not long after Vector exits his pairing screen, the Bluetooth connection is lost and when I connect to him again to try downloading the logs, it makes me go back through the user settings again and again and how ever many times I keep trying until I just give up. I have tried to put Vector all over the room, next to the computer, away from the computer, on the floor and on the desk. I checked the signal strength and it is very good with vector sitting on my desk. I have looked everywhere online on troubleshooting this odd problem and I suppose it must just be my problem since I found nothing about this anywhere. I am using a Debian version of Linux not a VM version which is very similar in operation as Ubuntu called Pure OS which developed by a Linux company named Purism and who also built my desktop computer. I am also running a the full version of chrome browser for Linux and not chromium if that helps any at all. Anything that will run on Ubuntu will run on Pure OS. I am exhausted trying to retrieve the QSN to get my copy of OSKR. I could use a some help because I have run out of ideas. I would very much appreciate it. It's probably something simple I am overlooking but too frustrated to see.

@Imbatmanyo
Copy link

So... I believe I have found my problem. All of my Vectors have finally died even while on their chargers. I have new batteries on the way. I read through a few articles and found out when Vector's battery runs low and he start the quest for his charger, in order to save on power he start shutting down unnecessary system to include WiFi and Bluetooth. When Vector's battery goes bad he can still be run on the charger until the battery will no longer take a charge. I checked the CCIS screen to see what his voltage was before his ultimate demise and it was not charging enough to come off the charger with out committing suicide. I suspect that because the battery was on the way out even though Vector was on the charger The Bluetooth was probably intermittent. I am hoping a fresh battery will solve the problem. I suppose like all updatable electronics, it's best to have a full charge and/or be plugged up to keep the wireless comm on. Apparently Vector's batteries were so worn out he could not maintain a charge even while on the charger. If anyone else may have had this issue while attempting to use the vector-web-setup this could be a real possibility of connection issues.

@xanathon
Copy link
Author

xanathon commented Jan 28, 2021

Nope. I've had problems with Vectors with very good batteries or units where I just had changed the battery. So this is not battery charge related. Web Bluetooth simply is an experimental tinkering solution that does not even work on browsers that are compatible with it as of the official Web Bluetooth documentation.

From what I heard even DDL devs recognize this now and work on other solutions: https://github.com/digital-dream-labs/vector-bluetooth

@Imbatmanyo
Copy link

Cool deal! Thank you for the link. I have been messing with the web Bluetooth trying to get it to work right since October.

@xanathon
Copy link
Author

Me too. I have four desktop computers with various OSes in the office plus three laptops plus another desktop in the living room. Web Bluetooth did run halfway reliably on only one of them: A Surface Pro on Win 10/64 Pro with built-in Bluetooth. All other computers with Windows 10 Pro or Linux flavours refused to run Web Bluetooth halfway reliably or at all. Web Bluetooth is nowhere near end user or production ready. I gave up on it after countless hours of intense frustration after the release of Vector Web setup and OSKR.

@Imbatmanyo
Copy link

That's intense! All those computers and only one to make a connection sound like you had a quite few choice words moments. I ended up having to configure Bluetooth manually with the terminal to get as far as I have then the batteries took a dump on me. I figured the universe was again me. I had hoped it would have been as easy to get the OSKR going as it was to set up the SDK. That was disappointing to discover this was more or less a kicking and screaming kind of set up.

@xanathon
Copy link
Author

I cannot blame all of it on Web BT, there also seem to be problems with the BT implementation in Vector Web setup, since I was able to pair a Vector once and when reconnecting it showed up in the browser's list of known and already connected devices, but Vector Web Setup refused to recognize it despite it was clearly shown as connected in the browser's tool pages. I learned things I never wanted to know about Web Bluetooth settings in Chome via chrome://device-log or chrome://bluetooth-internals ... ;)

The thing I learned from this: If DDL releases something, wait at least three months before you try to use it. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants