using iPhone to send data with btstack
I'm developing an aplication which send a few data from an iPhone to a external bluetooth module. I have been reading the information in this forum but I still don't understand how to use btstack in order to develop that app (if it is possible). I'm using xCode enviroment to develop it. S开发者_开发知识库o I was wonder if somebody has a kind of simple and basic code to understand the use of btstack (either a project). I will be greatful of any help that you can give me in this topic.
Best regards.
When you have compiled BTStack, in the src direcotry a libBTstack.a and libBTstack.dylib file will appear. Copy them into iPhone_SDK_sysroot/usr/local/lib and on the iPhone also to /usr/local/lib. Then correct the BTstackCocoaAppDelegate.m file: implement
- (void) deviceDetected: (id) detected device: (id) device {
}
- (void) inquiryStopped {
}
- (void)disconnectDevice:(id)disconnect device:(id)device {
}
and recompile it in order to not get errors (when the app finishes searching, these methods are called on the main app delegate, but as it doesn't implement these by default, the ObjC runtime will throw n error).
BTStack can't compile in XCode 4.5 and iOS 6.0; and libBTstack.dylib from the compiled app cann't be used on this;
Try to run the example made for Cocoa Touch, it's called BTstackCocoa on the btstack directory that you get via svn. I am in the exact same situation. Im running this app, but i get the SIGTERM while is searching for devices...
精彩评论