-
Notifications
You must be signed in to change notification settings - Fork 48
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
Discovery and Pairing #31
Comments
Hey, What version of Cordova are you using? Back when I was (relatively) active in developing the plugin I think the Cordova version was something like 3.0, so I can't really say everything works fine if you're using the latest versions. Take a look at what the application is logging when you try to discover devices, the I think you might want to take a look at some of the more recently updated plugins, that also support the low energy stuff. |
Hello Taneli, I'm using the latest version of Cordova 4.0. I'm not currently using Eclipse as my dev environment I'll probably have to set that up. I tried looking at a couple of the newer plugins but yours is the only one that I have working in any form so far. I'm assuming my test devices may lack proper support for BLE just guessing here. I'm using a Nexus 7 2013 and a Sony Xperia M (first generation). I'm trying to pair them with a Bluetooth 3.0 headset. Thanks for your response. |
Hi, I have no testing experience with Cordova 4., so I can't really guarantee this plugin works properly with that. I've not tested this plugin with any BLE devices so I can't really comment on that. Hope you get your app working! |
Thanks Taneli, I understand. Not sure what my next move is yet. Thinking I may just have Regards, On 16 June 2015 at 06:39, Taneli Hartikainen [email protected]
|
Hi Taneli, I continued to play around with your plugin I have found that the discovery works. It just doesn't display the list of devices found after discovery is run. I'm not familiar with backbone.js or underscore.js so it's not clear to me how to make this happen. Do you think you can assist me here. Regards, |
Hey, Glad to hear you got the discovery working. Do you have a way to see the output of the With backbone.js the "flow" of the device data from the actual plugin code to the front end you're seeing (or currently not seeing), is relatively simple. Discovered devices are wrapped in a Check out this code to see the device discovery process which takes the device data received from the plugin and adds it to the backbone collection. It might also be useful to check that the There is also the scary fact that the packages mentioned in the |
Hello, I'm using alerts instead of the console.log I can see from my alerts that my device is discovered I had to modify your code a little but it returns the device address and name. I am reading through your code and I'm beginning to slowly decipher it :) I have the latest versions of the packages from the bower.json file but his is because I downloaded and added them myself. I revert to the versions in the bower.json and let you know if anything changes. Thanks again |
Hey, I have the code working now the way I want it. I am pairing my android phone with a headset. Everything works as expected and the phone is paired. My concern now is the headset it's actually playing any audio. When I pair the devices through the phone's Bluetooth settings the audio is played through the headset. Any ideas why I might be having this issue Thanks |
Hi, I'm not sure if it's possible to transmit audio using the basic Take a look at the documentation for If you need to modify the plugin code to support audio devices, I suggest creating a fork of this repository and then adding your modified fork as a dependency to your project. |
Hi, forgive me for my english, i'm brazilian. onDeviceDiscovered = function(device) { Thanks, and sorry about my english again. |
Hey, The alert coerces the device object into a string, hence the alert('found device ' + JSON.stringify(device) + ''); |
My problem, besides this, was with versions of packages. Now, it's ok, but when i click on the button connect, next to device, it always enters onFail, when this function is called: window.bluetooth.connect(onConnection, onFail, { I know it's hard to know what it is, having a superficial view of the problem, but can you help me? |
Can you print out the error that you're receiving? That would be a start. 🕵 |
What is the device you're trying to connect to? Are you sure there is a bluetooth server accepting connections in it? |
I managed to solve the problem: on some devices i had to catch device.uuids[1], because the uuids[0] was giving error(I don't know the reason). Now, i need change message between two android devices, and the function write is working. I saw the parameter onDataRead in startConnectionManager, but I don't know how to read the message received. |
Hi,
I need to be able to create an app that will discover a Bluetooth device and pair it with a mobile device (smartphone/tablet). I came across this Cordova plugin as I am using Cordova to build the application. I have installed the plugin and build the apk from the example included. The enable and disable buttons work as expected but the discovery button doesn't display any results even though I have other Bluetooth devices on and ready for discovery.
The second part of my question is after device discovery how would I pair?
Thanks and Regards
The text was updated successfully, but these errors were encountered: