1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Zigbee 24j40

Discussion in 'Microcontrollers' started by wa7ed, May 11, 2010.

  1. wa7ed

    wa7ed New Member

    Joined:
    May 11, 2010
    Messages:
    5
    Likes:
    0
    I've bought PICDEM Z Demonstration Kit for zigbee (MRF24J40), which includes:
    Two PICDEM Z demonstration boards each with an RF transceiver daughter card.

    I followed AN1232 - ZigBee 2006 Protocol Stack

    I've installed the demo applications for both: Coordinator and RFD and it worked well.

    I want to modify the source code and add some functions, but the available codes and functions are a bit complicated.

    For example ; underlined codes are new for me

    Code:
    case '2':
    printf("\r\nHow many bytes are you requesting(hex): ");
    TxBuffer[TxData++] = GetMACByte();
    ZigBeeBlockTx();

    params.APSDE_DATA_request.DstAddrMode = APS_ADDRESS_16_BIT
    printf("\r\nWhat is the short address of device you want data from: ");
    params.APSDE_DATA_request.DstAddress.ShortAddr.v[1] = GetMACByte();
    params.APSDE_DATA_request.DstAddress.ShortAddr.v[0] = GetMACByte();
    params.APSDE_DATA_request.RadiusCounter = DEFAULT_RADIUS;

    params.APSDE_DATA_request.DiscoverRoute = ROUTE_DISCOVERY_SUPPRESS;


    #ifdef I_SUPPORT_SECURITY
    params.APSDE_DATA_request.TxOptions.Val = 1;
    #else
    params.APSDE_DATA_request.TxOptions.Val = 0;
    #endif
    params.APSDE_DATA_request.TxOptions.bits.acknowledged = 1;
    params.APSDE_DATA_request.SrcEndpoint = 1;
    params.APSDE_DATA_request.DstEndpoint = 240;
    params.APSDE_DATA_request.ProfileId.Val = 0x7f01;
    params.APSDE_DATA_request.ClusterId.Val = BUFFER_TEST_REQUEST_CLUSTER;
    currentPrimitive = APSDE_DATA_request;
    break;

    /* Request Data From a group of devices */


    The programme is made to operate on Hyper Terminal.. How can i change this to another GUI like Visual Basic..[/code]
     
  2. wa7ed

    wa7ed New Member

    Joined:
    May 11, 2010
    Messages:
    5
    Likes:
    0
    I'd change my post & my question to :

    I've bought PICDEM Z Demonstration Kit for zigbee (MRF24J40), which includes:
    Two PICDEM Z demonstration boards each with an RF transceiver daughter card.

    I followed AN1232 - ZigBee 2006 Protocol Stack

    I've installed the demo applications for both: Coordinator and RFD and it worked well.

    I want to modify the source code and add some functions, but the available codes and functions are a bit complicated for me.

    1. How can I change the data sent/requisted by the Coordinator or the RFD so that I can add a temperature sensor ...

    The programme is made to operate on Hyper Terminal..

    2. How can i change this to another GUI like Visual Basic..

    here are the files needed
    secsoftwaredownload
     
  3. wa7ed

    wa7ed New Member

    Joined:
    May 11, 2010
    Messages:
    5
    Likes:
    0
    Waiting for your help
    =)
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada

    Your question is too broad. You're basically saying "I have this really complicated system, how do I use it?"

    You're not going to find any simple answers here and anything less than a book on this is going to fall short of answering your questions. I think you've bitten off more than you can chew here.

    Your question regarding Visual Basic doesn't make any sense. You write a visual basic program to read and write to the virtual com port, which would take the place of Hyperterminal.
     
  6. Oznog

    Oznog Active Member

    Joined:
    Apr 21, 2004
    Messages:
    2,879
    Likes:
    11
    Location:
    Austin, Tx
    Like DirtyLude says, I assume YOUR code would need to use the ZigBee 2006 Protocol Stack code to talk through the module, then decide how to interact through the UART through to the PC's serial port with a Hyperterminal or Visual Basic program... or, though a USB virtual COM port. The Zigbee code has nothing to do with that.
     
  7. wa7ed

    wa7ed New Member

    Joined:
    May 11, 2010
    Messages:
    5
    Likes:
    0
    Thanks guys for replying ..
    Yes, I think my question is not clear enough..

    *WHERE EXACTLY the data is being received (saved) in the destination node ?
     
  8. hippo_kute

    hippo_kute New Member

    Joined:
    Jun 2, 2010
    Messages:
    1
    Likes:
    1
    case BUFFER_TEST_RESPONSE_CLUSTER:
    {
    BYTE len = APLGet();
    printf("\r\n Len: ");
    PrintChar(len);
    printf("\r\n");
    printf("From Address: ");
    PrintChar(params.APSDE_DATA_indication.SrcAddress.ShortAddr.byte.MSB);
    PrintChar(params.APSDE_DATA_indication.SrcAddress.ShortAddr.byte.LSB);
    printf("\r\n");
    for(i = 0; i < len+1; i++) {
    ConsolePut(APLGet());
    }
    printf("\r\n");
    }
    break;
    This code will print the received data. Your codes are ZigBee tasks.If you want to interact with VB,for ex,writing a program in VB which used to receive data from serial com port.
     
    • Like Like x 1
  9. wa7ed

    wa7ed New Member

    Joined:
    May 11, 2010
    Messages:
    5
    Likes:
    0
    THANK YOU hippo_kute Very Much
    That was the answer i was looking for


    Best Regards.
    Wa7ed.
     

Share This Page