Skip to content

Commit

Permalink
Merge pull request #490 from danditomaso/issue-489-bluetooth-uuid-not…
Browse files Browse the repository at this point in the history
…-set

fix: restored correct BLE service uuid to BLE devices filter
  • Loading branch information
danditomaso authored Mar 9, 2025
2 parents b670ffe + 09bb0bc commit d39c5ed
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/PageComponents/Connect/BLE.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useAppStore } from "@core/stores/appStore.ts";
import { useDeviceStore } from "@core/stores/deviceStore.ts";
import { subscribeAll } from "@core/subscriptions.ts";
import { randId } from "@core/utils/randId.ts";
import { BleConnection, Constants } from "@meshtastic/js";
import { BleConnection, ServiceUuid } from "@meshtastic/js";
import { useCallback, useEffect, useState } from "react";

export const BLE = ({ closeDialog }: TabElementProps) => {
Expand Down Expand Up @@ -58,7 +58,7 @@ export const BLE = ({ closeDialog }: TabElementProps) => {
onClick={async () => {
await navigator.bluetooth
.requestDevice({
filters: [{ services: [Constants.ServiceUuid] }],
filters: [{ services: [ServiceUuid] }],
})
.then((device) => {
const exists = bleDevices.findIndex((d) => d.id === device.id);
Expand Down
19 changes: 18 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
{ "github": { "silent": true } }
{
"github": { "silent": true },
"headers": [
{
"source": "/",
"headers": [
{
"key": "Cross-Origin-Embedder-Policy",
"value": "require-corp"
},
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
}
]
}
]
}
6 changes: 5 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export default defineConfig({
},
},
server: {
port: 3000
port: 3000,
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
}
},
optimizeDeps: {
exclude: ['react-scan']
Expand Down

0 comments on commit d39c5ed

Please sign in to comment.