起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: tiandongkele

[处理中3] 蓝牙插件使用

  [复制链接]

0

主题

6

帖子

21

积分

新手上路

Rank: 1

积分
21
QQ
发表于 2016-5-2 11:07:49 | 显示全部楼层
和楼主一样,Scan方法,没反应。enable,showBluetoothSettings 方法可用,无法显示出扫描的结果!求实例,求实例,求实例!
回复 支持 反对

使用道具 举报

发表于 2016-5-4 10:54:50 | 显示全部楼层
2507080980 发表于 2016-5-2 11:07
和楼主一样,Scan方法,没反应。enable,showBluetoothSettings 方法可用,无法显示出扫描的结果!求实例, ...

你是搜索外部设备吗??比如蓝牙手环 , 蓝牙耳机!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

0

主题

6

帖子

21

积分

新手上路

Rank: 1

积分
21
QQ
发表于 2016-5-7 18:16:07 | 显示全部楼层
liangyongfei 发表于 2016-5-4 10:54
你是搜索外部设备吗??比如蓝牙手环 , 蓝牙耳机!

是搜索外部设备,前两天又试了试,可以搜到小米手环,但是是偶尔能搜到,想到小米手环是蓝牙4.0的,我又买的蓝牙4.0的模块是,很容易搜到模块了
回复 支持 反对

使用道具 举报

0

主题

6

帖子

21

积分

新手上路

Rank: 1

积分
21
QQ
发表于 2016-5-7 18:20:18 | 显示全部楼层
2507080980 发表于 2016-5-7 18:16
是搜索外部设备,前两天又试了试,可以搜到小米手环,但是是偶尔能搜到,想到小米手环是蓝牙4.0的,我又 ...

Bluetooth Serial Plugin for PhoneGap
This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino.

Android and Windows Phone use Classic Bluetooth. iOS uses Bluetooth Low Energy.

Supported Platforms

Android
iOS with RedBearLab BLE hardware, Adafruit Bluefruit LE, Laird BL600, or BlueGiga
Windows Phone 8
Browser (Testing only. See comments.)
Supporting other Bluetooth Low Energy hardware

Limitations

The phone must initiate the Bluetooth connection
iOS Bluetooth Low Energy requires iPhone 4S, iPhone5, iPod 5, or iPad3+
Will not connect Android to Android*
Will not connect iOS to iOS*


这是从github.com上看到的说明文件的内容,注意最后两行
回复 支持 反对

使用道具 举报

0

主题

6

帖子

21

积分

新手上路

Rank: 1

积分
21
QQ
发表于 2016-5-7 18:22:11 | 显示全部楼层
liangyongfei 发表于 2016-4-20 15:03
我们这里测试 ,使用  scan  这个方法! 只能扫描到 外部设备,比如 手环 耳机之类的设备!!
手机蓝牙好 ...

Bluetooth Serial Plugin for PhoneGap
This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino.

Android and Windows Phone use Classic Bluetooth. iOS uses Bluetooth Low Energy.

Supported Platforms

Android
iOS with RedBearLab BLE hardware, Adafruit Bluefruit LE, Laird BL600, or BlueGiga
Windows Phone 8
Browser (Testing only. See comments.)
Supporting other Bluetooth Low Energy hardware

Limitations

The phone must initiate the Bluetooth connection
iOS Bluetooth Low Energy requires iPhone 4S, iPhone5, iPod 5, or iPad3+
Will not connect Android to Android*
Will not connect iOS to iOS*
回复 支持 反对

使用道具 举报

1

主题

10

帖子

24

积分

新手上路

Rank: 1

积分
24
QQ
 楼主| 发表于 2016-5-20 01:55:32 | 显示全部楼层
可以连接外设了,如何发送数据呢?明明已经连接上了,调用isconnect返回时未连接
回复 支持 反对

使用道具 举报

发表于 2016-5-20 11:02:27 | 显示全部楼层
tiandongkele 发表于 2016-5-20 01:55
可以连接外设了,如何发送数据呢?明明已经连接上了,调用isconnect返回时未连接 ...

这个你看下它详细文档吧:/Native/plugins/cordova-plugin-ble-central/README.md
蓝牙插件本地正在处理
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

1

主题

10

帖子

24

积分

新手上路

Rank: 1

积分
24
QQ
 楼主| 发表于 2016-5-21 16:13:23 | 显示全部楼层
如何建立一个SPP连接
回复 支持 反对

使用道具 举报

发表于 2016-5-23 10:06:38 | 显示全部楼层
tiandongkele 发表于 2016-5-21 16:13
如何建立一个SPP连接

蓝牙这个插件属于第三方提供的开源插件!文档中没有接受如何实现!那就只能自己上网查!如果它没有提供,还可以自己修改插件的源码实现功能,文档中心有提供关于插件的开发!请参考
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

1

主题

10

帖子

24

积分

新手上路

Rank: 1

积分
24
QQ
 楼主| 发表于 2016-5-23 16:14:30 | 显示全部楼层
connect方法没反应,有时候提示连接失败,通过MAC地址去连接蓝牙模块有问题。有使用成功的案例吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-9-28 15:28 , Processed in 0.064207 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表