cc back to the help list...because this is only my opinion...
Look at the various motelist impls. Someone posted a perl one
recently, and the standard TOS Windows one is C++. Java has the
feature that it doesn't know squat about the underlying OS ("they"
even removed the System.getenv() method early on for no reason)
so any specialized function needs to be done with JNI. You could
encapsulate the motelist functions in Java I suppose but they
would still be system dependent.
MS
Rubén Ríos del Pozo wrote:
> Thank you Michael for your fast reply. I can infer from your answer that
> the only way of getting my app to work automatically (i.e. retrieving
> the port number) is launching the motelist command from the Java app and
> somehow to parse the output of the motelist command, am I right? Any
> other suggestions?
>
> Thanks!
>
>
> Michael Schippling escribió:
>> To my knowledge NO... motelist relies on various OS hacks to
>> find certain USB devices, the registry in Widows and parsing
>> the boot messages in Linux I think, and there is no common
>> way to determine what is attached to a regular serial port.
>>
>> Kinda makes you wish JINI hadn't gone down the swirler...
>> MS
>>
>>
>> Rubén Ríos del Pozo wrote:
>>> Dear all,
>>>
>>> I am writing a Java application to read and send data to sensor motes
>>> from my PC. I was wondering if tinyos.jar provides any means of
>>> obtaining the port number (COM), to which my sensor node is
>>> connected, without the need of executing the "motelist" command and
>>> using this information as input to the program. I would like my
>>> program to be able to do it automatically without the need of user
>>> intervention.
>>>
>>> Thanks in advance
>>>
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> [email protected]
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help