macpu / mpbluetoothkit Goto Github PK
View Code? Open in Web Editor NEWThis is a block-based framework for building Bluetooth iOS apps using the CoreBluetooth Framework.Its a very powerful and useful,and very easy to use it
License: MIT License
This is a block-based framework for building Bluetooth iOS apps using the CoreBluetooth Framework.Its a very powerful and useful,and very easy to use it
License: MIT License
我发现这个库不适合IOS11
H2 希望楼主写一些通知订阅的demo,很需要。
使用的时候发现,开始扫描后,一直没有停止,还需要自己写一个延时停止的方法,建议增加一个扫描方法,可以设定扫描时间。这样更方便使用。仅仅是建议。
还有就是你的博客上的获取Mac地址的方法,在180A的2A23下确实能得到这个值,前提是蓝牙端提供了这个service 的charactrstic的情况下。但是我用swift调用的时候
NSString *value = [NSString stringWithFormat:@"%@",characteristic.value];
这个value不能转换为string,需要转换成二进制
var hexadecimalString: String {
var bytes = [UInt8](repeating: 0, count: count)
copyBytes(to: &bytes, count: count)
let hexString = NSMutableString()
for byte in bytes {
hexString.appendFormat("%02x", UInt(byte))
}
return NSString(string: hexString) as String
}
有需要的人看看,这也是其它地方看到的。
在OC中没有试。
How to Use it
建议didDiscoverPeripheral时,就把RSSI写入对应的MPPeripheral中,再去readRSSI麻烦。
ERROR Error Domain=CBATTErrorDomain Code=3 "Writing is not permitted." UserInfo={NSLocalizedDescription=Writing is not permitted.}
可以直接通过Mac地址连接设备么?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.