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

Minor patch to the permissions since bluetooth api is still #2138

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

shusain
Copy link
Contributor

@shusain shusain commented Jul 6, 2024

considered experimental on Chrome/Linux implementation.

considered experimental on Chrome/Linux implementation.
js/main.js Outdated
if (process.platform === "linux"){
app.commandLine.appendSwitch("enable-experimental-web-platform-features", true);
} else {
app.commandLine.appendSwitch("enable-web-bluetooth", true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does seting enable-web-bluetooth to true cause issues on linux?

Can we just add the enable-experimental-web-platform-features, if linux instead?

@stronnag
Copy link
Collaborator

Tested on Arch Linux x64 and SB Nano3 BLE device.
Works as expected.

@stronnag
Copy link
Collaborator

Also tested with a CC2541 BLE device. This is recognised, but the configurator refuses to communicate with it.

2024-08-21 @ 18:49:59 -- Connected to: BleTest00
2024-08-21 @ 18:50:01 -- BLE device type: CC2541 based
2024-08-21 @ 18:50:01 -- MSP connection successfully opened with ID: 255
2024-08-21 @ 18:50:11 -- No configuration received within 10 seconds, communication failed
2024-08-21 @ 18:50:11 -- MSP connection successfully closed

However the device works in mwp.

18:53:27.832463 BLE chipset CC2541, mtu 23 (unlikely to end well)
18:53:27.832854 Connected 34:14:B5:B9:50:4E BleTest00 (nopoll false)
18:53:27.833057 Serial 34:14:B5:B9:50:4E BleTest00 (7e) ready false
18:53:28.218653 MSP Error: MSP_CMDS_IDENT[100,0b] 
18:53:28.608726 Using MSP v2 0205
18:53:29.226866 Model name: "BENCHYMCTESTY"
18:53:29.778390 V2 mixer 8 1

Wouldn't be too concerned about this, as CC2541 devices are pretty crap (MTU of 23 bytes indeed).

@stronnag
Copy link
Collaborator

For completeness, tested on aarch64 as well:

  • Usually fails to detect any BLE devices
  • When it does, the configurator fails to connect to the FC
  • Works without problem in mwp (so this is an Electron/INAV issue not OS/architecture).

always enable web bluetooth.
@mmosca mmosca merged commit 8ea40f1 into iNavFlight:master Aug 21, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants