Home Projects Blog

WebBLE

About

This project allows you to use an iOS device to browse secure Web Bluetooth enabled webpages. It was built for and has been primarily tested with puck.js pucks.

If you are having difficulties, first check out the FAQs.

If you have questions, comments or features you'd like to see, please raise an issue on the github issues page or email support@greenparksoftware.co.uk.

Features added in 1.7.0:

  • Support for pybricks via the following additions:
    • BluetoothRemoteGATTCharacteristic.writeValueWithResponse(value)
    • BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse(value)
    • navigator.bluetooth.getAvailability()

Fixes in 1.7.0:

  • When the user cancels device selection the correct error
    DOMExceptionDOMException('User cancelled', 'NotFoundError')
    is now thrown.
  • Some services weren't working properly because of a bug that was not returning the hex UUID to the browser, instead the service's human readable name – now fixed.

See older...

Features added in 1.6.0:

  • URL text field now always takes the whole width
  • On tapping the URL text field it now automatically selects all so you can immediately paste / start typing
  • The console now animates into view, and extends to the bottom of the screen not just the safe area
  • The User Agent string is tweaked to convince more website browser checkers that WebBLE behaves just like Safari for most use cases

Fixes in 1.6.0:

  • Tapping at the top of the screen more reliably shows the bars
  • Bigger touch area at the bottom of the screen to show the bars when they are hidden
  • Fixed a bug where we would not create a bookmark for a page without a title
  • Couple other of minor bug fixes

Features added in 1.5.0:

  • Adds entitlement request for camera and microphone so that you can use webpages that request the camera and microphone (you still also have to give each webpage permission as per default Safari behaviour).
  • Double tap refresh button to "hard" refresh (reload everything from source, i.e. don't use cache).
  • Tweaks the userAgent string to have the version and name of the app running WBCore at the end, so for WebBLE it now looks like "Mozilla/5.0 (iPhone; CPU iPhone OS 15_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) WebBLE/1.5.0".

Deprecations in 1.5:

  • Now only works with iOS 14.3 and above: this was when Apple added web view support for media devices.

Features added in 1.4.0:

  • Support for device.gatt.getPrimaryServices()

Fixes in 1.4.0:

  • Bug where we used the underlying ArrayBuffer instead of the wrapping TypedArray, potentially causing a crash on the bluetooth device (e.g. Nordic based devices like the Puck.js).

Features added in 1.3.1:

  • Geolocation support!

Features added in 1.3.0:

  • Dark mode!

Deprecations in 1.3:

  • Now only works with iOS 13.2 and above.

Fixes in 1.3.0:

  • Minor API omissions in issues 27, 22, and 16 fixed.

Fixes in 1.2.3:

  • Do not crash on startup on iOS 13 devices
  • Large internal refactor to allow people to reuse the webble core in other projects

Fixes in 1.2.2:

  • now calls handleEvent if the callback object has that function
  • accepts DataView like objects as well as ArrayBuffer objects in characteristic.writeValue()
  • bluetooth events now have srcElement configured
  • console.dir() doesn't crash
  • stopNotifications() now actually works
  • startNotifications() and stopNotifications() returns a Promise[Characteristic] like they're supposed to
  • Fixes this characteristic notification issue

And probably some other things beside...

New features in 1.2.1

  • Full screen support
  • Loading status bar
  • Hiding of the home bar indicator in full screen
  • Better handling of navigation errors

New features in 1.2.0

  • Showable / hideable console, with copy-and-pastable logs.

New features in 1.1.6

  • Fix name and namePrefix filters when requesting devices.
  • Support BLE characteristics both when they support sending responses to write requests and when they don't.

New features in 1.1.5

  • Support for links of the form webble://www.greenparksoftware.co.uk/projects/webble/1.1.5/puckdemo which can be clicked on in a web browser on iOS to open the link in WebBLE
  • Fix an issue receiving notifications from characteristics.
  • Fix bugs relating to abbreviated service and characteristics.
  • Various other small bug fixes, particularly relating to navigation.

New features in 1.1.4

  • Fixed a bug where requesting a device with specified services but not a name or a namePrefix was not working.
  • Couple of other small fixes.

New features in 1.1.3

  • The URLs in the bookmarks page are now shorter to make them more readable.
  • I've fixed a bug which prevented a characteristic from being used on more than one connected device.

New features in 1.1.2

  • The ID of devices is now displayed after their name in the picker view, to help differentiate between them.
  • The acceptAllDevices Boolean flag is now properly handled (and all devices are shown).
  • The "name" filter is now supported (as well as "namePrefix").

New features in 1.1.1

  • The last page you navigated to is remembered so if the app is closed and re-opened it will return there rather than coming to this page.
  • A couple of handy bookmarks have been added (you can delete them if you don't need them of course).
  • Various bug-fixes.

New features in 1.1.0

  • You can now add bookmarks for the pages you visit, and rearrange and delete them from the bookmarks menu.
LinkInformation
Privacy Info

Your privacy while using WebBLE

FAQs

Frequently asked support questions

App Store

WebBLE is available from the App Store

Puck.js Demo Page

New Puck owners start here.

If you have a Puck.js, you can use this demonstration page from within the Web Bluetooth app, or a mainstream browser that supports Web Bluetooth, such as Chrome, to try it out.

Puck.js Home

Find out more about puck.js.

Pybricks IDE

The pybricks IDE where you can programme your smart Lego in Python over bluetooth from the browser.

Supported by WebBLE since 1.7.0.

WebBLE thread in Espruino forums

Has some useful tips and will probably get comments for any bugs people find and workarounds for them.

Puck Device Tests

This page runs some tests of the web bluetooth API implementation in your browser (you will need a couple of pucks handy). WebBLE should pass them all!

Github repo

A large proportion of the code for WebBLE is open-source and available on github.

Full Web Bluetooth spec

Only a subset of this is implemented at this time in WebBLE.

Copyright 2018 David Park