Architecture for Request/Reply-Style Bluetooth Application
site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com Hi, I wrote a class which sends AT-commands to a moblie phone and reads back the results. To keep the bluetooth-code independend from the other code I put everything bluetooth-related to a second thread. Now it works as follows: 1. Main-thread sends request to my class 2. Main-thread gets semaphore, puts request in buffer and waits for result 3. BT-thread reads request from buffer and sends it. 4. BT-thread receives data from device. As soon as "OK" or "ERROR" arrives the Main-thread is signaled to continue. This works quite good. But now i found out that the DeviceSelector won't work if it's not on the main-thread... How dou you design such kind of application? Of course I could change the interface to my class to async but this makes things complicated. Is it possible to use the main-thread only for BT and let the system handle all gui-calls in another thread (sorry, a little bit off-topic...). Thanks, Thomas -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger?did=10 _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Thomas Mueller