Hi, How about a this approach: From java you call the motelist command and extract the list of all connected motes. You then *dynamically* connect to each of the motes.
If you want to be even more dynamically, you could periodically check (by calling the motelist command repeatedly) whether the list of connected motes has changed. The only problem is that if you are removing a mote, the default error handler will call System.exit() and thus your program terminates without a chance to recover. I have written a work-around for this somewhere on the tinyos mailing list. Cheers, Urs Chad Metcalf schrieb: > I'm with Michael on this one. If your mote hardware has what it takes > to hook up to a PC (serial, USB, etc) or a Gateway (Tmote Connect, > etc) then it doesn't matter what application you run on it. > > Some T2 application sends data over the serial to a serial forwarder. > Your application hooks up to this SF via a MoteIF. Your application > can have as many MoteIFs up as you want. I just had 52 up without > breaking a sweat. > > Lightly covered here: > http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson4.html > > Now if your problem is with the SF then maybe you should look at at a > different SF, like the C or C++ one. Or maybe your problem is > elsewhere. > > Cheers > Chad > > On 9/18/07, Michael Schippling <[EMAIL PROTECTED]> wrote: >> Lets run this back to the help list, since I don't fully understand the >> question.... >> >> If you want a physical connection between mote and PC you need one >> MIB5x0 (or whatever) and one USB or serial 'port' per mote. Aside >> from expense, I don't know that there is any limit to the number >> of any of those you may use (well, maybe 256 ports or something...). >> >> I'm not sure why you want so many base-stations. We may have >> a terminology problem because your use of "server" and "client" >> has me confused. But if what you really want is a bunch of motes >> hardwired to a PC, then the approach metcalfc and I have outlined >> should do you fine. Each PacketSource is directly mapped to a single >> port, and thus a single mote, and keeping track of which is which is >> just, as they say, a matter of software... >> >> MS >> >> [EMAIL PROTECTED] wrote: >>> I'm using tinyos-2.0,I think that that will work as >>> Michael proposed but it still limits the number of >>> base station that I can connect and also all theses BS's >>> should be physically connected to the pc. >>> >>> The whole idea is that I have several base stations as clients >>> and one sever.Each client wants to connect to the sever in >>> order to send sensing messages to its table in a data base. >>> In the other words, the application is just a datalogger. >>> So if my server receives a sensing message it should know >>> to which table should send it. >>> For instance,I have a single client version of this application >>> (one BS communicates with one application)but I try to create >>> a multiclient version. >>> BB. _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
