Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bluetooth Extension #127

Closed
timwindsor opened this Issue · 13 comments

3 participants

@timwindsor
Owner

An Extension is needed for WebWorks that would allow search and discovery of Bluetooth devices, connecting, and communication over Bluetooth.

Current proposal:

discover - Returns the list of all discovered devices.
The WebWorks sends nothing.
The Native side will returns a list of Bluetooth devices in JSON

bluetoothActive - Indicate whether or not a device is active
The WebWorks sends the device identification.
The Native side returns a true/false flag.

discoverableActive - Indicate whether or not a device is currently discoverable by other Bluetooth devices
The WebWorks sends the device identification.
The Native side returns a true/false flag.

toggleBluetoothActive - Toggle the active state of a device
The WebWorks sends the device identification.
The Native side toggles the device active state.

toggleDiscoverableActive - Toggle the discoverability of a device
The WebWorks side sends the device identification.
The Native side toggles the device discoverability.

DeviceInfo - Returns the Bluetooth related information about a device
The WebWorks sends the device identification.
The Native side returns an aggregate of Bluetooth information pertaining to the device.

startSPPServer - Starts a local SPP service (server mode)
The WebWorks sends the device identification. This has to be a local Bluetooth device.
The Native side returns Pass/Fail.

connectToSPPService - Establishes a connection to a remote SPP service (client mode)
The WebWorks sends the device indentification.
The Native side returns a Connection ID and Pass/Fail.

sendSPPMessage - Sends a message to the remote peer on a SSP connection.
The WebWorks sends the string containing the message.
The Native side returns Pass/Fail.

ReceiveSPPMessage - Receive a message from the remote peer on a SSP connection.
The WebWorks sends the device to receive from, and the buffer string where to put the received message.
The Native side fills the buffer string if data was received and returns the size of the received data along with Pass/Fail status.

closeSPPConnection - Closes the SPP session (in client and server mode)
The WebWorks sends the connection (Connection ID).
The Native side returns Pass/Fail.

@peardox

Hehe - I just did something similar as you know for uPnP

This may prove a useful addition to the GamePad discussion we're having ATM

@rtholmes

Tim, do you know if anyone ever tried to do this? The webworks versions of either of these would be awesome!

https://github.com/blackberry/Cascades-Community-Samples/tree/master/CscMonitor https://github.com/blackberry/Cascades-Community-Samples/tree/master/HeartMonitor

@timwindsor
Owner

This is being worked on right now, by @jcmurray who did those Cascades Bluetooth samples. He's making great progress on it and I expect it will be out "soonish". We haven't had many demands for something like this so we backburner'd it until now.

@peardox
@timwindsor
Owner

Yeah, due to all the work we've done so far, the code is largely just dropped in place. It's really just about wiring the parts together and deciding what we want the API to look like, and what Bt profiles to support. I sent John the template and I think he had a working prototype the very next day. It's John so I wasn't really surprised, but I'd still be reading API docs at this point.

@peardox
@peardox
@peardox
@peardox
@peardox
@peardox
@peardox
@timwindsor
Owner

Fixed in #333

@timwindsor timwindsor closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.