On 6/4/07, Ákos Maróy <[EMAIL PROTECTED]> wrote:
David Gay wrote:
> As the previous mails mentioned, our experience so far is that
> "working properly" and "using JavaComm" have not been a good
> combination. Fixing the issue in TOSComm is probably easier (at a
> guess, from the discussion, I would guess there's a 64-bit-related bug
> - the code is clearly working fine for a bunch of other people, who
> probably are using 32-bit OSes).

well, I have used JavaComm for various purposes, such as reading GPS
information through the NMEA-183 protocol, or control industrial scale
automation systems controlling robots using the 3964r protocol. All this
on various platoforms (Linux x86 and MacOS X on G4), and it all worked fine.

Well the earlier state was:
- you had to install it separately from Java itself (so one more install step)
- if I'm not misremembering, Sun's version didn't support Linux for a long time
- closing ports tended to hang (can't remember which version)
- IBM's version for Linux only supported devices names /dev/ttySn (USB
serial port? What's that?), plus the package was hard to find and
tended to move around...


Whereas now I get either segfaults, or if I don't get them, it still
doesn't work.

It's also probably safe to say that the penetration of JavaComm is wider
than TOSComm, and therefore it's more thoroughly tested and verified for
reliability. I would also argue that even though you might have had a
bad experience with some JavaComm implementations, it might have been an
overkill designing a new interface for this purpose.

But anyway - as you guys know the TinyOS codebase a lot better - where
would I replace TOSComm in the Java code with JavaComm? Should I
re-implement the TOSSerial object to use JavaComm calls instead of the
JNI ones? Or create another object implementing the SerialPort
interface, and make sure that's used all over the code?

You just need to replace net/tinyos/packet/SerialByteSource.java. And,
conveniently, there's already a javacomm implementation, in
tinyos-1.x/tools/java/net/tinyos/packet/SerialByteSource.java (get it
from sourceforge CVS if you don't have tinyos 1.x installed), which by
the look of it should just function as is...

David Gay

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to