SurgeTelos does not include the Broadcast module.
-Joe
On 12/21/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
> [Problem]
> While I am trying to broadcast packets from PC to motes, the gateway mote
> (node id=0) does receive the message.
> However, it does not forward the message to the next hop.
> **** [code] ****
> try {
> BcastMsg bcast;
> bcast = new BcastMsg();
> bcast.set_seqno(bcast_seqno++);
> bcast_seqno = (short)((bcast_seqno + 1) % 256);
>
> SurgeCmdMsg scm = new SurgeCmdMsg(bcast,bcast.offset_data(0));
> scm.set_type((short)7);
> scm.set_args_gtime(32);
>
>
> MainClass.getMoteIF().send(net.tinyos.message.MoteIF.TOS_BCAST_ADDR,
> bcast);
> //System.out.println(bcast);
>
> } catch (Exception e) {
> e.printStackTrace();
> // Ignore
> }
> **** [End of code] ****
>
> I also use Leds to trace the message on the gateway node.
> It is stocked in the BcastM
> **** [code] ****
> static void FwdBcast(TOS_BcastMsg *pRcvMsg, uint8_t Len, uint8_t id) {
> TOS_BcastMsg *pFwdMsg;
>
> if (((iFwdBufHead + 1) % FWD_QUEUE_SIZE) == iFwdBufTail) {
> // Drop message if forwarding queue is full.
> return;
> }
>
> pFwdMsg = (TOS_BcastMsg *) &FwdBuffer[iFwdBufHead].data;
> //forward_packet.da
> ta;
>
> memcpy(pFwdMsg,pRcvMsg,Len);
>
> dbg(DBG_USR1, "Bcast: FwdMsg (seqno 0x%x)\n", pFwdMsg->seqno);
> if (call SendMsg.send[id](TOS_BCAST_ADDR, Len, &FwdBuffer[iFwdBufHead])
> == S
> UCCESS) {
> iFwdBufHead++; iFwdBufHead %= FWD_QUEUE_SIZE; //***** NOT SUCCESSFUL
> *****/
> }
> }
> **** [End of code] ****
>
> Has anyone tried the broadcast module on telos ??
> Please help .
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help