Other Parts Discussed in Thread: Z-STACK, CC2530
Hello everyone. I do not know whether at that forum I write (I apologize in advance for my English), in general, I have a problem. I learned about 80% of the code of the Z-stack HA and 90% of all the documents located there. For I do not have any secrets about the work of the whole system was built, called the stack (by the way the processor, which I successfully mastering - сс2530), but there are 3 points of which I can not write a proper firmware, namely:
1) ZDOInitDeviche (). Why after calling this function on the destination device begin to happen strange things (although, as described Z-Stack Sample Applications, this function should just run end device). More specifically, the device starts, but begins to overwhelm the NWK frame of type Data_Request, then restarts (Project details below).
2) Where are the functions body of the type NLME_GetExtAddr () . Exactly where the most magical file nwk_util.c ? And where body of nwk_event_loop ? I gathered all the files in one folder stack, launched search and did not find anything about these functions, except "extern TYPE FUNCTION"...
3) Despite the fact that the bodies of the functions listed in paragraph 2 of nowhere, they work! I checked! How is it possible ???
Actually about my project. I'm trying to write firmware for cc2530 based on a sample Z-Stack Home 1.2.0\Projects\zstack\HomeAutomation\SampleSwitch\CC2530DB\SampleSwitch.eww. As for the hardware (lights and buttons) - everything is simple and no questions asked. About how screwed to LOOP the event handler, and how to handle them - also no issues. How to configure end-point, clusters, descriptors - no questions. How do callback functions for each team an individual cluster - also all clear. But how right to start the device - the million dollar question ???
Do you realize I have a problem with network layer.
First, its functionality is hidden because some files can not be found. Second, all that is written about the launch of the documentation Z-Stack Sample Applications (page 3-4) NO JOB.
I was able to run the device how end-device as follows:
1) Registered in the configuration in NV items (ALL DO RIGHT see last drawing)
2) Launch ZDOInitDeviche (see first drawing)
3) delete HOLD_AUTO_STAR preprocessor options
After the previous procedure, ustroysto was started, joined the coordinator, is recognized as end device (it was seen in the sniffer), and began a terrible! From the device to the coordinator became an endless stream of requests to go type of Data_Request. Then at some point the device reboots itself, and then the process was repeated and perepodklyualos...
I began to look for the cause of this behavior and found that the above-described horror begins after ZDApp_event_loop manager intercepts an event [ if ( events & SYS_EVENT_MSG ) ] wherein the processor ZDApp_ProcessOSALMsg intercepts an event :
case ZDO_NWK_JOIN_IND:
if ( ZG_BUILD_JOINING_TYPE && ZG_DEVICE_JOINING_TYPE ){
// this condition is satisfied
ZDApp_ProcessNetworkJoin(); // this function will be called
}
break;
Drip deeper does not make sense, because I'm so very deep in the stack. So what do I do with this?
Lastly, I want to ask all do not give me advicetype of "reading anything", because i reading ALL DOCUMETS of Z-Stack HA, thanks in advance =).

