[Z-Stack] SampleApp 시작하기

2010년 01월 12일 by klklkl

    [Z-Stack] SampleApp 시작하기 목차

1. 관련 소프트웨어 설치
  1) Z-Stack CC2430 1.4.3-1.2.1
  2) IAR EW8051 7.30B

2. Coordinator에 SampleLight 포팅
  1) SampleApp.eww를 불러온다.
  2) Workspace에서 DemoEB를 선택한다.

  3) Project메뉴에서 Rebuild All을 선택한다.
  4) Rebuild가 완료되면 Debug를 한다.
  5) 포팅이 완료되면 Debug를 멈춘다.
  6) SmartRF04EB를 재부팅한다.


재부팅후 각각의 보드에서 IEEE Address가 표시되는 것을 볼 수 있다.

3. SampleApp 실행
  1) 두개의 보드중 하나의 보드가 Coordinator가 되기 위해서는 Jumper설정을 해주어야 한다. 다른 하나는 자동으로 Router가 된다.
  2) Coordinator, Router 순으로 재부팅한다.

P10-9 와 P10-11의 점퍼 배치

4. 동작
  1) Coodinator는 ZigBee 네트워크에 접속한다.
  2) 재부팅 후 Router에서는 LED1이 깜빡이며 네트워크 접속을 위한 채널을 스캔을 한다.


5. SampleApp에 대한 설명
  - Periodic(about 5 seconds) broadcast of a message to all network devices
  - When button SW1 is pressed, broadcast of a message to devices subscribed to Group1
  - When button SW2 is pressed, toggles a device's membership in Group1

When each SampleApp device starts up, it is subscribed to Group 1 and will receive and process messages sent to Group1 from any other device. In this demonstration, a device will flash its LED1(Green) when a Group1 message is received. So, when the network is initially started up, pressing button SW1 on any device will broadcast a message, causing all of the other devices to flash their LED1. Pressing button SW2 on a device toggles that device's membership in Group1, allowing the user to enable/disable LED1 flashing on that device.

The disussion above assumes each device has been programmed and disconnected from the development PC. When necessary, a target device can be controlled from the IAR IDE, providing for standard debuggin features such as breakpoints, single-stepping, viewing of memory and register contents, etc.