手机连接win8.1蓝牙耳机配对对手机显示PIN或密钥不合

Masentek, 我想知道此款蓝牙耳机为什么连充电器和说明书也没有呢?最悲剧的是手机和蓝牙连接上了尽然无法配对(PIN码和密钥不一致)真叫人伤透脑筋啊!还请问大师们 我现在该怎么办????求解!!!!!................-1号店社区
0门槛开店赚钱
关注我们:
相关商品评论
经验【1哥教你挑】蓝牙耳机,多得是你不知道的事
Masentek 美讯 蓝牙耳机 M19 黑色
更多Masentek 美讯 蓝牙耳机 M19 黑色的评论
1号店官方微信
万千优惠资讯抢先收到,互动、查物流一步搞定!
Copyright(C) 1号店网上超市 ,All Rights Reserved您现在的位置: &
Lv1.幼儿园O粉
粉丝积分5经验3 精华0签到0天O币14690
蓝牙配对时PIN码或密钥不正确导致蓝牙不能连接怎么解决
安卓系统号:2.3.6
手机版本号:.05_120615
粉丝积分34607经验26968 精华0签到0天O币48
蓝牙配对若是提示需要输入密码,只需要双方输入的密码相同就可以了,您可以尝试双方手机都输入四个零试试,楼主!而PIN密码,这个指的是SIM卡的密码,您可以在购买SIM卡的包装中来了解一下哟~
那些片段,还在不在....
Lv1.幼儿园O粉
粉丝积分12经验7 精华0签到0天O币14690
Lv1.幼儿园O粉, 积分 12, 距离下一级还需 8 积分
我是同样的情况,楼主有解决的方法没有?
粉丝积分30526经验24826 精华0签到87天O币1454
楼上的机油,您试试一楼的方法,看看是否可以呢?
5月16日 星期六32083人签到
看腻了官方的字体,分享下个人珍藏的字体,简洁又不失个性~
手机太耗电?简单几招,这么用手机就可以更省电~
沉浸式、透明哒傻傻分不清楚,告诉你他们究竟是神马
留住那片海——星拍客活动留影手机也能拍大片——甩出激情!8855我的三星W999每次与蓝牙耳机配对都显示pin或匹配密钥不正确 蓝牙耳机也是三星的啊_百度知道
我的三星W999每次与蓝牙耳机配对都显示pin或匹配密钥不正确 蓝牙耳机也是三星的啊
欢迎您到百度三星企业平台提问:http.baidu
其他类似问题
按默认排序
其他1条回答
不要松开通话键,注意是长按蓝牙耳机开机后,就会配上对的,然后手机上按配对,解决方法是长按蓝牙通话键我的note2也试过这情况,就一直按着,此过程中,手机要不停的配对搜索,就可以了
您可能关注的推广
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁当前访客身份:游客 [
当前位置:
// 自动配对设置Pin值
static public boolean autoBond(Class btClass, BluetoothDevice device, String strPin)
throws Exception {
Method autoBondMethod = btClass.getMethod(&setPin&, new Class[] { byte[].class });
Boolean result = (Boolean) autoBondMethod
.invoke(device, new Object[] { strPin.getBytes() });
// 开始配对
static public boolean createBond(Class btClass, BluetoothDevice device) throws Exception {
Method createBondMethod = btClass.getMethod(&createBond&);
Boolean returnValue = (Boolean) createBondMethod.invoke(device);
return returnValue.booleanValue();
&使用上面的代码可以实现配对,但是会出现输入提示框(点击取消后,查看配对是已配对)
我想屏蔽这个提示框,那为大神知道怎么做了?或者使用其它方式实现匹配
下面是进行匹配时 弹出提示框的日志,我想如果我不能屏蔽它,那么我可以通过代码关闭它吗
05-18 17:26:54.779: I/BluetoothEventLoop.cpp(171): agent_event_filter: Received method org.bluez.Agent:RequestPinCode 05-18 17:26:54.790: I/ActivityManager(171): Starting: Intent { act=android.bluetooth.device.action.PAIRING_REQUEST flg=0x cmp=com.android.settings/.bluetooth.BluetoothPairingDialog (has extras) } from pid 252 05-18 17:26:55.190: I/ActivityManager(171): Displayed com.android.settings/.bluetooth.BluetoothPairingDialog: +374ms
共有17个答案
<span class="a_vote_num" id="a_vote_num_
Mainfest,xml注册
&receiver android:name=&.BluetoothConnectActivityReceiver& &
&intent-filter&
&action android:name=&android.bluetooth.device.action.PAIRING_REQUEST& /&
&/intent-filter&
&/receiver&
自己在收到广播时处理并将预先输入的密码设置进去
public class BluetoothConnectActivityReceiver extends BroadcastReceiver
String strPsw = &0&;
public void onReceive(Context context, Intent intent)
// TODO Auto-generated method stub
if (intent.getAction().equals(
&android.bluetooth.device.action.PAIRING_REQUEST&))
BluetoothDevice btDevice = intent
.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
// byte[] pinBytes = BluetoothDevice.convertPinToBytes(&1234&);
// device.setPin(pinBytes);
Log.i(&tag11111&, &ddd&);
ClsUtils.setPin(btDevice.getClass(), btDevice, strPsw); // 手机和蓝牙采集器配对
ClsUtils.createBond(btDevice.getClass(), btDevice);
ClsUtils.cancelPairingUserInput(btDevice.getClass(), btDevice);
catch (Exception e)
// TODO Auto-generated catch block
e.printStackTrace();
那个很NB的类是这样的,添加上楼主的精华
/************************************ 蓝牙配对函数 * **************/
import java.lang.reflect.F
import java.lang.reflect.M
import android.bluetooth.BluetoothD
import android.util.L
public class ClsUtils
* 与设备配对 参考源码:platform/packages/apps/Settings.git
* /Settings/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
static public boolean createBond(Class btClass, BluetoothDevice btDevice)
throws Exception
Method createBondMethod = btClass.getMethod(&createBond&);
Boolean returnValue = (Boolean) createBondMethod.invoke(btDevice);
return returnValue.booleanValue();
* 与设备解除配对 参考源码:platform/packages/apps/Settings.git
* /Settings/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
static public boolean removeBond(Class btClass, BluetoothDevice btDevice)
throws Exception
Method removeBondMethod = btClass.getMethod(&removeBond&);
Boolean returnValue = (Boolean) removeBondMethod.invoke(btDevice);
return returnValue.booleanValue();
static public boolean setPin(Class btClass, BluetoothDevice btDevice,
String str) throws Exception
Method removeBondMethod = btClass.getDeclaredMethod(&setPin&,
new Class[]
{byte[].class});
Boolean returnValue = (Boolean) removeBondMethod.invoke(btDevice,
new Object[]
{str.getBytes()});
Log.e(&returnValue&, && + returnValue);
catch (SecurityException e)
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
catch (IllegalArgumentException e)
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
catch (Exception e)
// TODO Auto-generated catch block
e.printStackTrace();
// 取消用户输入
static public boolean cancelPairingUserInput(Class btClass,
BluetoothDevice device)
throws Exception
Method createBondMethod = btClass.getMethod(&cancelPairingUserInput&);
// cancelBondProcess()
Boolean returnValue = (Boolean) createBondMethod.invoke(device);
return returnValue.booleanValue();
// 取消配对
static public boolean cancelBondProcess(Class btClass,
BluetoothDevice device)
throws Exception
Method createBondMethod = btClass.getMethod(&cancelBondProcess&);
Boolean returnValue = (Boolean) createBondMethod.invoke(device);
return returnValue.booleanValue();
* @param clsShow
static public void printAllInform(Class clsShow)
// 取得所有方法
Method[] hideMethod = clsShow.getMethods();
int i = 0;
for (; i & hideMethod. i++)
Log.e(&method name&, hideMethod[i].getName() + &;and the i is:&
// 取得所有常量
Field[] allFields = clsShow.getFields();
for (i = 0; i & allFields. i++)
Log.e(&Field name&, allFields[i].getName());
catch (SecurityException e)
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
catch (IllegalArgumentException e)
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
catch (Exception e)
// TODO Auto-generated catch block
e.printStackTrace();
执行时直接使用:
public static boolean pair(String strAddr, String strPsw)
boolean result =
BluetoothAdapter bluetoothAdapter = BluetoothAdapter
.getDefaultAdapter();
bluetoothAdapter.cancelDiscovery();
if (!bluetoothAdapter.isEnabled())
bluetoothAdapter.enable();
if (!BluetoothAdapter.checkBluetoothAddress(strAddr))
{ // 检查蓝牙地址是否有效
Log.d(&mylog&, &devAdd un effient!&);
BluetoothDevice device = bluetoothAdapter.getRemoteDevice(strAddr);
if (device.getBondState() != BluetoothDevice.BOND_BONDED)
Log.d(&mylog&, &NOT BOND_BONDED&);
ClsUtils.setPin(device.getClass(), device, strPsw); // 手机和蓝牙采集器配对
ClsUtils.createBond(device.getClass(), device);
remoteDevice = // 配对完毕就把这个设备对象传给全局的remoteDevice
catch (Exception e)
// TODO Auto-generated catch block
Log.d(&mylog&, &setPiN failed!&);
e.printStackTrace();
Log.d(&mylog&, &HAS BOND_BONDED&);
ClsUtils.createBond(device.getClass(), device);
ClsUtils.setPin(device.getClass(), device, strPsw); // 手机和蓝牙采集器配对
ClsUtils.createBond(device.getClass(), device);
remoteDevice = // 如果绑定成功,就直接把这个设备对象传给全局的remoteDevice
catch (Exception e)
// TODO Auto-generated catch block
Log.d(&mylog&, &setPiN failed!&);
e.printStackTrace();
that is all
--- 共有 2 条评论 ---
yes!we should! 这种setpin方式一般对dongle还可以,对手机就没作用!
(3年前)&nbsp&
所有的配对请求都会发送这个广播android.bluetooth.device.action.PAIRING_REQUEST
在接受广播时最好添加个 if
来判断是否是你需要连接的设备
(3年前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
下班都回家抱老婆了吗 怎么没人了
<span class="a_vote_num" id="a_vote_num_
这个问题有解吗?
<span class="a_vote_num" id="a_vote_num_
引用来自“杨俊构”的答案这个问题有解吗?有点眉目& 还在测试
--- 共有 1 条评论 ---
测试好了,源码能发给我吗!不尽感激,我邮箱
(3年前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
引用来自“billowworld”的答案引用来自“杨俊构”的答案这个问题有解吗?有点眉目& 还在测试哥们怎么计划啊?有新的进展share一下哈!
<span class="a_vote_num" id="a_vote_num_
引用来自“杨俊构”的答案
引用来自“billowworld”的答案
引用来自“杨俊构”的答案
这个问题有解吗?
有点眉目& 还在测试
哥们怎么计划啊?有新的进展share一下哈!
设备被拿走了,没发测试。
下面的代码包含:一个取消配对输入和取消配对进程的方法
我的思路是在收到:android.bluetooth.device.action.PAIRING_REQUEST&配对请求时调用取消输入方法,在我们调用createBond方法时 不论用户是否在弹出框选择配对还是取消配对 都已经配对成功,
所以只要我们屏蔽掉弹出配对提示框就可以了
package com.testBlueT
import java.lang.reflect.F
import java.lang.reflect.M
import android.bluetooth.BluetoothD
import android.util.L
public class BluetoothUtils {
* 与设备配对 参考源码:platform/packages/apps/Settings.git
* /Settings/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
static public boolean createBond(Class btClass, BluetoothDevice btDevice) throws Exception {
Method createBondMethod = btClass.getMethod(&createBond&);
Boolean returnValue = (Boolean) createBondMethod.invoke(btDevice);
return returnValue.booleanValue();
* 与设备解除配对 参考源码:platform/packages/apps/Settings.git
* /Settings/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
static public boolean removeBond(Class btClass, BluetoothDevice btDevice) throws Exception {
Method removeBondMethod = btClass.getMethod(&removeBond&);
Boolean returnValue = (Boolean) removeBondMethod.invoke(btDevice);
return returnValue.booleanValue();
static public boolean setPin(Class btClass, BluetoothDevice btDevice,
String str) throws Exception {
Method removeBondMethod = btClass.getDeclaredMethod(&setPin&,
new Class[] { byte[].class });
Boolean returnValue = (Boolean) removeBondMethod.invoke(btDevice,
new Object[] { str.getBytes() });
Log.e(&returnValue&, && + returnValue);
} catch (SecurityException e) {
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
} catch (IllegalArgumentException e) {
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 取消用户输入
static public boolean cancelPairingUserInput(Class btClass, BluetoothDevice device)
throws Exception {
Method createBondMethod = btClass.getMethod(&cancelPairingUserInput&);
// cancelBondProcess()
Boolean returnValue = (Boolean) createBondMethod.invoke(device);
return returnValue.booleanValue();
// 取消配对
static public boolean cancelBondProcess(Class btClass, BluetoothDevice device)
throws Exception {
Method createBondMethod = btClass.getMethod(&cancelBondProcess&);
Boolean returnValue = (Boolean) createBondMethod.invoke(device);
return returnValue.booleanValue();
* @param clsShow
static public void printAllInform(Class clsShow) {
// 取得所有方法
Method[] hideMethod = clsShow.getMethods();
int i = 0;
for (; i & hideMethod. i++) {
Log.e(&method name&, hideMethod[i].getName());
// 取得所有常量
Field[] allFields = clsShow.getFields();
for (i = 0; i & allFields. i++) {
Log.e(&Field name&, allFields[i].getName());
} catch (SecurityException e) {
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
} catch (IllegalArgumentException e) {
// throw new RuntimeException(e.getMessage());
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
<span class="a_vote_num" id="a_vote_num_
可以了的,楼主,我测试了我的机器是OK的!再问楼主一个问题,我在配对成功后如何发起Handsfree的服务呢?
<span class="a_vote_num" id="a_vote_num_
引用来自“杨俊构”的答案可以了的,楼主,我测试了我的机器是OK的!再问楼主一个问题,我在配对成功后如何发起Handsfree的服务呢?代码贴出下
&Handsfree .?你做蓝牙耳机吗& 不了解
你看是不是这个吧
<span class="a_vote_num" id="a_vote_num_
顶一个,非常需要,有源码吗?发个来看看
<span class="a_vote_num" id="a_vote_num_
做两个蓝牙设备之间自动匹配需要两个设备都装上apk吧,如果只有一个设备安装代码生成的apk是无法完成自动配对
有什么技术问题吗?
补全的其他问题
类似的话题手机显示PIN或配对密钥错误,无法和蓝牙耳机配对是什么原因,怎么解决?
内容为广告/垃圾,我要举报!
特聘专家具有协助内容审核的特权
举报后内容将不能在前台展示
错乱举报会导致该权利被剥夺
选择举报原因&
已有1条答案
&&& 你好,使用蓝牙耳机的话,要打开手机蓝牙,随后按住蓝牙耳机的开关,这时候手机搜索蓝牙即可配对成功。 PIN码是手机的密码,与蓝牙无关。
选择举报原因&
快速简答--编辑问题发送微博@ZOL问答堂
没找到想要的答案?那就登录提问吧

我要回帖

更多关于 蓝牙耳机配对后没声音 的文章

 

随机推荐