Help get data logger via bluetooth for J2ME

Help
2009-09-10
2013-05-02
  • Antonio Remualdo

    Hello somebody help me, i have a simple problem and I wonder if I can use the BT747 library to solve it, I would like to download the data logger in my Holux M1000C for my Java ME application via Bluetooth and then clear the memory, is it possible? if yes how to proceed? 

    I'm only asking because I found comments about the desktop version for a few mobile post. 

    I'm trying to use the following workaround, I downloaded the full version of the BT747 and inside the src folder, I copied my project for java me folders from the image below, I made the necessary conversions to run on java me, my doubt now is whether these sources with I will be able to connect to Holux M1000C, and download the data logger and clean the memory? And how to proceed?

    I'm trying to use the following code for test:

    modelo = new Model();
    controle = new Controller(modelo);
    controle.setBaudRate(38400);
    controle.setBluetooth();//set connection via Bluetooth
    controle.setBooleanOpt(Model.DISABLELOGDURINGDOWNLOAD, true);
    controle.setDownloadMethod(Model.DOWNLOAD_FULL);
    controle.startDefaultDownload();
    controle.eraseLog();
    controle.setBooleanOpt(Model.DISABLELOGDURINGDOWNLOAD, false);
    controle.closeGPS();

    Thz.

    http://i120.photobucket.com/albums/o194/Shakapp/gns.jpg

     
    • Mario De Weerd

      Mario De Weerd - 2009-09-10

      Sure you can use BT747 code to run on J2ME - there is a version of BT747 for J2ME that actually works.

      The 'src' directory is indeed reused for the J2ME environment.  Due to differences, low level implementations have to be adapted according to the actual platform and a Bridge was implemented with that with a specific implementation for the platform.
      The source code specific for the J2ME implementation is under SVN only for the moment : http://bt747.svn.sourceforge.net/viewvc/bt747/trunk/BT_J2ME/ .  My setup under eclipse makes the project include the src directory of my local copy of the main BT747 project.

      You can see some of the required initialisations in http://bt747.svn.sourceforge.net/viewvc/bt747/trunk/BT_J2ME/src/net/sf/bt747/j4me/app/MTKMidlet.java?revision=1469&view=markup

      Starting at line 35, the bridge is set up.  On line 78 the object handling the communication is declared.

      That should get you started, but I can provide more info as needed.

       
    • Antonio Remualdo

      Ok thz man, i have to merge the project files with Java Se the Java me? because the sample class last MTKMidlet.java uses the class bt747.sys.JavaLibBridge;
      Class bt747.sys.JavaLibBridge was found in the project to Java SE, this my doubts.

       
      • Mario De Weerd

        Mario De Weerd - 2009-09-10

        As said, under eclipse, the project is setup to have a kind of "symbolic link" to the src directory of the main project (supports J2SE and SuperWaba there).

        So the src directory of the main project must be compiled in, whatever method you use for that.  Personally, I do not call it merging (because that refers more to having two versions of the same thing and you have to join them into one, while here it is more or less distinct).

         
    • Antonio Remualdo

      Ok thx, but i have other problem :D in class net.sf.bt747.j2me.app.ftp.SimpleFTP using javax.microedition.io.file.FileConnection; but java me is not support is library. with in your project for java me you resolved is problem? In project final for java me you using class SimpleFTP?

      Thz

       
      • Mario De Weerd

        Mario De Weerd - 2009-09-10

        I am not sure what your problem is - I am using SimpleFTP in the J2ME project.
        javax.microedition.io.file.FileConnection is inside some standard Java library.
        You only need FTP for osm upload or AGPS download - if you want you can make it a dummy in your case.

         
        • Antonio Remualdo

          Ok thz...

           

Log in to post a comment.