eb500 and eb500_test give odd error
I am using virtually unmodified versions of eb500 and eb500_test that I downloaded from the yahoo site and I get a NPE on the 'return true' line of the response( ) method of eb500.
This happens on the first call to eb500.response( ) from this line in eb500_test:
while (!eb.response()) ;
The first command sent to the device, the connect command, appears in the Messages window but nothing else is sent there.
Any ideas on this one, Peter? I guess I don't have to post the code this time because you already have it.
This happens on the first call to eb500.response( ) from this line in eb500_test:
while (!eb.response()) ;
The first command sent to the device, the connect command, appears in the Messages window but nothing else is sent there.
Any ideas on this one, Peter? I guess I don't have to post the code this time because you already have it.
Comments
regards peter
I just downloaded the eb500_test program to a javelin with nothing attached to it.
I got a IndexOutOfBounds error. So I changed the response() method to make sure
the receive buffer·index is never·too large.
Try the attached eb500.java
Note on the eb500_test.java: All possible commands are listed in main() but obviously
that is not the way to test it. I did that to verify that all commands got assembled
properly before transmitting.
The way to test a command is
··· eb.sendCommand(eb.Connect,addr);
··· while (!eb.response()) ;
··· eb.print();
so every command must be followed by a call to response().
eb.print() then simply prints the response.
regards peter
regards peter
·