WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WiiRemoteJ 1.5 Released

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ
View previous topic :: View next topic  
Author Message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 493

Digg It
PostPosted: Tue Jul 08, 2008 10:56 pm    Post subject: WiiRemoteJ 1.5 Released

Hello again everyone!

Yes, I know it's only been five days since the last major update (1.4) to WiiRemoteJ, but I felt the number of changes in this latest version deserved a new version number, and so I've released WiiRemoteJ v1.5 (and new docs too). Smile

In response to concerns that it would be hard to use Balance Boards and Wii Remotes simultaneously (since they'd have to be searched for separately), I retooled the WiiRemoteJ find methods to enable you to search for one or more types of device simultaneously through the addition of the WiiDevice interface.

Thanks to user feedback, I also located and corrected a bug in the way the Balance Board calculated its mass values. It should now report accurate values.

Finally, I saw that WiiBrew had posted the specs for full IR mode (which had not yet been reverse-engineered when I first released WiiRemoteJ), and so I added implementation for full IR to the library.

As always, please report any bugs/typos in the docs! Enjoy! Smile
_________________
Cha0s
Back to top
View user's profile Send private message
darkness_s



Joined: 10 Jul 2008
Posts: 1

Digg It
PostPosted: Thu Jul 10, 2008 1:28 am    Post subject:

Hi, i'm using the code that em wrote. But it doesn't work with version 1.5. It worked with v1.4, although it didn't report the weight accurately.

I get this error with 1.5:
Code:

avetanaBluetooth version 1.3.17
9/07/2008 08:27:02 PM wiiremotej.WiiDeviceDiscoverer deviceDiscovered
FINA: Found @ndr€¡$hª (001842860475)
9/07/2008 08:27:02 PM wiiremotej.WiiDeviceDiscoverer deviceDiscovered
FINA: @ndr€¡$hª is NOT a known device.
9/07/2008 08:27:02 PM wiiremotej.WiiDeviceDiscoverer deviceDiscovered
FINA: Found Nintendo RVL-WBC-01 (001F32245CF8)
9/07/2008 08:27:02 PM wiiremotej.WiiDeviceDiscoverer deviceDiscovered
FINA: Nintendo RVL-WBC-01 is a Balance Board.
java.lang.NullPointerException
   at WRLImp1.main(WRLImp1.java:20)
hciOpenDevice(0)
setting HCI_DEVICE_ID to 0


Nevermind the @ndr€¡$hª part, it was a cellphone.
Here is em's code:

Code:
import wiiremotej.*;
import wiiremotej.event.*;


public class WRLImp1 extends BalanceBoardAdapter
{
    private BalanceBoard remote;
   
    public static void main(String args[])
    {
        //basic console logging options...
        WiiRemoteJ.setConsoleLoggingAll();
        //WiiRemoteJ.setConsoleLoggingOff();
       
        try
        {   
            //Find and connect to a Wii Remote
            BalanceBoard remote = WiiRemoteJ.findBalanceBoard();
            //WiiRemote remote = WiiRemoteJ.connectToRemote("btl2cap://0017AB29BB7B");
            remote.addBalanceBoardListener(new WRLImp1(remote));
        }
        catch(Exception e){e.printStackTrace();}
    }
   
    public WRLImp1(BalanceBoard remote)
    {
        this.remote = remote;
    }
   
    public void disconnected()
    {
        System.out.println("Remote disconnected... Please Wii again.");
        System.exit(0);
    }
   
    public void buttonInputReceived(BBButtonEvent evt)
    {
       System.out.println("Button: " + evt.isPressed());
    }
   
    public void massInputReceived(BBMassEvent evt)
    {
       double totalmass = evt.getTotalMass();
       double mass00 = evt.getMass(0, 0);
       double mass01 = evt.getMass(0, 1);
       double mass10 = evt.getMass(1, 0);
       double mass11 = evt.getMass(1, 1);
       
       System.out.println("Total Mass: " + totalmass);
       System.out.println("Sensor Mass: ");
       System.out.println("00: " + mass00 + "\t\t01: " + mass01);
       System.out.println("10: " + mass10 + "\t\t11: " + mass11);
       System.out.println("");
    }
}


Code:
Code:
Code:
Code:
Back to top
View user's profile Send private message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 493

Digg It
PostPosted: Thu Jul 10, 2008 1:38 am    Post subject:

What's your BT stack/JSR 82?
_________________
Cha0s
Back to top
View user's profile Send private message
thelucster



Joined: 12 Jul 2008
Posts: 2

Digg It
PostPosted: Sat Jul 12, 2008 1:39 pm    Post subject:

I am also getting this error. I am using BlueCove on OSX 10.4. If I specify the address of the balance board it will connect, but autodiscovery does not.

I also have a couple of requests, the first is to enable a function to recalibrate the balance board through the API, and also to try and improve how the balance board connects. Currently I have to launch my code, press the sync button and hope for the best, being able to just press the power button would be much easier!

Thanks for your work!
Back to top
View user's profile Send private message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 493

Digg It
PostPosted: Sat Jul 12, 2008 8:17 pm    Post subject:

That error should be fixed now (new download). Sorry for the delay!

As far as the Balance Board calibration goes, it has built-in calibration data that should be accurate. If you are getting weights that are significantly off, let me know, and I'll re-examine my code for bugs (though it *should* be working now).

As for the connection process, I believe the issue is the same as with the Wii Remote: the code for the quick-connect stuff is buried in firmware and isn't accessible over the standard Bluetooth interface. Until someone figures out a way to access it, we're stuck with having to press the sync button (or 1 + 2 on the Wii Remote) every time. Sorry!

EDIT: I've also fixed a few other minor issues in the library/docs, detailed in the changelog. Please let me know about any bugs/typos!
_________________
Cha0s
Back to top
View user's profile Send private message
weimar



Joined: 16 Sep 2008
Posts: 1

Digg It
PostPosted: Tue Sep 16, 2008 9:18 am    Post subject: Release 1.5 has class version 6, not 5

Unfortunately, the released WiiRemoteJ.jar contains class files which only work with java 6.0, not with java 5.0 as stated in the readme. Can you recompile with 5.0 class file compatibility?
_________________
J. Weimar
Back to top
View user's profile Send private message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 493

Digg It
PostPosted: Wed Sep 17, 2008 9:54 pm    Post subject:

Ah, my mistake. I'd forgotten I upgraded to 1.6 since then. I've added -target 1.5 to the build scripts, so all should be well now. New download available now. Smile
_________________
Cha0s
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group