@darkwolfzero :
I believe I have an example that may help you get started.
A few years ago, I had to code an implementation of an ad-hoc routing protocol (AODV) for a set of wireless sensors. These sensors were running TinyOS, an open source operating system written in a C variant called nesC (network embedded systems C). They were able to measure light, temperature and sound from external sensors, and used a tiny wifi antenna to transmit data packets.
http://www.cmt-gmbh.de/Produkte/WirelessSensorNetworks/MICAz_2.4_GHz.html
The actual challenge was the routing protocol, probably not very interesting to you. Nonetheless, to measure the effectiveness of the protocol, I had to be able to receive and display all the data sent by the sensors on a computer.
So, how would you do that ?
The first step was to code the sensor application using the proprietary language nesC. In my case, each node had to regularly retrieve external temperature, pressure, and luminosity from the sensor, and then send the information to the base station using the wifi antenna. They also served as relays for other nodes.
The sensors were programmed using an ethernet board like this one :
http://www.cmt-gmbh.de/Produkte/WirelessSensorNetworks/MIB600_Ethernet_Gateway.html
Finally, the data packet sent by the sensor looked like something like that :
typedef nx_struct Msg {
nx_uint8_t id; // emitting node id
nx_uint8_t src; // source node id
nx_uint8_t dest; // destination node id
nx_uint8_t ttl; // Time To Live
[...]
nx_uint16_t valL; // luminosity sensor value
nx_uint16_t valS; // sound sensor value
nx_uint16_t valT; // temperature sensor value
} Msg;
Then, all I had to do was to write a Java application that could read such messages when listening to a specific port.
public Msg(byte[] data) {
...
}
...
public int getId() {
return (int) funtionToGetContentFromByteArray(0, 8);
}
I could then draw a map of sensors, display the local temperatures etc to my liking, and most importantly see how effective my protocol was just by looking at the packets.
This is a very simple example, but you can adapt to your use case. You'll probably have to write a Java class for sending/receiving packets with Bluetooth. You'll have to code different types of control messages, and since Bluetooth isn't restricted to your own device, you'll need a reliable way to check what you receive.
As for the device, well everything depends on what it is !