Connects to a generic Espruino BLE device. See EspruinoBleDevice for more info. Use puck if you're connecting to a Puck.js
If opts.name is specified, only this BLE device will be shown.
opts.name
const e = await connectBle({ name: `Puck.js a123` }); Copy
const e = await connectBle({ name: `Puck.js a123` });
opts.filters overrides and sets arbitary filters.
opts.filters
import { Espruino } from 'https://unpkg.com/ixfx/dist/io.js'const filters = [ { namePrefix: `Puck.js` }, { namePrefix: `Pixl.js` }, {services: [NordicDefaults.service] }]const e = await Espruino.connectBle({ filters }); Copy
import { Espruino } from 'https://unpkg.com/ixfx/dist/io.js'const filters = [ { namePrefix: `Puck.js` }, { namePrefix: `Pixl.js` }, {services: [NordicDefaults.service] }]const e = await Espruino.connectBle({ filters });
Returns a connected instance, or throws exception if user cancelled or could not connect.
Connects to a generic Espruino BLE device. See EspruinoBleDevice for more info. Use puck if you're connecting to a Puck.js
If
opts.name
is specified, only this BLE device will be shown.opts.filters
overrides and sets arbitary filters.