보드를 준비합니다.
l JB100 Zigbee Module (2.4GHz 지그비 모듈): 2ea
l Zigbee Module Debug Expansion Board
(CM-Zx-Debug) : 1ea
l Zigbee Download Module [ CM-CC-DEBUGGER ] : 1ea
l USB to UART Board [ CM-Zx-Serial ] : 2ea
l 10 Pin Flat Ribbon Cable : 1ea
l 8Pin Cable : 2ea
l Mini USB cable : 1ea
이미지와 소스는 아래 링크 된
것을 다운로드 합니다.
http://crztech.iptime.org:8080/Release/Zigbee/JB100-Zigbee/JB100-ZNP-Test-Image/
에서
JB100-CC2530ZNP-Test.hex
파일을 다운로드 합니다.
보드와 PC는 아래와 같이 연결합니다.
Zigbee Download Module [ CM-CC-DEBUGGER ] 로 다운로드를
합니다.
http://crztech.iptime.org:8080/Release/Zigbee/JB100-Zigbee/JB100-ZNP-Host-Example/
에서 Host 컨트롤하는 프로그램을 다운로드 받습니다.
GNU GCC로 컴파일을 해야 하므로 Linux가 설치된 PC나
Cygwin을 설치하면 됩니다.
Linux PC 설치가 되어 있어 linux PC에 연결하여 테스트를 진행 해 보겠습니다.
환경은 Cygwin + MINGW 설치 또는 Linux PC 에서 작업
JB100 보드는 최소 2개 이상 필요합니다.
$cd
examples/dataSendRcv/build/gnu/ $
make |
컴파일을 하면 이미지가 만들어집니다.
“Makefile”
수정을 하여 ARM용으로도
만들 수 있습니다.
ARM용 : CROSS_COMPILE=/opt/arm-2010q1/bin/arm-none-linux-gnueabi- Linux
PC용 : CROSS_COMPILE=/usr/bin/ |
$
sudo ./dataSendRcv.bin /dev/ttyUSB0 |
위와 같이 명령을 입력하면 아래와
같이 메시지가 나옵니다.
1대는 COORDINATOR로
설정합니다.
Do
you wish to start/join a new network? (y/n) y Resetting
ZNP ZNP
Version: 2.6.2 Enter
device type c: Coordinator, r: Router, e: End Device: c Enter
channel 11-26: 26 EndPoint:
1 Network
Starting Network
Starting Network
Starting Network
Started Network
up
Available
devices: Type:
COORDINATOR NwkAddr:
0x0000 Number
of Endpoints: 1 Active
Endpoints: 0x01
Enter
DstAddr: |
Device
type은 Coordinator, 채널은 26번을 선택
또 다른 보드는 Router로 구성을 합니다.
$ sudo
./dataSendRcv.bin /dev/ttyUSB1 |
위와 같이 입력하면 아래와 같이 메시지가 나옵니다.
Do you wish
to start/join a new network? (y/n) y Resetting ZNP ZNP Version:
2.6.2 Enter device
type c: Coordinator, r: Router, e: End Device: r Enter channel
11-26: 26 EndPoint: 1 Network
Discovering Network
Authenticating Network
Joined Network up
Available
devices: Enter
DstAddr: 0x0000 Enter
DstEndpoint: 0x01 Enter message
to send or type CHANGE to change the destination or QUIT to
exit CHANGE
Available
devices: Type:
COORDINATOR NwkAddr:
0x0000 Number of
Endpoints: 1 Active
Endpoints: 0x01
Type: ROUTER NwkAddr:
0x49C9 Number of
Endpoints: 1 Active Endpoints:
0x01 |
Router 디바이스 선택 “r” 입력, 채널은
같은 26번 선택
“Enter DstAddr”은 COORDINATOR 보드의 NwkAddr 어드레스 주소를 입력합니다.
“Enter DstEndpoint”은 COORDINATOR보드의
Number of Endpoints 값인 0x1을 입력합니다.
Available
devices: Enter
DstAddr: 0x0000 Enter
DstEndpoint: 0x01
|
그리고, 자기 자신의 network
address를 알려면
“CHANGE”를 입력하면, 현재 구성된
네트워크 구성을 보여 줍니다.
Enter message
to send or type CHANGE to change the destination or QUIT to
exit CHANGE
Available
devices: Type:
COORDINATOR NwkAddr:
0x0000 Number of
Endpoints: 1 Active
Endpoints: 0x01
Type: ROUTER NwkAddr:
0x49C9 Number of
Endpoints: 1 Active
Endpoints: 0x01 |
수행한 결과를 아래 메시지가 보여 줍니다.
[icanjji@icanjji-Samsung-DeskTop-System
gnu]$ sudo ./dataSendRcv.bin
/dev/ttyUSB1 [sudo]
password for icanjji: Do you wish
to start/join a new network? (y/n) y Resetting ZNP ZNP Version:
2.6.2 Enter device
type c: Coordinator, r: Router, e: End Device: r Enter channel
11-26: 26 EndPoint: 1 Network
Discovering Network
Authenticating Network
Joined Network up
Available
devices: Enter
DstAddr: 0x0000 Enter DstEndpoint: 0x01 Enter message
to send or type CHANGE to change the destination or QUIT to
exit CHANGE
Available
devices: Type:
COORDINATOR NwkAddr:
0x0000 Number of
Endpoints: 1 Active
Endpoints: 0x01
Type: ROUTER NwkAddr:
0x49C9 Number of
Endpoints: 1 Active
Endpoints: 0x01
Enter
DstAddr: 0x0000 Enter
DstEndpoint: 0x1 Enter message
to send or type CHANGE to change the destination or QUIT to
exit Hello
CoordiNator Message
transmited Succesfully! Enter message
to send or type CHANGE to change the destination or QUIT to
exit
Incoming
Message from Endpoint 0x01 and Address 0x0000: Hello Router
Enter message
to send or type CHANGE to change the destination or QUIT to
exit: |
서로 Packat을 주고 받을 수 있습니다.
내용