Thank you all for your help, finally I decided to get the output from
the motelist program, because the javax-usb seems to be outdated.
Finally, I got my program to connect to the serial port automatically.

My problem now is how to get the program to read the packets from the
serial port.  I know that there is a messageReceived(int to, Message
m) method that is launched whenever a message of a specific type is
received. However, how can I define it to read any type of message as
if it where a sniffer?

Thanks

El día 5 de octubre de 2009 09:38, Urs Hunkeler <[email protected]> escribió:
> Hi all,
>
> I solved this issue the following way: I include the different versions of
> motelist for the different operating systems (and platforms) as resources
> inside the jar file of the application. Make sure you also include the
> library dependencies (I think motelist on windows needs cygwin.dll). When
> the application starts, it detects the operating system with a call to
> System.getProperty("os.name") (or something like that), then extracts the
> right version of motelist to a temporary directory and executes it from
> there (Runtime.getRuntime().exec() or something like this).
>
> Cheers,
> Urs
>
>
> Raffaele Gravina wrote:
>>
>> Hi,
>>
>> I think another solution could use JAVA USB (btw, AFAIK it's also OS
>> dependent) to obtain the description of the usb devices attached to the
>> local machine and parse them to find e.g. a "Crossbow Telos Rev.B". Note
>> that no matter the way you choose to find "motes" attached, you can't be
>> sure if it's a Basestation or not, and if you have multiple motes attached
>> but just one of them runs e.g. the Basestation, I guess you'll need some
>> "indirect" trick to locate which one it is.
>> Please keep me posted on what you come up with... i'd really appreciate!
>>
>> Thanks,
>>
>> Raffaele
>

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to