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 connection not working on Windows #85

Open
octavmarius opened this issue Apr 29, 2019 · 12 comments
Open

Bluetooth connection not working on Windows #85

octavmarius opened this issue Apr 29, 2019 · 12 comments
Labels

Comments

@octavmarius
Copy link

Describe the bug
I cannot connect from vs code to ev3 brick - device is not listed.

To Reproduce
Steps to reproduce the behavior:

  1. start vs code
  2. boot up ev3 brick from sd card
  3. enable bluetooth (check "Powered")
  4. pear the brick with the computer
  5. in vs code - ev3dev device browser - click on "Click here to connect to a device"

Expected behavior
expected to have my ev3 brick listed

Desktop (please complete the following information):

  • Windows 7 Proffesional 7601 SP1

Additional context
i can pear the device (ev3 brick) with my computer.
i also removed (uninstalled) the ev3 brick from my computer and paired the device again with success.

image

@haiyongsong1921
Copy link

@dlech Hi David, I have the same bluetooth connection issue in Mac OS. Does the ev3-browser extensions of the VSCode support for bluetooth connection. Because when I try to connect my ev3dev brick via bluetooth in VSCode, it will always throw out the handshake timeout error: "Failed to connect to ev3: Timed out while waiting for handshake." But the connection works fine via usb cable. Would you mind to share some info for this? thanks a lot

@netanelbardavid
Copy link

@dlech Hi David, having the same issue with windows 10. Pairing works fine but the EV3 does not appear on the device list. Tried to connect it also by its IP address but VS Code shows the "Failed to connect to ev3: Timed out while waiting for handshake" error.
Thanks man

@dlech dlech added the support label Feb 13, 2020
@jaffarspace
Copy link

@dlech Hi David, having the same issue with windows 10. Pairing works fine but the EV3 does not appear on the device list. Tried to connect it also by its IP address but VS Code shows the "Failed to connect to ev3: Timed out while waiting for handshake" error.
Thanks man

Same here. Windows 10, Paired without any issue. but the device is not listing when I try to do ">ev3dev:Connect to a device" in Command Pallet. Any updates on this issue?

@dlech
Copy link
Member

dlech commented Feb 17, 2020

macOS and Windows 10 are not the same as the original issue (Windows 7), so please open a new issue with the exact steps to reproduce the problem and we will see if we can figure it out. Windows 10 and macOS are both working for me, so I need to know all of the details to see what is different.

@jyouturner
Copy link

FYI, I had the same problem on my Mac, but after I restarting Visual Code, I was able to connect to ev3dev from the extension/device list.

@jaffarspace
Copy link

macOS and Windows 10 are not the same as the original issue (Windows 7), so please open a new issue with the exact steps to reproduce the problem and we will see if we can figure it out. Windows 10 and macOS are both working for me, so I need to know all of the details to see what is different.

Thanks! reported as new issue as you suggested >> #97

@dlech
Copy link
Member

dlech commented Mar 8, 2020

Because when I try to connect my ev3dev brick via bluetooth in VSCode, it will always throw out the handshake timeout error: "Failed to connect to ev3: Timed out while waiting for handshake." But the connection works fine via usb cable.

In v1.1.0, the timeout is increased from 20 to 30 seconds. It is also now configurable via a setting if that is not long enough.

@vincentmohiuddin
Copy link

Hi, I was having the same issue. Pairing worked but the device would not show up in VSCode. It showed up in VSCode after I went to Wireless and Networks > All Network Connections > {PC-Name} > Connect on the brick.

@crucialfelix
Copy link

crucialfelix commented May 19, 2023

I am able to pair from Mac (Ventura) to ev3dev, and ev3dev shows that it's connected to my mac.

But still VSCode EV3DEV DEVICE BROWSER shows it can't connect.

Oh wait ... I tried to reconnect (for like the 20th time today) and mysteriously it found a newly labelled ev3dev and it works!

Oh I wish I could tell you why it works now and didn't before. Bluetooth is a mess

solved: it was because I also had the USB connected. That always works.

@petusky
Copy link

petusky commented Feb 2, 2025

I have a similar experience as @crucialfelix. I'm on Sequoia 15.3.

I am able to pair my EV3 with my mac; HOWEVER, I can only connect FROM the mac TO the EV3, not the other way around. Here's evidence of such a bluetooth connection.

(Aside: I called from Terminal, when i was not connected via USB, not from an SSH session. I only mention this because bluetooth "seems" to work this way when you have a simultaneous wired connection---as @curcialfelix notes, "solved: it was because I also had the USB connected. That always works."---but it's actually the wired connection that provides the IP address that lets you connect using the ev3dev extensions in Visual Studio Code).

APETUS-FMBP23-9:~ apetusky$ system_profiler SPBluetoothDataType
Bluetooth:

      Bluetooth Controller:
          Address: A4:CF:99:69:36:61
          State: On
          Chipset: BCM_4378B3
          Discoverable: Off
          Firmware Version: 22.1.143.281
          Product ID: 0x4A0F
          Supported services: 0x392039 < HFP AVRCP A2DP HID Braille LEA AACP GATT SerialPort >
          Transport: PCIe
          Vendor ID: 0x004C (Apple)
      Connected:
          ev3dev:
              Address: 00:17:EC:F5:AC:51
              Vendor ID: 0x0694
              Product ID: 0x0005
              Firmware Version: 3.1.6
              Minor Type: Computer
              RSSI: -32
              Services: 0x800018 < AVRCP A2DP ACL >

If I try to initiate the connection FROM the EV3, I get an error on the EV3 like "GDBus.Error:org:bluez.Error.Failed: Protocol not available".

The problem is that even though the devices are connected, the EV3 doesn't recognize this connection (which was established by initiating it on the Mac rather than the EV3) outside of the bluetooth window. That is, EV3 knows it is connected:

Image

But in the Wireless and Networks screen it does not recognize the connection:

Image

As a result, no IP address shows up for the connection, as described in the last item in the insructions, https://www.ev3dev.org/docs/tutorials/connecting-to-the-internet-via-bluetooth/,

Image

However, you need this IP address to set up a connection with bluetooth in VSCode.

So, what to do? Does anyone know how to resolve the "GDBus.Error:org:bluez.Error.Failed: Protocol not available" error, which seems to be the source of the problem? I've updated just about everything I could update on my brick, but that error persists.

(BTW, when using the EV3 with EV3Classroom, I am still able to connect via bluetooth. So I don't think it's an issue with the brick itself.)

@dlech dlech changed the title Bluetooth connection not working Bluetooth connection not working on Windows Feb 2, 2025
@dlech
Copy link
Member

dlech commented Feb 2, 2025

This issue is about Windows, not Mac. There has been some more recent discussion about Mac at #121

@petusky
Copy link

petusky commented Feb 3, 2025 via email

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

No branches or pull requests

9 participants