Architecture for Request/Reply-Style Bluetooth Application
Architecture for Request/Reply-Style Bluetooth Application
- Subject: Architecture for Request/Reply-Style Bluetooth Application
- From: "Thomas Mueller" <email@hidden>
- Date: Mon, 14 Jan 2008 10:50:44 +0100
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden