How to start a Beaconing Node who is not PAN Coordinator?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to start a Beaconing Node who is not PAN Coordinator?

2,153件の閲覧回数
kevinlee
Contributor I
Hello all, coule you tell me how to set up a beaconing node who is not PAN Coordinator. Although i did it according to the appendix of 802154MPSUG.pdf, once i set the value of the macTreemodeStartTime, it always return invalidate parameter. I dont know why. Could you give some sample code about Beaconed tree? Thousands of thanx to u.

Message Edited by kevinlee on 06-02-2006 06:26 AM

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

698件の閲覧回数
marcial
Contributor I
Hi, I got a similar problem.

I've set the beacon order to 7 and the super frame order to 1.


When I set the macTreemodeStartTime for example to 2000 symbols, I don't receive an invalidate parameter as return value. But as soon as the node is associated to the PAN coordinator and is starting beaconing, I receive a Sync Loss message.

As you posting date is quite old: Do you have already solved you problem?
If not I could send you a code snippet the way I did.
And if you have a solution could you tell me what I have to do to avoid the sync loss?
0 件の賞賛
返信

698件の閲覧回数
dosfreak622
Contributor I
Hi,

I am trying to do the same but I don't get that far - I can't get MLME-SYNC to succeed. According to the steps in the user guide I need to synchronise to the incoming beacon. I am using an MC9S08GT60 coupled to an MC13193. There is a working PAN coordinator present. I have tried Beacon orders of 1, 3, 4 and 7.

Here is my source:

uint8_t App_TrackParentBeacon(void) {
  uint8_t ret;
  uint8_t b_order;
  uint8_t s_order;
  mlmeMessage_t *pMsg;
  mlmeSyncReq_t *pSyncReq;


  b_order = BEACON_ORDER;
  s_order = SUPERFRAME_ORDER;

  pMsg = MSG_AllocType(mlmeMessage_t); 
  /* Set Beacon Order */
  pMsg->msgType = gMlmeSetReq_c;
  pMsg->msgData.setReq.pibAttribute = gMPibBeaconOrder_c;
  pMsg->msgData.setReq.pibAttributeValue = &b_order
  ret = MSG_Send(NWK_MLME, pMsg);
  if (ret != gSuccess_c) {
    Uart_Print("set beacon order failed.\n");
  }

  /* Set Super frame Order */
  pMsg->msgType = gMlmeSetReq_c;
  pMsg->msgData.setReq.pibAttribute = gMPibSuperFrameOrder_c;
  pMsg->msgData.setReq.pibAttributeValue = &s_order
  ret = MSG_Send(NWK_MLME, pMsg);
  if (ret != gSuccess_c) {
    Uart_Print("set superframe order failed.\n");
  }
  MSG_Free(pMsg);

  pMsg = MSG_AllocType(mlmeMessage_t);
  pSyncReq = &pMsg->msgData.syncReq;

  if (pMsg != NULL) {
    pMsg->msgType = gMlmeSyncReq_c;
    pSyncReq->trackBeacon = TRUE;
    pSyncReq->logicalChannel = logicalChannel;
         
    if (MSG_Send(NWK_MLME, pMsg) == gSuccess_c)
    {
      Uart_Print("App_TrackParentBeacon succeeded.\n");
      return errorNoError;
    }
    else
    {
      Uart_Print("App_TrackParentBeacon failed.\n");
      return errorNotSuccessful;
    }
  }
}


Before this code executes my node associates with the PAN coordinator successfully and can send/receive ok. I receive the "App_TrackParentBeacon failed" message through the UART, indicating that MLME-SYNC does not succeed. Is there something wrong with my source code that I can't see (apart from freeing the message)?

Thanks in advance.
0 件の賞賛
返信

698件の閲覧回数
yanzexuan
Contributor I
   pMsg = MSG_AllocType(mlmeMessage_t);

      
    pMsg->msgType = gMlmeSetReq_c;
    /* PAN ID */
    pMsg->msgData.setReq.pibAttribute = gMPibPanId_c;
    pMsg->msgData.setReq .pibAttributeValue = g_AdptInfo.panID.v ;
    MSG_Send(NWK_MLME,pMsg);
    /* autorequest */
    pMsg->msgData.setReq .pibAttribute = gMPibAutoRequest_c;
    iRtn = TRUE;
    pMsg->msgData.setReq.pibAttributeValue = &iRtn;
    MSG_Send(NWK_MLME,pMsg);
    /*  */
    pMsg->msgData.setReq.pibAttribute
     = g_AdptInfo.coordAddrMode == gAddrModeShort_c?gMPibCoordShortAddress_c:gMPibCoordExtendedAddress_c;
    pMsg->msgData.setReq .pibAttributeValue = g_AdptInfo.coordAddr;
    MSG_Send(NWK_MLME,pMsg);
    /* Pan id conflict */
    pMsg->msgData.setReq.pibAttribute = gMPibPanIdConflictDetection_c;
     iRtn = FALSE;
     pMsg->msgData.setReq.pibAttributeValue =(UINT8*) &iRtn;
     MSG_Send(NWK_MLME,pMsg);
     /*  */
    pMsg->msgType = gMlmeSyncReq_c;
    pMsg->msgData.syncReq.logicalChannel = g_AdptInfo.logicalChannel;
    pMsg->msgData.syncReq.trackBeacon = TRUE;
    iRtn = MSG_Send(NWK_MLME,pMsg);
0 件の賞賛
返信