Re: Bluetooth-dev Digest, Vol 7, Issue 13
Re: Bluetooth-dev Digest, Vol 7, Issue 13
- Subject: Re: Bluetooth-dev Digest, Vol 7, Issue 13
- From: Matthias Ringwald <email@hidden>
- Date: Sun, 2 May 2010 14:26:25 +0200
Hi David
On 29.04.2010, at 16:14, dsjove .mac wrote:
>
> I am writing for the desktop using Cocoa's BT objects. I would love to get this app on the iPhone but jailbreaking appears to be the only option.
>
> My model over BT is remote procedure calls. That is why I need a dedicated thread for acquiring and signaling results.
>
> "Blocking" is an ambiguous term. If an event on the main thread calls a function, it is blocking. The low level private implementation detail of a function interacting with BT is irrelevant to the fact that the main run loop calls a getter on a model object. I have policies built in for timeouts.
>
> Some of these getters are computed from the results of multiple BT remote procedure calls. The main thread calls the procedural getters. In one connection implementation, BT, it uses another thread to sync the results.
Ah. So you (want to) provide synchronous RPC over BT. We did provide synchronous BT calls in BTnut (btnode.ethz.ch), but so far I don't plan on adding such a feature to BTstack.
>
> I would recomend allowing the client of your library to select the thread. Auto injection into global state is a limiting side-effect. RPC becomes very difficult.
Thanks for the suggestion. Not convinced yet, but I guess we should this discuss this over at the BTstack-dev mailing list :)
>
> So back to CocoaTouch - can your code go into an AppStore product?
Let's say it is not impossible. An application that uses BTstack can run inside the usual Sandbox. The client library currently is a dylib but there is no reason to not just link it statically. However, to work, BTdaemon (which implements the Bluetooth stack) needs to be installed and running, which is only possible with jailbreak. So, I in theory an app in the AppStore could use BTstack, but only on a jailbroken device, which might make the AppStore review a bit awkward. ... See you on the BTstack list :)
Best
Matthias
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden