"UUID is an immutable representation of a 128-bit universally unique
identifier (UUID).
There are multiple, variant layouts of UUIDs, but this class is based
upon variant 2 of RFC 4122, the Leach-Salz variant. This class can be
used to model alternate variants, but most of the methods will be
unsupported in those cases; see each method for details."
Excerpted from http://developer.android.com/reference/java/util/UUID.html
On Mar 31, 12:24 pm, Charles Norona <cnoro...@gmail.com> wrote:
> The javax.bluetooth.UUID.UUID is also based on the same variant of the
> UUID layout.http://java.sun.com/j2se/1.5.0/docs/api/java/util/UUID.html
> > Excerpted fromhttp://developer.android.com/reference/java/util/UUID.html- Hide quoted text -
>
> - Show quoted text -
On our sensor interpretation efforts, Chris and I are slowly but
surely creating some form of pedometer complemented by a compass which
we will use to track the devices' movements. He is pleased that we
were able to get consistent data on the orientation, difference of
time from the last sensor reading and the previous one, as well as
what should have been our scalar calculator. The problem with the
scalar calculator is that it is reading from the wrong sensor so I
have to spend time to get the phone to read from both the
accelerometer and the orientation sensors concurrently and pass the
proper values to their corresponding areas of the algorithm.
All in all, after some questionably stone-walling we have managed to
make quite some progress!
On Mar 31, 11:56 pm, Charles Norona <cnoro...@gmail.com> wrote:
> After much confusion from referring to various examples I have decided
> to redo the Bluetooth RFCOMM client from scratch...sort of. Anyway, I
> have managed to get the application to successfully do an inquiry of
> devices and call services search which will be necessary to begin the
> datastreaming. I have uploaded the project athttp://groups.google.com/group/engineering-design-ii-group-6-spring-2...
> > > Excerpted fromhttp://developer.android.com/reference/java/util/UUID.html-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
> to redo the Bluetooth RFCOMM client from scratch...sort of. Anyway, I
> have managed to get the application to successfully do an inquiry of
> devices and call services search which will be necessary to begin the
> datastreaming. I have uploaded the project athttp://groups.google.com/group/engineering-design-ii-group-6-spring-2...
> > > Excerpted fromhttp://developer.android.com/reference/java/util/UUID.html-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
On Apr 2, 1:53 pm, Charles Norona <cnoro...@gmail.com> wrote:
> By the way, the updated Bluetooth PC server and clients are available:
>
> Server:http://engineering-design-ii-group-6-spring-2010.googlegroups.com/web...
>
> Client:http://engineering-design-ii-group-6-spring-2010.googlegroups.com/web...
> > > > Excerpted fromhttp://developer.android.com/reference/java/util/UUID.html-Hidequoted text -
Keep in mind you will want a field that differentiates what sensor the
values belong to(either the accelerometer or the orientation sensor).
Here is a parse function I use in the mobile version until we get the
base station app up and running. This code should eventually get
adopted into the base station. I will work on it some more tomorrow
and upload the latest version.
/**
* Takes message and extracts information from it and stores values
in respective data types.
* @param message
* String that is passed from message handler that contains the
contents of the bluetooth transmission.
*/
private void parseBTMessage(String message)
{
//String variables
sensorName = "";
sensorType = "";
sensorVendor = "";
sensorVersion = "";
maxRange = "";
powerDissipation = "";
resolution = "";
accuracy = "";
timeStamp = "";
values[0] = "";
values[1] = "";
values[2] = "";
Scanner scanner = new Scanner(message);//java.util.scanner
scanner.useDelimiter("\n");
if ( scanner.hasNext() )
{
sensorName = scanner.next();
sensorType = scanner.next();
sensorVendor = scanner.next();
sensorVersion = scanner.next();
maxRange = scanner.next();
powerDissipation = scanner.next();
resolution = scanner.next();
accuracy = scanner.next();
timeStamp = scanner.next();
values[0] = scanner.next();
values[1] = scanner.next();
values[2] = scanner.next();
Log.d(TAG,"Name: "+ sensorName.trim()
+ " Type: " + sensorType
+ " Vendor: " + sensorVendor
+ " Version: " + sensorVersion
+ " Max Range: " + maxRange
+ " Power: " + powerDissipation
+ " Resolution: " + resolution
+ " accuracy: " + accuracy
+ " Timestamp: " + timeStamp
+ " Values[0]: " + values[0]
+ " Values[1]: " + values[1]
+ " Values[2]: " + values[2]);
}
else
{
Log.d(TAG,"Sensor parser: Empty or invalid line. Unable to
process.");
}
scanner.close();
}
> > > > > Excerpted fromhttp://developer.android.com/reference/java/util/UUID.html-Hidequotedtext -
/**
* Takes message and extracts information from it and stores values
in respective data types.
* NOTE: Meant to be used by base station application.
* @param message
* String that is passed from message handler that contains the
contents of the bluetooth transmission.
*/
private void parseBTMessage(String message)
{
if(message != null)
{
if(message.length() > 105)
{
Scanner scanner = new Scanner(message);
scanner.useDelimiter("\n");
if ( scanner.hasNext() )
{
try
{
sensorName = scanner.next();
sensorType = scanner.next();
sensorVendor = scanner.next();
sensorVersion = scanner.next();
maxRange = scanner.next();
powerDissipation = scanner.next();
resolution = scanner.next();
accuracy = scanner.next();
timeStamp = scanner.next();
values[0] = scanner.next();
values[1] = scanner.next();
values[2] = scanner.next();
}
catch (NoSuchElementException e)
{
e.printStackTrace();
}
Log.d(TAG,"Name: "+ sensorName.trim()
+ ", Type: " + sensorType
+ ", Vendor: " + sensorVendor
+ ", Version: " + sensorVersion
+ ", Max Range: " + maxRange
+ ", Power: " + powerDissipation
+ ", Resolution: " + resolution
+ ", accuracy: " + accuracy
+ ", Timestamp: " + timeStamp
+ ", Values[0]: " + values[0]
+ ", Values[1]: " + values[1]
+ ", Values[2]: " + values[2]);
scanner.close();
}
}
}
> > > > > > Excerpted fromhttp://developer.android.com/reference/java/util/UUID.html-Hidequoted...-