|
I had traced the surge program for
many times.
The root beacon has been implemented as the
following.
But while I press the button and trigger it to send
packet.
The serialforward(the java program) just
stop to receive any message from those sensors. (I can still send other
SurgeCmdMsg or MultihopMsg at this moment)
On the other hand, since I can send message instead
of using the Thread. I doubt it is the problem of thread
implementation.
Have anyone encountered this problem?? Please
give some comments.
*** Code in Surge***
class rootBeaconer implements
Runnable { private boolean stopped =
false; private long delay_ms =
DEFAULT_BEACON_RATE; private MultihopMsg
beacon; private short cur_seqno = 0;
rootBeaconer()
{ beacon = new MultihopMsg();
//SurgeMsg();
beacon.set_originaddr(BEACON_BASE_ADDRESS);
beacon.set_sourceaddr(BEACON_BASE_ADDRESS);
beacon.set_hopcount((short)1); }
public void run()
{ stopped =
false; while (!stopped)
{ try
{
beacon.set_seqno(cur_seqno++);
MainClass.getMoteIF().send(net.tinyos.message.MoteIF.TOS_BCAST_ADDR, beacon);
if (DEBUG_MODE) System.err.println("SENDING BEACON:
"+beacon);
//bcast_seqno = (bcast_seqno + 1) %
256;
//beacon.set_seqno((short)bcast_seqno);
Thread.currentThread().sleep(delay_ms);
} catch (Exception e)
{ //
Ignore
}
} return;
}
void setDelay(long delay)
{ delay_ms =
delay; }
*** end of code ***
----- Original Message -----
Sent: Friday, December 23, 2005 12:35
PM
Subject: Re: [Tinyos-help] SurgeTelos apps
and surge/JAVA program
Hi Chiang,
Maybe there's no implementation for the beacon method in java
application,
Take a look at the code.
Good Luck,
Chalermphol
On 12/22/05, 姜瑞豪 Steve
Chiang <[EMAIL PROTECTED]>
wrote:
Dear all:
I have some problems about ucb/SurgeTelos app (combined
with the surge program in java)
[Environment]
Moteiv tmote sky Tools CD v1.11 (upgraded)
2 tmote with SurgeTelos program (node id = 0 and
3)
[Programs]
tinyos1.x/contrib/ucb/apps/SurgeTelos
tinyos1.x/tools/java/net/tinyos/surge (compiled with
SURGE_PLATFORM=telos)
[Run]
java net.tinyos.sf.SerialForwarder -comm
[EMAIL PROTECTED] :tmote java net.tinyos.surge.MainClass 0x6e
******** [Problem1] *******
While I start the application, I could see 2 node linked
together and they sent Multihop message via serial port to PC.
But when I tried to "Start root beacon" in the java (surge)
program).
The serial forwarder just "write messages" (no "read" messages is
coming from those motes. Also, the tx Leds of the gateway mote is not
shinning.)
It is strange that those motes are still sending multihop
messages. But the serial forward just stop forwarding them to PC.
What happened to the "root beacon"?? in surge
MESSAGE RECEIVED: Message <MultihopMsg>
[sourceaddr=0x0] [originaddr=0x0] [seqno=0x0]
[originseqno=0x0] [hopcount=0x0] [data="" 0x0 0x0 0x0
0x7e 0x0 0x3 0x0 0x0 0x0 SENDING BEACON: Message <MultihopMsg>
[sourceaddr=0x7e] [originaddr=0x7e]
[seqno=0x0] [originseqno=0x0] [hopcount=0x1]
[data="" 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
0x0 0x0 ] ************* serial forward no longer received
messages from motes......
Please help
_______________________________________________ Tinyos-help
mailing list [email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
|