Skip to content
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

Added pair/unpair #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added pair/unpair #114

wants to merge 1 commit into from

Conversation

stakutis
Copy link

Added support to Pair/Unpair and can specify a PIN

Added support to Pair/Unpair and can specify a PIN
@don
Copy link
Owner

don commented Mar 18, 2015

Thanks for the pull request.

You're using reflection for unpair since it's not a public method? Please ensure that this fails cleanly if unpair doesn't exist.

Can you make a few changes?

  • Add brackets around all if statements, even those that are one line
  • Add some documentation for pair and unpair in README.md
  • I'd prefer if PIN wasn't a member variable

@evanliomain
Copy link

@stakutis, it would be also nice to had a documentation of the Pair/Unpair method into the README.md, with a little example.

@stakutis
Copy link
Author

Ok, I'll try to clean this up this weekend.

Chris Stakutis
978 764 3488
Twitter: @stakutis

On Fri, Apr 17, 2015 at 6:42 PM, Evan Liomain [email protected]
wrote:

@stakutis https://github.com/stakutis, it would be also nice to had a
documentation of the Pair/Unpair method into the README.md, with a little
example.


Reply to this email directly or view it on GitHub
#114 (comment).

@stakutis
Copy link
Author

Actually, I have not, but should. I think Don wanted me to clean a few
things up. Got distracted. Been working on consumer-robots lately
(bluetooth controlled) and I'll need it to work with Android next
(currently chrome app). Open Source project on github I created... if
interested, look for "meaowmeaow" I'm trying to get more people to help
with the vision of web-page controlled robots. More details here:
http://www.meaowmeaow.com

Chris Stakutis
978 764 3488
Twitter: @stakutis

On Fri, Jul 31, 2015 at 6:57 AM, jimutt [email protected] wrote:

@stakutis https://github.com/stakutis Have you done any more on this? I
would love your pair and unpair functions to be included in the master
branch as I find it extremely useful being able to use PIN code protected
devices for security and convenience reasons.


Reply to this email directly or view it on GitHub
#114 (comment).

@jimutt
Copy link

jimutt commented Jul 31, 2015

@stakutis Oops, I somehow managed to remove my post. But at least you saw it before it was deleted.

Ah, okay. Well you should of course spend your time on what you think is best. I'm definitely going to check out your meaowmeaow-project! Personally I'm currently working on an autonomous navigation system for a USV. I had initially planned creating the control panel as a native Android app but I think I'll actually go with Cordova instead due to my laziness (haven't worked much with android earlier) and now I think I've manage to get the bluetooth communication to work as well. I'll be writing about the project on my blog (http://jimmyutterstrom.com).

@imaginae
Copy link

imaginae commented Jul 1, 2019

Hi guys, this problem about pin seems to be important for BLE devices integration, as it is the enabled security in most of the boards as per avoiding direct connections. Have you worked this point out with setPin? Can you merge this branch inside current ble-central project? There is not any other supported plugin with this functionality, just to know if can have it added properly to ble-central or need to write an override of this plugins in our end. Thanks!

@amitgandole
Copy link

Hi, Is this request merged?

@imaginae
Copy link

imaginae commented Sep 26, 2019 via email

activity.registerReceiver(pairingReceiver, new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));

Log.d(TAG,"About to createBond()");
if(device.createBond() != true) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If device is not bonded, Dont we need to creatBond here? with device.createBond()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass and stow

@benallard benallard mentioned this pull request Nov 7, 2019
@benallard
Copy link

In #406, I took the pair part of this merge-request.

@amitgandole
Copy link

amitgandole commented Nov 7, 2019

@benallard So is that working for you? Are you able to pair on Ionic app with programmatically entering PIN? What was the problem in @stakutis code?

@benallard
Copy link

@amitgandole No, sadly, somehow the intent we're waiting on (ACTION_PAIRING_REQUEST) doesn't get triggered. @stakutis, did it ever worked ?

@smokinsmolko12
Copy link

Added support to Pair/Unpair and can specify a PIN

pass and stow

@Th3bull1990
Copy link

``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants