Notice
Recent Posts
Recent Comments
Today
Total
05-15 08:05
Archives
관리 메뉴

Jeongchul Kim

Intel Edison board 시작 본문

사물인터넷

Intel Edison board 시작

김 정출 2016. 3. 8. 11:25


Intel Edison board 시작


login_as: root

password : inteledison



**BSP(Board Support Password)






Intel - Edison 페이지

https://software.intel.com/iot/home

https://software.intel.com/iot/hardware/edison/downloads



Browse 버튼을 통해 image.zip을 찾는다.

Start to flash를 시작한다.

2번을 뺏다가 꽂는다.



이전 버전에서는 Edison board (이동식디스크) 에 압축을 푼다.

이후에 putty 접속해서 reboot ota 명령어를 친다.

문제는 압축파일이 기존의 edsion보단 커서 reboot-ota를 사용하지 않는다.


설정환경 보기

uname -a


환경 설정하기 configure_edison --setup

1. 디바이스 패스워드 설정 : inteledison

2. 디바이스 이름 : edison_kjc

3. wifi-setup : Y

4. 원하는 wifi 번호를 입력한다.

5. wifi 패스워드 입력

6. ip부여 -> 웹 브라우저로 ip 접속

ex) 192.168.0.246 -> 접속



아두이노 사용 시 최신 버전 이미지의 버그가 있음.

업로드 이후에 깜빡이는데

reboot하게되면 깜빡이지 않음. 즉 동작되지 않음.


root@edison:~# ls /sketch/sketch.elf

/sketch/sketch.elf

root@edison:~# ps | grep sketch

 191 root      1728 S    /opt/edison/sketch_reset -i 207 -o 21

 291 root      2664 S    grep sketch

root@edison:~#


해결법

root@edison:~# ls -l /opt/edison

-rwxr-xr-x    1 root     root         48752 Jun 19 05:36 clloader

-rwxr-xr-x    1 root     root           341 Jun 19 05:35 launcher.sh

-rwxr-xr-x    1 root     root          5880 Jun 19 05:36 sketch_reset

-rwxr-xr-x    1 root     root            58 Jun 19 05:35 sketch_reset.sh

root@edison:~#


** clloader 재실행한다


이전 버전의 이미지 clloader.zip 이 필요함. 압축을 푼다.

scp 명령어가 필요

winscp576setup.exe 필요

설치를 완료한다.


사용자 이름을 root로 변경하고 로그인 버튼을 누른다.


/opt/edison으로 이동한다.


root@edison:~# cd /opt/edison

root@edison:/opt/edison# ls

clloader         launcher.sh      sketch_reset     sketch_reset.sh

root@edison:/opt/edison# rm -f /opt/edison/*

root@edison:/opt/edison# ls

root@edison:/opt/edison#



F5로 눌러 업로드한다.




업로드 후 putty에 작성한다.

root@edison:/opt/edison# ls -l

-rw-r--r--    1 root     root         48676 Dec 28  2015 clloader

-rw-r--r--    1 root     root           341 Dec 28  2015 launcher.sh

-rw-r--r--    1 root     root          5896 Dec 28  2015 sketch_reset

-rw-r--r--    1 root     root            58 Dec 28  2015 sketch_reset.sh

root@edison:/opt/edison# chmod 755 *

root@edison:/opt/edison# ls -l

-rwxr-xr-x    1 root     root         48676 Dec 28  2015 clloader

-rwxr-xr-x    1 root     root           341 Dec 28  2015 launcher.sh

-rwxr-xr-x    1 root     root          5896 Dec 28  2015 sketch_reset

-rwxr-xr-x    1 root     root            58 Dec 28  2015 sketch_reset.sh

root@edison:/opt/edison#


아두이노 소스 강제 종료

ps | grep sketch

kill sketch  죽이기


다시 살리고 싶다면

/opt/edison/sktech_reset.sh


root@edison:~# ps | grep sketch

 190 root      1728 S    /opt/edison/sketch_reset -i 207 -o 215 -s /opt/edison/sketch

 199 root     19788 S    /sketch/sketch.elf /dev/pts/0

 292 root      2664 S    grep sketch

root@edison:~# kill 199

root@edison:~# ps | grep sketch

 190 root      1728 S    /opt/edison/sketch_reset -i 207 -o 215 -s /opt/edison/sketch

 199 root         0 Z    [sketch.elf]

 294 root      2664 S    grep sketch

root@edison:~# /opt/edison/sketch_reset.sh

root@edison:~# ps | grep sketch

 190 root      1728 S    /opt/edison/sketch_reset -i 207 -o 215 -s /opt/edison/sketch

 300 root     19788 S    /sketch/sketch.elf /dev/pts/0

 304 root      2664 S    grep sketch



www.j1lab.com

시리얼통신프로그램


라이브러리 ChatServer 예제

#include <SPI.h>

#include <Ethernet.h>


// Enter a MAC address and IP address for your controller below.

// The IP address will be dependent on your local network.

// gateway and subnet are optional:

byte mac[] = {

 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

IPAddress ip(192,168,0, 246); <- 변경

IPAddress gateway(192,168,0, 1); <- 변경

IPAddress subnet(255, 255, 255, 0); <- 변경



// telnet defaults to port 5000

EthernetServer server(5000); <- 변경

boolean alreadyConnected = false; // whether or not the client was connected previously


void setup() {

 // initialize the ethernet device

 Ethernet.begin(mac, ip, gateway, subnet);

 // start listening for clients

 server.begin();

// Open serial communications and wait for port to open:

 Serial.begin(9600);



J1.exe 실행





Comments