digital-dream-labs / vector-web-setup

Tool to perform initial configuration of Vector robots.
MIT License
64 stars 57 forks source link

Bluetooth pairing not possible #11

Open xanathon opened 4 years ago

xanathon commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

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

kercre123 commented 3 years ago

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

It still works for me on the latest Canary build.

grant-olson commented 3 years ago

I saw the thread on Facebook. I think the issue is that you're running http not https which is required for a 'real' non-localhost domain. Can you confirm?

On 9/4/20 8:38 AM, Lee Alexis wrote:

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

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/digital-dream-labs/vector-web-setup/issues/11#issuecomment-687116865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB6OIE5PG3BTYJEGTUNUD3SEDNSZANCNFSM4PRWERMQ.

john20xdoe commented 3 years ago

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

Hikocapic commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

xanathon commented 3 years ago

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 commented 3 years ago

node: v10.19.0 npm: 6.14.4

kercre123 commented 3 years ago

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 commented 3 years ago

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.

nilseuropa commented 3 years ago

https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md

Imbatmanyo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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. ;)