| Author |
Message |
|
|
Posted: Feb 02, 2012 - 11:54 AM |
|

Joined: Oct 09, 2001
Posts: 4
Location: North Narrabeen, Australia
|
|
G'Day Everyone,
I'm having a problem with my end device not connecting to the CoOrdinator.
When I had a static EXT_PANID in my CO & ED everything works find but if I change the ED CS_EXT_PANID to 0x00LL so that it should connect to any network I get a 0xCA response from the ZDO_StartNetworkReq.
I am using the WSDemo as a base. BitCloud v1.12
(I just downloaded 1.13)
CS Parameters
CoOrdinator
#define CS_DEVICE_TYPE DEVICE_TYPE_COORDINATOR
#define CS_EXT_PANID 0x5854484353545354LL
#define CS_UID 0x58544947C0A80157LL
#define CS_NWK_UNIQUE_ADDR true
#define CS_NWK_ADDR 0x0000
End Device
#define CS_DEVICE_TYPE DEVICE_TYPE_END_DEVICE
#define CS_NWK_PREDEFINED_PANID false
#define CS_EXT_PANID 0x00LL
#define CS_UID 0x5854544245441001LL
#define CS_NWK_UNIQUE_ADDR false
#define CS_NWK_PANID 0x0000
From what I understand from the documentation the ED should connect to the network at be assigned a EXT_PANID and NWK_ADDR.
Thank for your assistance.
Jim |
|
|
| |
|
|
|
|
|
Posted: Feb 04, 2012 - 06:16 PM |
|


Joined: Apr 15, 2009
Posts: 4861
Location: San Jose, CA
|
|
| This should work. Unfortunately I'll be traveling for the next couple weeks without access to the hardware, so I can't check why it does not work. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
|
| |
|
|
|
|
|
Posted: Feb 07, 2012 - 10:24 AM |
|

Joined: Jun 11, 2010
Posts: 42
|
|
Hello,
for ED try
#define CS_NWK_UNIQUE_ADDR true //just like C
#define CS_NWK_ADDR 0x0002 |
|
|
| |
|
|
|
|
|
Posted: Feb 08, 2012 - 12:24 PM |
|

Joined: Jun 11, 2010
Posts: 42
|
|
Hello alex,
I established a network with an C and R with param as follow
Code:
DeviceType_t deviceType = DEVICE_TYPE_COORDINATOR;
uint16_t nwkAddr=0;
ExtAddr_t nwkUID = 1;
bool rxOnWhenIdle = false;
uint8_t sleep = 10000;
CS_WriteParameter(CS_UID_ID, &nwkUID);
CS_WriteParameter(CS_NWK_UNIQUE_ADDR_ID, &(bool){true});
CS_WriteParameter(CS_NWK_ADDR_ID, &nwkAddr);
CS_WriteParameter(CS_DEVICE_TYPE_ID, &deviceType);
CS_WriteParameter(CS_RX_ON_WHEN_IDLE_ID, &rxOnWhenIdle); CS_WriteParameter(CS_END_DEVICE_SLEEP_PERIOD_ID, &sleep);
uint32_t nwkChanel = 0x100000L;
ExtPanId_t nwkPANID = 0x0000000000001620LL;
PanId_t nwkShortPANID = 0x1620;
bool predefPANID = true;
CS_WriteParameter(CS_NWK_PREDEFINED_PANID_ID,&predefPANID);
CS_WriteParameter(CS_CHANNEL_MASK_ID,&nwkChanel);
CS_WriteParameter(CS_EXT_PANID_ID,&nwkPANID);
CS_WriteParameter(CS_NWK_PANID_ID,&nwkShortPANID);
for the R the code is almost the same the changes are
Code:
DeviceType_t deviceType = DEVICE_TYPE_ROUTER;
uint16_t nwkAddr=10;
ExtAddr_t nwkUID = 10;
Everything is well and the network working fine, but I failled to make an ED joins the network
Code:
DeviceType_t deviceType = DEVICE_TYPE_END_DEVICE;
uint16_t nwkAddr=20;
ExtAddr_t nwkUID = 20;
I always get the error code 0x00C3 I found the meaning within other threads here by you and it's an NWK_NOT_PERMITTED_STATUS! why? I don't know! the CS_UID are different, the ED code is the same for router only devicetype and nwk address changed , I tried almost everything I got in mind but vainly. Sure I missed something.
PS: I'm using BitCloud 1_13 and AvrStudio 5
Thanks |
|
|
| |
|
|
|
|
|
Posted: Feb 08, 2012 - 04:15 PM |
|


Joined: Apr 15, 2009
Posts: 4861
Location: San Jose, CA
|
|
| You need to set rxOnWhenIdle == true for C and R and == false for ED. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
|
| |
|
|
|
|
|
Posted: Feb 09, 2012 - 06:49 AM |
|

Joined: Jun 11, 2010
Posts: 42
|
|
| Well I tried this before posting here. I saw somewhere in ATMEL datasheet or as a comment in configuration.h files, this parameter is ignored for R and C. |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2012 - 11:00 AM |
|

Joined: Jun 11, 2010
Posts: 42
|
|
I changed make CONFIG_NAME = All_Zigbit_Atmega1281_Rf230_8Mhz_Gcc with CONFIG_NAME = EndDevice_Atmega1281_Rf230_8Mhz_Gcc
and it's working. |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2012 - 04:06 PM |
|


Joined: Apr 15, 2009
Posts: 4861
Location: San Jose, CA
|
|
| That still means that something is wrong. Now you just forced it to be an ED. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
|
| |
|
|
|
|
|
Posted: Feb 10, 2012 - 06:41 AM |
|

Joined: Jun 11, 2010
Posts: 42
|
|
| Thanks alex. Yes, sure but as I didn't find the root cause, I sent an issue to avratatmel and I'm following. |
|
|
| |
|
|
|
|
|