|
I've fallen into radio silence mode again recently since I got the simulator working. The last few weeks have been pretty tough with all of my simulator issues, but for the past three days, it has been working well. After my big coding session on Thursday, I got things to the point where the sim runs stably which allowed me to move forward on actually testing the stack. As of today, I was able to get 10 nodes joined on to the same network which was quite a big accomplishment. That means that the first node was able to form the network, and the other nodes were able to communicate the handshake correctly to finish the join procedure. The addressing is also correct and follows the distributed addressing formula correctly in the spec. Actually, it wasn't easy getting to my current point. Once I got the stack working in the simulator, I found and cleaned up many bugs. They ranged from stupid ones like reversing the bit definitions in one of the header fields to agonizing such as a re-entrancy issue I had when my (simulator) thread called a non-reentrant stack function. Also, things got exponentially more complicated to debug as the size of the network grew. I ran into some problems that would only occur after my network grew to 8 nodes. That one turned out to be a buffer pool issue, but it was hard to track down because there were so many things going on simultaneously. Especially on the join procedure, there's a lot of broadcasts that occur so all of my node consoles were scrolling like crazy.
All-in-all, it wasn't too bad, especially since I was able to clean up most of the join issues that I found within a few days. I think that's one of the advantages to being the sole designer of a piece of software. You know where everything is and you have a mental map of the software structure so it's much easier to track down issues. It's also nice to be able to use GDB. Since everything is run as a separate process, you can just start up a node, get the system PID and then attach GDB to that particular node. I actually used GDB to locate the re-entrancy issue by setting a breakpoint on a memory address. It's hard to find that kind of luxury in a JTAG debugger. Now that things are moving along nicely, I need to take some time to create a test plan. Otherwise, I'm just going to be testing indefinitely. The idea I have right now is to come up with a set of basic tests, and after I can get them to pass with the code, then I'll do a release. I want the stack to at least be able to do basic data transfers including multi-hop ones inside the sim, and not crash when doing them. At that point, I think the code would probably be at v0.4 or v0.5, with a v1.0 being a stack that can be taken to Zigbee compliance. The release would of course include the source code and the simulator, but unfortunately there's no documentation yet. I need to set aside a block of time (like say a month) just to write documentation, but I probably won't do that until I can get it to around v0.8. That would be like finishing the application layer as well as having the NWK and MAC layers completely working. So anyways, I have a TODO list that's a mile long. As well as creating the test plan, I need to start the hardware design, layout, and driver because I'm planning on going into hardware once the mesh data transfers are stable. As for tasks further in the future, I still need to write the application layer, fill in the missing management functions on the MAC, NWK, and APS, write the security manager, and put together an over-the-air bootloader. Whew!! Once that's all finished, I hope somebody buys me a beer. Cheers!
Trackback(0)
|