Microchip
CCS
HA MX3cK Code was written using:
Serial Input/Output Monitor
Microchip XC32; MPLAB X
www.ccsinfo.com
www.microchip.com
; Screenshot 4. There is a lot of
important information
displayed here. The Combined
Interface established a PAN
with a PANID of 2468 on
channel 11. A remote full
function device joined the
PAN and was assigned a device
ID of 9EFF.
; Screenshot 5. The Five-In-One
device is running under the
control of Telegesis Terminal.
Once the Combined Interface
embedded device allowed
joining, the Five-In-One device
accepted the invitation to join
PAN 2468.
the join window timeout parameter. When not specified,
the default join timeout is 60 seconds. I decided to
include the optional parameter in our command
sequence:
Boom! Boom! Out Go the Lights
int main (void) { init(); sendATI(); //send ATI leaveNetwork(); //send AT+DASSL formNetwork(); //send AT+EN:11,3,2468 permitJoining(0x42); //send AT=PJOIN:0x42 do{//wait for and display incoming //characters if(CharInQueue()) { biteIn = recvchar(); printf(“%c”,biteIn); } }while(1); }
All of the Telegesis HA AT commands are issued
exactly like we have witnessed. So, all that’s left now is to
control some lighting, check some temperatures, and add
Telegesis home automation development to your design
cycle. NV
As you can see, our join timeout is set for 66 seconds.
As the join timeout clock is ticking, I reached over
and clicked on the Join any PAN button on the Telegesis
Terminal console attached to the Five-In-One device. The
AT+JN command was issued to the Five-In-One device
which scanned the ether and found a PAN on channel 11
with a PANID of 2468. Since it can join any PAN and PAN
2468 is the only one available, communications with the
Combined Interface device were established. Screenshot
5 details the Five-In-One side of the conversation.
The final line of the Combined Interface device
response in Screenshot 4 acknowledges the acceptance
of the Five-In-One device into the PAN. The Five-In-One
device has identified itself as a full function device and
exposed its 64-bit EUI. The Combined Interface device
assigned the Five-In-One device an ID of 9EFF, which is
verified by the Five-In-One device.
September 2013 63