开发者

How to send stream data via Bluetooth from an iPhone/iPod Touch to a Windows C++ application?

I need to develop an iPhone/iPod Touch application that creates a server to send some data stream (characters or bytes) to a Windows C++ application via Bluetooth. I'm thinking of creating a TCP connection, but don't know where to start.

What iPhone API should I use do to something 开发者_JAVA技巧like this? Does anyone knows some code examples that i can use to do this?

And in Windows, what should I use to support this kind of communication?

Thanks


Yes. From what it looks like you can use the PAN bluetooth profile (the same profile used for tethering) with everything except the original iPhone.

Here's an article doing bluetooth over iPhone/iPad using GameKit. The article notes that you would need at least 2 iPhone/iPad devices running iPhone OS 3.0, but I wouldn't take that as an impossibility to talk to any other bluetooth capable device.

Update This forum indicates that the iPhone is only capable of headset pairing. It could be that the iPhone is "picky" about what you can pair it with.

"The iPhone only recognizes the "headset" profile. Another well thought out idea from Apple. No A2DP profiles, no OBEX." -sapporobaby

Update 2 As jamone as indicated iPhone 3.0 supports A2DP. How nice is that?

Here's a table listing of iPhone/iPad bluetooth supported profiles


I'm pretty sure third-party developers don't have sufficient access to the Bluetooth stack to do this via published APIs (i.e. via an app you publish to the App Store).

Is using WiFi an option? That's what most developers seem to be using for client/server communications. If that's the case, see if you can distribute Apple's Bonjour runtime with your app. If you search the developer site for Bonjour, they have code samples (though probably no Windows examples).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜