Continue to Site

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.

  • 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.

Zigbee 24j40

Status
Not open for further replies.

wa7ed

New Member
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]
 
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
 
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.
 
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.
 
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 ?
 
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 ?
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.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top