SCREENSHOT 7. Once the Mi Wi Coordinator declared itself King, I fired up the Mi Wi End Device. As you can see, the Mi Wi
End Device sensed the King’s new domain and wants to associate with (join) the Mi Wi Coordinator’s network.
SCREENSHOT 8. Even though the application sent the byte with long and short addresses, the Mi Wi MAC is programmed to
send a report with the least cost to the MAC. Thus, the report was sent using the short address both times.
SCREENSHOT 9. From source and destination addresses in this ZENA capture, we can see that the Mi Wi Coordinator (0x0000)
has sent a report to the Mi Wi End Device (0x0081).
Do you see the definitions in the Screenshot 8
capture? Here’s a code snippet from the Mi Wi application
main.c file that tells us how the Mi Wi stack parses the
definitions we just exposed in the Mi Wi.h file:
switch(*pRxData++) //report type
switch(*pRxData++) //report id
//first byte of payload
LED_2 = 1;
LED_2 = 0;
LED_2 ^= 1;
ConsolePutROMString((ROM char*)”Received Report
to Toggle Light\r\n”);
54 SERVO 04.2010
The code trail we’ve followed enables us to associate
the report payload data byte (0x55) in the ZENA trace to
the LIGHT_TOGGLE command which is parsed from the
report frame that was transmitted by the Mi Wi End Device.
The Mi Wi End Device LED toggle code is duplicated in the
Mi Wi Coordinator. I generated Screenshot 9 with a Mi Wi
Coordinator button press.
No Pointy Hat Required
Microchip has taken the complexity out of 802.15.4
networking. With what we’ve discussed today, you have the
ability to eliminate the wires between your robot’s internal
subsystems and monitor sensors, and can even build a
wireless burglar alarm using MRF24J40MA modules and the
Mi Wi stack. It’s a wireless world, and you and your
mechanical animal should be playing in it. SV