Hi,
sorry, maybe it was a little bit misleading. I'm not a commiter nor a contributer.
I tried it also with the "native" .jar libraries and I think it should work with them also.
There is also one problem remaining if you use this approach:
I/dalvikvm(20033): Could not find method java.lang.String.<init>, referenced from method com.serotonin.util.queue.ByteQueue.popString
W/dalvikvm(20033): VFY: unable to resolve direct method 5449: Ljava/lang/String;.<init> ([BLjava/nio/charset/Charset;)V
D/dalvikvm(20033): VFY: replacing opcode 0x70 at 0x0007
D/dalvikvm(20033): VFY: dead code 0x000a-000a in Lcom/serotonin/util/queue/ByteQueue;.popString (ILjava/nio/charset/Charset;)Ljava/lang/String;
There is a String created using a Charset as argument and in Android this signature is not available, instead the Charset ISO name has to be passed as String instead as a Charset instead. So the change is really trivial, if you have the source code.
Although it worked with the native libs, but I'm not sure if there aren't any side effects.
What was your problem with the bind address?
I just use something like this:
private LocalDevice device = new LocalDevice(3456, "0.0.0.0");
device.getEventHandler().addListener(this);
Log.i(TAG,"Device created");
try {
device.initialize();
} catch (IOException e) {
e.printStackTrace();
return;
}
...
device.setBroadcastAddress(ipstr);
try {
Log.i(TAG, "Sending broadcast.");
device.sendBroadcast(whoHasRequest);
// d.sendBroadcast(whois);
} catch (BACnetException e) {
System.out.println("Exception at " + ipstr);
e.printStackTrace();
}
Seems to work without problems.
If you like to I can send you my ported code in a zip file by E-mail. It includes the complete Bacnet4J stack and the reverse engineered seroUtils part, but since it is closed I don't want to make it public.
BR