6 Replies Latest reply: Nov 2, 2010 5:11 PM by jschellSomeoneStoleMyAlias RSS

    parsing bluetooth data coming from a devise as bytes

    801689

      Hi, Iam implementing java code for MYGlucoHealth monitor. I have to catch the bluetooth data through my application and parse it to the readable format. (later i store that in SQLite database). But according to the protocol specification they provided, i cant understand how to read and parse it. i know how to pair the device with my application.But i don't know how to parse the data bytes as per the device specification protocol.

      Can anyone tell me how to do that. Anybody done with this kind of coding ?

      Thnaks in advance,

      -Chenna

      Edited by: 798686 on Nov 2, 2010 2:38 AM

        • 1. Re: need to develop class similar to "SQLiteDatabase" from android db classes
          jschellSomeoneStoleMyAlias
          798686 wrote:
          hi... iam developing database coding for my desktop application.
          i have the code for another application which is developed using android.sqlite.database.
          now i want to migrate it to my application using JDBC3 in java coding. so there are 2 classes
          Just to be clear JDBC is a interface only to a database. It is not itself a database. So if you have not used a database before then you should spend some time learning about databases and a specific database BEFORE you attempt to do anything in java.
          1) SQLiteDatabase --Exposes methods to manage a SQLite database
          2) SQLiteOpenHelper--A helper class to manage database creation and version management

          refer http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html#getReadableDatabase()

          so i want to develop 2 classes similar to above two and use them. so that i donot need to change the rest of the code for my application..

          i dont know how to write those two classes,....
          1. Study the API which consists of the public classes and methods.
          2. Write classes with methods that duplicate what you learned from 1 does.

          As an additional step note that if you think you are going to use this application commercially then you MUST look at the licensing. If the above is not completely open then do not attempt to duplicate it. Instead re-write it.

          >
          and what exactly mean by "creating a database " in jdbc terms ?
          A database server often has one or more databases. Using jdbc one can often create such a database. The database is for the most part a named container of the schema (table, procedures, etc.)
          • 2. Re: need to develop class similar to "SQLiteDatabase" from android db classes
            800224
            Don't fiddle around with the android stuff. Just get a JDBC driver for that database and go to work. There is at least one free, open source driver available. Google for SQLlite JDBC.
            • 3. Re: need to develop class similar to "SQLiteDatabase" from android db classes
              801689
              Hi thanks for the reply... but ...i know that JDBC is not a DATABASE ....actually iam using SQLite Database with JDBC interface.


              and my question is like this : http://stackoverflow.com/questions/3455482


              but i need your suggestion which is a better solution and if i have to develop class or interface how to do that..( any code can i get online).. is that that much easy to write a class as like " "SQLiteDatabase" ?

              tell me ASAP..

              Thanks,
              Chenna

              Edited by: 798686 on Sep 30, 2010 3:10 AM
              • 5. Re: parsing bluetooth data coming from a devise as bytes
                DarrylBurke
                798686 wrote:
                ok..thanks
                Moderator advice: Don't double post. I've locked the new thread.
                parsing bluetooth data coming from a devise as bytes
                Please continue here.

                db
                • 6. Re: need to develop class similar to "SQLiteDatabase" from android db classes
                  jschellSomeoneStoleMyAlias
                  798686 wrote:
                  Hi thanks for the reply... but ...i know that JDBC is not a DATABASE ....actually iam using SQLite Database with JDBC interface.


                  and my question is like this : http://stackoverflow.com/questions/3455482


                  but i need your suggestion which is a better solution and if i have to develop class or interface how to do that..( any code can i get online).. is that that much easy to write a class as like " "SQLiteDatabase" ?

                  tell me ASAP..
                  General questions along the lines of "how do I do it" ar answered by one of the following.
                  A. Design, write code, test it.
                  B. Hire someone to do step 1 for you.

                  You have distinct and disparate problems that you need to solve independently solve from each other. Those problems are the following.
                  1. Interfacing with the device and parsing the data. (The fact that you get the data is only one step.)
                  2. Accessing the persistence layer in a generic manner.

                  For problem 1.
                  1. Read the spec.
                  2. Experiment
                  3. Create a pseudo device that allows you to test (based on 1 and 2.)
                  4. Write code that parses the incoming data.

                  Note that step 2 _requires_ that you use the device.

                  For problem 2.
                  1. Learn JDBC.
                  2. Learn the adroid persistence interface.
                  3. Determine what your app needs to to for persistence.
                  4. Design an API layer based on 3 which is simple enough to encapsulate both 1 and 2.
                  5. Implement it and test it.

                  You are unlikely to get ready made solutions for either problem here or any place else.
                  And the problems are not easy from the design level nor at the implementation level for an _experienced_ developer. If you are not experienced then at best it is going to take you quite a bit longer.