M2M

2015ǯ10��08��

ESP8266 �⥸�塼�� + Blynk �Ǥ����� Wake On Wan

¤Ï¤Æ¤Ê¥Ö¥Ã¥¯¥Þ¡¼¥¯¤ËÅÐÏ¿

Android / iOS ü���������� IoT �ǥХ����α�������ƻ���ǽ�Ȥ��� Kickstarter ȯ�� Blynk ���͵��򽸤�Ƥ��ޤ���2015ǯ10��� Blynk �Ϥޤ���ȯ���Ӿ�ˤ��ꡢ���λ����Ǥ� Backer�ʽл�ԡˤǤʤ��Ȥ�������ߤΤ��٤Ƥε�ǽ��̵�������Ѥ��뤳�Ȥ��Ǥ��ޤ��ʢ��ˡ�����ץ�Ǽ��ޤ路�Τ��䤹�����Υ����ӥ���Ȥ�������äȤ����������Τ���ƻ��Ȥ��Ʊ�֤� PC �򥹥ޥۤ� Wake On Wan �����Τ��äƤߤޤ������ʤ��ʤ������ʤΤǰ켰��������ޤ���

  • �ʢ��˸��������ȤΡ�FAQ�פ��
    + I backed Blynk on Kickstarter. Where are my widgets and
      why the app is free?
    
      - App is free becasuse otherwise you would have to pay to
        download it. This is how AppStore and Google Play works.
      - Current Blynk release has a limited amount of widgets.
        We decided to make them free for everyone until we
        implement store. After that,every widget will be paid.
        However every backer will get them for free (according
        to their pledge).
    
Blynk �� ESP8266 Wi-Fi �⥸�塼�����б����Ƥ��ꡢ�ʲ��ε����Ǥϵ�Ŭ�ޡ����Ĥ��Ρ�ESP-WROOM-02�פ���Ѥ��Ƥ��ޤ������Υ��꡼���Υ⥸�塼��ϼ�Ω�����ޥ�����Ȥ���ư���ǽ�Ǥ��뤿�� IoT �ǥХ����μ����ǤȤ��Ƥ�äȤ��ڤ������ΤҤȤĤȸ�����Ǥ��礦��

����

�ޤ� Blynk �����Ѥ�������ߤäĤ����Ǥ��������Ƥ����ޤ���

  • Blynk ���ץ�
    Google Play / AppStore �Ǹ���������ѥ��ץ��Ȥäƥ桼�����������������ѤΥ��ץ�
  • IoT �ǥХ���
    ���Ѥ� Blynk �饤�֥����Ȥäƥ桼�������������ץ�������Ƴ�����ߤ������оݤ�����
  • Blynk ������
    Blynk ���ץ�� IoT �ǥХ�����Ϣ������𤹤륯�饦�ɥ����ӥ��ʢ������ץ󥽡����Ǥ��꼫���Ǥι��ۤ��ǽ��

Android / iOS ü���ˤϤ��줾��θ������ȥ�������ۤ���Ƥ������ѤΥ��ץ��Blynk�פ򥤥󥹥ȡ��뤷�ޤ������ѼԤϤ��Υ��ץ��Ȥä��ȼ��� Blynk ���ץ�������뤳�Ȥ��Ǥ��ޤ���
Blynk ���ץ���и����� IoT �ǥХ����Τ���Υץ�����೫ȯ�ˤ� Arduino IDE ����Ѥ��ޤ������餫���� IDE �� ESP8266 �ѥ饤�֥��⥸�塼����Ƴ�����Ƥ����������� Blynk ���󶡤���饤�֥�귲�򥤥󥹥ȡ��뤷�ޤ���
Blynk �θ����ɥ�������ˤ� Blynk �����Ѥ�����ɬ�פȤʤ뤳�����ä����󡦼�礬�狼��䤹�����Ҥ���Ƥ��ޤ����ޤ����ͥåȤ򸡺������¿����ͭ�Ѥʵ����򻲾Ȥ��뤳�Ȥ��Ǥ��ޤ���

�������ˤĤ���

�긵�Υˡ����˴𤭡�Blynk ��Ȥä��������οȶ�ʱ�����Ȥ��Ƽ������Ƥ����ꤷ�ޤ�����IoT �ǥХ������оݤ� PC ��Ʊ�� LAN �Ķ������֤��ޤ���

  1. ����� PC �� Wake On Wan ����
  2. ����� PC �� ping ���Ǥ�
  3. ����� AC ����ؤε��Ť� ON / OFF ����
  4. �����оݤ� IoT �ǥХ�����ꥻ�åȤ���

������˼���� PC �����Ѥ������ʤ��礬����ޤ���PC �򤺤äȵ����夲���ޤޤˤ��Ƥ����ΤϹ��ޤ����ʤ��Τǡ�����ޤǤ�ͷ��Ǥ��� Android ü��������Ե������Ƥ��� GCM ��ͳ�ǽ���� PC �� Wake On Lan �����Ȥ�����ˡ��ȤäƤ��ޤ���������Ϥ��������ʤ���ǽ���Ƥ���ΤǤ�����ɬ�פʼ���Ƨ��Τ�����������ݤˤʤäƤ������Ȥ˲ä������ξ�Ǽ��᤯ PC �ε����������ǧ�Ǥ��ʤ����Ȥ����ؤ򴶤��Ƥ��ޤ�������ǧ��ˡ�Ͻ���� IP ���ɥ쥹���Ф��� ping �ƥ��Ȥǽ�ʬ�Ǥ��礦��

�嵭 3.�ϳ�ĥ�ѤǤ����긵�Ǥ�α�����������Ѥ˼����������������Ǥ�դΥ����ߥ󥰤��������������뤿��˻ȤäƤ��ޤ�������ޤǤϾ�� PC ����³���� USB �ֳ�����⥳�������ԤäƤ��ޤ���������������ݤʤΤ��̤μ��ʤ��ۤ����ȻפäƤ��ޤ�����

������ˡ�ˤĤ���

Wake On Lan �ޥ��å��ѥ��åȤ����ФȽ���� PC �ؤ� ping �Ǥ��� Blynk �Ρ�Virtual Pin�׵�ǽ��Ȥä� IoT �ǥХ���¦��Ϣ�Ȥ���д�ñ�˼¸��Ǥ���ȹͤ��ޤ�����Blynk ���ץ������֤����ܥ��������ˤ����ơ�OUTPUT�פ�ʪ���ԥ�ǤϤʤ�Ŭ���ʲ��ۥԥ���ֹ�������Ƥơ�����¦�� IoT �ǥХ���¦�Υ����ɤ� "BLYNK_WRITE(���ۥԥ��ֹ��" �ϥ�ɥ��������Ƥ�����ɬ�פʽ����򵭽Ҥ���Ф褤�Ϥ��Ǥ���

  • Send data from app to hardware - Blynk �����ɥ������ - blynkkk.github.io
    Send data from app to hardware
    
    You can send any data from Widgets in the app to your
    hardware.
    
    All Controller Widgets can send data to Virtual Pins on
    your hardware. 
    For instance, code below shows how to get values from
    the Button Widget in the App
    
    BLYNK_WRITE(V1) //Button Widget is writing to pin V1
    {
      int pinData = param.asInt(); 
    }
    
    When you press Button, Blynk App sends 1 On second
    click - it sends 0
    
    This is how Button Widget is set up:
  • Wake On Lan �ޥ��å��ѥ��åȤλ��ͤ˴ؤ��뵭��
  • Espressif �Ҹ����ե������ΰʲ��ε����������� ESP8266 �� ping ��¹Ԥ��륵��ץ륳���ɤ���
ping ��̤򥢥ץ�����Τ���ˤϡ����ץ�¦�����֤����ǡ��� INPUT �ѤΥ��������åȤ˽���β��ۥԥ��ֹ�����ꤷ�Ƥ����������ֹ���Ф� IoT �ǥХ���¦�Υ����ɤ� "Blynk.virtualWrite(���ۥԥ��ֹ�, �ǡ���)" API ��Ȥäƥǡ��������äƤ��Ф褵�����Ǥ���

  • Virtual Pins - Blynk �����ɥ������ - blynkkk.github.io
    Virtual Pins
    
    Virtual Pins are designed to send any data from your
    microcontroller to the Blynk App and back. Think about
    Virtual Pins as channels for sending any data. Make sure
    you differentiate Virtual Pins from physical pins on your
    hardware. Virtual Pins have no physical representation.
    
    Virtual Pins can be used to interface with libraries
    (Servo, LCD and others) and implement custom functionality. 
    The device may send data to the Widget to the Virtual Pin
    like this:
    
    Blynk.virtualWrite(pin, "abc");
    Blynk.virtualWrite(pin, 123);
    Blynk.virtualWrite(pin, 12.34);
    

AC ����ؤε��Ť� ON / OFF ������ˤ� ESP8266 �⥸�塼�뤫��� 3.3V ���Ͽ���ǥ�졼�����å�������Ф褤�Ǥ��礦������¦�Ƚ���¦��������ι⤤����åɥ��ơ��ȥ�졼��SSR�� ��ư����˥�����Ȳ��Τ���ͭ������졼��������ʤ����Ǥ��������ŻҤ����Żҹ�������μ꺢�ʥ��åȤ����䤷�Ƥ��ޤ���

��;�̤ʤ��顢�Ŀ�Ū�ˤϤ��Τ褦�˹��Ű��򰷤���Τ������Ϥ��ޤ꼫������ʤ��Ǥ����������̤����ܤ��ʤ��Ƥ����ʤ�·����к��Τϴ�ñ�Ǥ������ּ���γڤ����פʤɤ������������äȤ���פǤ����顢�꺢�ʲ��ʤǷ�ϴ�ʴ����ʤ�����Ǥ���ʤ餽���Ȥ������Ȥ����Τ���ľ�ʤȤ����Ǥ�����ǰ�ʤ��麣�ΤȤ��������������ʤϸ�������ʤ��褦�Ǥ����ʼ��פϤ���Ȼפ��ΤǤ��������ˡ���Υ��åȤ�Ȥäƥ�졼�Ĥ��Ÿ������֥������ˡ�������ν��Ҥˤ狼��䤹�����ܤ���Ƥ��ޤ���

ư����ͻ�

�Ҥ��̤���ˤʤä���Τ�ư��Ƥ����ͻҤ�ʲ���ư��˼���Ƥ��ޤ�����1ʬ56�� �Ķ��������

���ơ�

  • IoT �ǥХ�����Ư��ϻ���ǧ�Ѥ� LED �� 2�ôֳ֤����ǡ����Υ����ߥ󥰤ǥ��ץ�� TICK �ե�����ɡʥǥХ�����Ư�ÿ��ˤ����������
  • ���ץ�� BOOT PC �ܥ��󲡲��� IoT �ǥХ���������� PC �� Wake On Lan ����
  • ���ץ�� PING �ܥ��󲡲��� IoT �ǥХ���������� PC �� ping ���ꤲ���ץ�� OK / NG �ե�����ɤط�̤ò¥«¥ï¿½ï¿½ï¿½ï¿½
  • ���ץ�� AC DEVICE �ܥ��󲡲��� IoT �ǥХ�������³���� AC ����ؤε��Ť� ON / OFF
  • ���ץ�� RESTART �ܥ����Ĺ������3�ðʾ�ˤ��ƥ�꡼������� IoT �ǥХ����Ϻƻ�ư����

�꥽�����켰

����� Blynk ���ץꤪ��� IoT �ǥХ��������������Ǥϰʲ��ΤȤ���Ǥ���

���Ʋ����ϥ���å��Ǽ���ɽ��

Blynk ���ץ�¦

Android / iPhone �Ǥ����� Blynk ���ץ�β���ɽ��

�ץ��������Ȥȳƥ��������åȤ�����

IoT �ǥХ���¦

�������Τ��ͻ�
��ESP-WROOM-02 �⥸�塼��� Cerevo �����Υ֥쥤�������ȴ��ġ�CDP-ESP8266�פȤȤ�˻���
����Ư������ǧ�Ѥ� IO4 ���ֿ� LED ��AC ���������Ѥ� IO12 �˥�졼�Ĥ������֥�����夷�Ƥ��뤬���פʤ�ɤ�����ά��

��졼�Ĥ��Ÿ������֥�

������������
��SimpleTimer �饤�֥���Υ��󥹥ȡ��뤬ɬ�פǤ���

ESP8266_WakeOnWan.ino - github.com/mkttanabe

α�դ��٤�����ʤ�

Blynk ��������ͭ�ѤǤ������߿ʹԷ��dz�ȯ��Ǥ��뤿�����ѻ��˼㴳���դ��ʤ���Фʤ�ʤ����⤢��ޤ�������긵�ǵ��Ť���������⤷�Ƥ����ޤ���

Blynk �饤�֥���С������Ǥ��Զ��ˤĤ��ơʽ��ס�

2015-08-06 �˥�꡼�����줿 v0.3.0 �ޤǤ�Blynk �饤�֥��ˤ� ESP8266 �⥸�塼��Υϥ�ɥ�󥰤��礭���Զ�礬����ޤ���Ʊ�⥸�塼�� �� Blynk �����д֤λ�³��³���԰դ����Ǥ�ȯ����������̵�¥롼�פ˴٤��ǥХ�����ꥻ�åȤ��ʤ��¤����³��ǽ�Ȥʤ�����Ǥ��������Զ��� 2015-09-24 �˥�꡼�����줿 v0.3.1 �ǤϽ�������Ƥ��ꡢ���Ǥ�ȯ������������³��ư���줹�뵡��������˵�ǽ����褦�ˤʤäƤ��ޤ������ν����ˤ��Ϣ³��Ư�����ꤹ��褦�ˤʤ�ޤ�����Blynk �� ESP8266 ��Ȥ�����ɬ������ v0.3.1 �ʹߤΥ饤�֥���Ȥ��٤��Ǥ��������ե�������ΰʲ��ε����˴�Ϣ�������������ޤ���

Android - iOS ü���֤� Blynk ���ץ�θߴ����ˤĤ���

Blynk �� Android �� iOS ���б����Ƥ��ޤ�����ξ���Υץ�åȥե������������ư��� Blynk ���ץ�������뤿��ˤϰʲ������ؤ����դ�ɬ�פǤ���

  • 2015ǯ10��8�������� Android �� Blynk �κǿ��С������� "1.0RC7 fix"��iOS �� Blynk �κǿ��С������� "1.3" �Ǥ����С�������ֹ�� iOS �ǤΤۤ�����Ǥ�����Android �Ǥ����Ѳ�ǽ�ʥ��������åȤ��� iOS �ǤǤϤޤ���������Ƥ��ʤ���Τ������Ĥ�����ޤ������޺��� Android �� "1.0RC7 fix������ iOS �� "1.3" �ǤΥ��������åȰ����Ǥ���

    iOS ��̤�����Υ��������åȤ� Android �Ǥ����֤�����¸�������ץ�� iOS �Ǥdz����Ȥ�����ʬ������Ȥʤ�ޤ�����������ǤϤʤ������Υ��ץ�� iOS �Ǥ���¸������������������åȤϼ����ޤ��������դǤ���


  • Android �ǤǤ� LED ���������åȤ�����˵�ǽ���ޤ���
�ʾ�λ���ˤ�ꡢ�������Ǥϡ�ξ�ץ�åȥե�����֤Ǥθߴ����γ��ݤ�ɬ�פʥ��ץ�ˤ����Ƥ� iOS �Ǥ����ѤǤ��륦�������åȤΤߤ���Ѥ����ޤ���LED ���������åȤϻȤ�ʤ��褦�ˤ���ɬ�פ�����ޤ�������β��������Ԥ���ޤ���

�Ǹ��

Prepare to Blynk! - www.kickstarter.com���˷Ǻܤ���Ƥ��륤�饹��

����� Blynk��


(tanabe)
klab_gijutsu2 at 05:49���������URL��Comments(0)
2015ǯ08��27��

ESP8266 �⥸�塼��� AT ���ޥ�ɤ� SSL ���饤����ȵ�ǽ���ɲä���

¤Ï¤Æ¤Ê¥Ö¥Ã¥¯¥Þ¡¼¥¯¤ËÅÐÏ¿

��� Espressif Systems ���� ESP8266EX ��ܤ���ESP-WROOM-02���϶�̣�֤����⥸�塼��Ǥ��� ��ǯ��2015ǯ�˾�Ⱦ������Ŭ��������͵��򽸤�Ƥ��뤳�����ʤϰ²��Ǥ���ˤ�ؤ�餺��Ω�����ޥ�����Ȥ��ư��������������餷�����ޤ����вٻ��Υե����०�������Ȥ߹��ޤ�Ƥ��� AT ���ޥ�ɥ��åȤ����Ѥ���Хۥ���¦����٤򤫤�����ñ�˴ݤ����̿���������Ԥ��Ƥ�����ڤ��ˤ⹥�������Ƥޤ���

���������� AT ���ޥ�ɥ��åȤ� HTTPS �ꥯ�����Ȥ����������ˡ����������ʤ����Ȥ��Ի׵Ĥ˻פäƤ��ޤ��������餿��ƥɥ�����Ȥ��ǧ����Ȥɤ���� AT ���ޥ�ɤ� SSL �̿��򰷤����ȤϤǤ��ʤ��褦�Ǥ����ץ�����ޥ֥�Ǥ��뤳�Ȥ��������ʤ�̥�ϤΤҤȤĤǤ���Ȥϸ��� �вٻ��ξ��֤� SSL �����ѤǤ��ʤ��ΤϤ��Τ��ȼ��Τ���ǰ�˻פ��ޤ���AT ���ޥ�ɤΥ��󥿡��ե��������Τ�Τϲ����������ʤΤǤ�����ĥ������� SSL �ؤ��б����ߤޤ�����

�ǽ�Ū�ˤϥ����о�����θ��ڤ�ޤ�����̤��ư��ޤ����������β����ǰճ��ʶ��ޤ⤢�ꡢ�긵�Ƿи��������Ȥ���˺�򤫤ͤƤۤܽ��֤ɤ���˵�Ͽ���Ƥ������Ȥˤ��ޤ�����̣�Τ��������ɤäƤߤƲ�������

AT ���ޥ�ɳ�ĥ�ˤĤ���

�᡼�����ϼ��Υڡ����� ESP8266 �Ѥ� SDK ��������Ƥ��ޤ���

2015-08-21 �����κǿ��Ǥϰʲ����̤�Ǥ���

SDK ���������֤������Ƥߤ�� examples/at/ �ǥ��쥯�ȥ겼�� AT ���ޥ�ɥ��åȤ��ĥ���뤿��Υ���ץ륳���ɤ���Ͽ����Ƥ����AT+CIUPDATE�ץ��ޥ�ɤ�¾�Υ��ޥ�ɷ��Ȥ��̤ˤ������������Ƥ��뤳�Ȥ����ƤȤ�ޤ���

examples/at/user/user_main.c

�����ɤ������ն�� at_custom_cmd[] �ơ��֥�ˤϡ�AT+CIUPDATE�פ˲ä���AT+TEST�פȤ�����ĥ���ޥ�ɤ����Ҥ���Ƥ��ޤ�����ĥ���ޥ�ɤ��������ˡ�ϼ��ε���������������ޤ���

In the example of \esp_iot_sdk\examples\at\user\user_main.c, 
ways are delivered on how to implement a self-defined AT Command,
 AT+TEST��.
The structure, at_funcationType, is used to define four types of
a command, e.g., ��AT+TEST��. 

"at_testCmd" is a testing command and it��s formatted as AT+TEST=?.
In the example of AT, the registered callback is ��at_testCmdTest��; 
the testing demand could be designed as the value range of the
return parameter. If registered as NULL, there will be no testing
command.

"at_queryCmd" is a query command and it��s formatted as AT+TEST?.
In the example of AT, the registered callback is ��at_queryCmdTest�� ; 
the query command could be designed as returning the current value. 
If registered as NULL, there will be no query command.

"at_setupCmd" is a setup command and it��s formatted as
AT+TEST=parameter1,parameter2,........ In the example of AT, 
the registered callback is "at_setupCmdTest"; 
the setup command could be designed as the value of the parameter; 
if registered as NULL, there will be no setup command.

"at_exeCmd" is an execution command and it��s formatted as AT+TEST. 
In the example of AT, the registered callback is ��at_exeCmdTest��; 
if registered as NULL, there will be no execution command.
��Ϣ�ν񼰤�¾�Υ��ޥ�ɤǤ⸫�������ΤǤ������ɤ����Ȥ����Ǥϴ�¸�Υ��ޥ�ɥ��åȤ˥��ꥸ�ʥ�� AT ���ޥ�ɤ��ɲä��뤳�ȤϤ��ޤ��񤷤��ʤ��褦�Ǥ���

SDK ��Ʊ���Υӥ�ɤ��ߥե������񤭹���Ǥߤ�

SDK �� bin/ �ǥ��쥯�ȥ�ˤϥ᡼����¦���ӥ�ɤ����ե����०�����Х��ʥ귲����Ǽ����Ƥ��ޤ���
ESP-WROOM-02 �вٻ���ɸ��ե������AT ���ޥ�ɥ��åȡˤϰʲ��ΥХ��ʥ꤫�鹽������ޤ���

  • bin/boot_v1.2.bin ---- �֡��ȥ�����
  • bin/at/user1.1024.new.2.bin ---- AT ���ޥ�ɥץ����������
  • bin/blank.bin ---- �ΰ������ѡ���Ȥ� 0xFF * 4096����
  • bin/esp_init_data_default.bin --- "Stores default RF parameter values"

����Υե������ӥ�ɤ��ƽ񤭹������ˡ��ޤ�������������Ȥ�����¢�ե�å������˽񤭹���Ǥߤ뤳�Ȥˤ��ޤ����� �������񤭹����褦�ˤʤäƤ����Ф����ȸ����Ȥ����ڤ��ᤷ��ڤǤ��礦��

��bin/at/readme.txt����Ƭ�˼��ε��Ҥ�����ޤ���

download:
boot_v1.2+.bin      	0x00000
user1.1024.new.2.bin  	0x01000
blank.bin           	0x7e000 & 0xfe000

����user1.1024.new.2.bin�פΡ�1024�פ� 1024KB��8Mbit�����̤Υե�å��������Ѥ����ꤷ�ƥӥ�ɤ��줿�Х��ʥ�Ǥ��뤳�Ȥ��̣���롣ESP-WROOM-02 �� 32Mbit �Υե�å���������¢���Ƥ��뤬���ʲ��ε����ˤ����ƤϤ��ΥХ��ʥ�λ��ͤ˽स 8Mbit �����ϰϤλ��Ѥ�����Ȥ��롣

����esp_init_data_default.bin�פˤ� RF��Radio Frequency�˥ѥ�᡼���Υǥե�����ͤ��ݻ�����Ƥ���ݤ������� SDK �Ρ�ESP8266 IOT SDK User Manual�פ˵��ܤ���Ƥ��롣���ε����ˤ��������ꡣ

�ե����०�����ν񤭹��ߤϰʲ��Ρ�Flash Download Tool�פ�Ȥ� USB - ���ꥢ���Ѵ����ͳ�ǹԤ��ޤ����ġ���� Windows �Ǥ� Python �Ǥ��Ѱդ���Ƥ��ޤ��� �񤭹��ߤϥ⥸�塼��� IO0 �ԥ�� Lo �˥��åȤ��ơ�UART Download Mode�פذܹԤ��������Τǡ�
�ʿޤ� Windows �ǡ�
��1024KB �ե�å�����ѻ��Υ���ޥå�

     - SDK �Ρ�Espressif IOT SDK User Manual�פ��

Note 

• System param (system parameter area) is the last 16KB offlash. 

• User param is the user parameter area used by Espressif demo code
  ( IOT_Demo or AT ). If users develop their own application, 
  user data can be saved in any available flash area. 

• User Data area ( green area in pictures below ) means the flash
  area that may be available, if program area doesn��t reach the
  maximum size, remaining area can be used to save user data. 

ư���ǧ
AATTEE00


OK
AT+GMR
AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
compile time:Aug  8 2015 17:19:38
OK
AT+CWMODE=1

OK
AT+CWLAP
+CWLAP:(1,"GPMAP",-93,"10:6f:3f:XX:XX:XX",1,-47)
+CWLAP:(0,"000D0BF6C164_G",-91,"00:16:01:XX:XX:XX",5,-32)
+CWLAP:(3,"hogehogeSSID",-72,"00:22:cf:XX:XX:XX",10,-91)
+CWLAP:(2,"STWEBKAIGI",-88,"4c:e6:76:XX:XX:XX",10,-27)
+CWLAP:(4,"elecom2g-DE8564",-90,"00:90:fe:XX:XX:XX",10,-26)
+CWLAP:(3,"e-timer-DE8564",-90,"02:90:fe:XX:XX:XX",10,-26)
+CWLAP:(3,"auhome_acyCYh",-92,"8c:4c:dc:XX:XX:XX",1,-31)

OK

��ȯ�Ķ���Ƴ��

ESP8266 �⥸�塼��Υե����०������ȯ�ˤϸ��� Arduino ������ IDE��������Ѥ��뤳�Ȥ��ǽ�Ǥ��� SDK �˴ޤޤ�륳���ɤϤ������ͥ��ƥ��֤γ�ȯ�Ķ�������Ȥ��Ƥ��뤿�ả��Ϥ����Ȥ��ޤ���

�᡼������ɬ�פʰ켰�򥤥󥹥ȡ��뤺�ߤγ�ȯ�Ķ���Linux�ˤ� VirtualBox ���ۥޥ��󥤥᡼�������ۤ��Ƥ��ꡢƳ����硦��ˡ�ϰʲ��ε�������������Ƥ��ޤ���

�ݥ���Ȥʤ�
  • SDK �ΰ켰�����֤��� PC ��Υǥ��쥯�ȥ�� "share" ��̾���� VirtualBox ���ۥޥ���ζ�ͭ�ե�����Ȥ������ꤷ�Ƥ���
  • ���ۥޥ���Υǥ����ȥå׾�� "LXTerminal" ��ư����ȥ�������� esp8266 �ǥ����ߥʥ뤬����
  • ��������� esp8266 �ۡ���ǥ��쥯�ȥ�� ./mount.sh ��¹Ԥ���� PC ��ζ�ͭ�ե������ ~/Share �˥ޥ���Ȥ����
  • ��������� esp8266 �Υѥ���ɤ� "espressif"

�����ۥޥ���Υ����ॾ����� CST �̵����֤����ꤵ��Ƥ��뤿���ѹ���ɬ�פǤ�

�ե����०������ӥ�ɤ��Ƥߤ�

SDK �� examples/ ���ˤ�ʣ���Υ���ץ�ץ��������Ȥ����֤���Ƥ��ꡢ���Ѥ���ץ��������ȤΥե����뷲�򤽤����� app/ ���شݤ��ȥ��ԡ����ƻȤ��ޤ�����������ҤΤȤ��� examples/at/* ����Ѥ��ޤ���

���ۥޥ���¦�� app/ �ذ�ư�� gen_misc.sh ������ץȤ�¹Ԥ���ȥХ��ʥ꤬�ӥ�ɤ���ޤ��� �ʲ��Υӥ�ɳ��ϻ��Υ��ץ�������ϥ᡼����¦�ӥ�ɤǤ����Ƥ˽स�Ƥ��ޤ���

$ pwd
/home/esp8266/Share/esp_iot_sdk_v1.3.0_15_08_08_build/esp_iot_sdk_v1.3.0/app

$ make clean
make -C user clean;
make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v1.3.0_15_08_08_build/esp_iot_sdk_v1.3.0/app/user'
rm -f -r .output/eagle/debug
make[1]: Leaving directory `/mnt/Share/esp_iot_sdk_v1.3.0_15_08_08_build/esp_iot_sdk_v1.3.0/app/user'
rm -f -r .output/eagle/debug

$./gen_misc.sh
gen_misc.sh version 20150511

Please follow below steps(1-5) to generate specific bin(s):
STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)
enter(0/1/2, default 2):
1
boot mode: new

STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)
enter (0/1/2, default 0):
1
generate bin: user1.bin

STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)
enter (0/1/2/3, default 2):

spi speed: 40 MHz

STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)
enter (0/1/2/3, default 0):

spi mode: QIO

STEP 5: choose spi size and map
    0= 512KB( 256KB+ 256KB)
    2=1024KB( 512KB+ 512KB)
    3=2048KB( 512KB+ 512KB)
    4=4096KB( 512KB+ 512KB)
    5=2048KB(1024KB+1024KB)
    6=4096KB(1024KB+1024KB)
enter (0/2/3/4/5/6, default 0):
2
spi size: 1024KB
spi ota map:  512KB + 512KB


start...

make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v1.3.0_15_08_08_build/esp_iot_sdk_v1.3.0/app/user'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions
-nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-

������

!!!
Support boot_v1.2 and +
Generate user1.1024.new.2.bin successully in folder bin/upgrade.
boot.bin------------>0x00000
user1.1024.new.2.bin--->0x01000
!!!

�ʾ�μ��� bin/upgrade/ ������������� user1.1024.new.2.bin �����Ф� bin/at/user1.1024.new.2.bin ������˥ե�å������� 0x01000 ���Ϥ����˽񤭹���д�λ�Ǥ���

�ʤ���boot*.bin, blank.bin �ϥ桼���ˤ��ӥ�ɤ��оݤǤϤ���ޤ��󡣤����� SDK �˴ޤޤ�Ƥ����Τ򤽤Τޤ޻Ȥ��ޤ���

HTTPS ���饤����Ƚ����ϤɤΤ褦�˽񤱤Ф����Ρ�

SDK �ˤϥɥ�����ȤȤ��ơ�ESP8266 SSL User Manual�פ�Ʊ������Ƥ��ޤ������������������Ǥ� ESP8266 �⥸�塼��Ǥ� SSL ���Ѥ˴ؤ������Ͼ��ʤ��Τ��¾��Ǥ���

���ʤߤˡ�IBM ��°�� Neil Kolban �᤬ 2015ǯ8��1���˸���������Kolban's book on the ESP8266�פϵ��Ѿ��󤬾ܺ٤˵��Ҥ��줿���Ťʻ����Ǥ�����Ʊ���ˤ����Ƥ� SSL �����ˤĤ��Ƥ� API �ξҲ�Τߤ�α�ޤäƤ��ޤ���

�ƹ�����ѼԤ��õ�������Ȥ��ä����ݤǼ��Τ褦�ʱ��������Ǹ��������ޤ���


By helpme -  Tue Jun 30, 2015 5:14 am

Can the ESP8266 support HTTPS websites? Does the Espressif SDK
support SSL function?
By Angelo Santagata -  Tue Jun 30, 2015 4:51 pm

Alas I no, but I happened to see this ESP8266 SSL Example on their website!
http://bbs.espressif.com/viewtopic.php?f=21&t=389

hopefully someone can port it to the SDK
�Ȥ����櫓�ǡ��᡼����¦�ϲ����ڡ����� HTTPS ���饤����Ƚ����Υ���ץ륳���ɤ�Ǻܤ��Ƥ��ޤ���

Here is a demo code of ESP8266 as TCP SSL client. 
It is based on ESP8266 SDK without OS.

It just like ESP8266 to be normal TCP client except
change espconn_xxx to be espconn_secure_xxx

If your SSL packet is larger than 2048 bytes, please
try to call espconn_secure_set_size
to enlarge SSL buffer size (max:8192 )

���Υ����ɤ��ߤ��� AT ���ޥ�ɤ��ĥ����Ф褤�ȹͤ��ޤ�����

AT ���ޥ�ɳ�ĥ�Ǥ� SSL ����������ư��ʤ����� (SDK v1.2.0)

���ä�������� +GETTEST ���ޥ�ɤ�񤤤Ƥߤޤ�����
���ʤߤˤ��μ¸��λ����ǻ��Ѥ��Ƥ��� SDK �� 2015ǯ8���������κǿ��Ǥ��ä� v1.2.0 �Ǥ���

���� +GETTEST ���ޥ�ɤϼ������ƤǤ���

AT+GETTEST="hostname" �������ۥ��Ȥ� "GET /" �ꥯ�����Ȥ�����

AT+GETTEST  --- �������ʤ���� www.example.com:80 �� HTTP �ꥯ������

AT+GETTEST="www.example.com",0 --- 2nd arg �� 0 �ʤ�
                                   80�֥ݡ��Ȥ� HTTP �ꥯ������
AT+GETTEST="www.example.com",1 --- 2nd arg �� 1 �ʤ�
                                   443�֥ݡ��Ȥ� HTTPS �ꥯ������

AT+GETTEST="www.example.com",1,0 --- 3rd arg �� 0 �ʤ饵���о����񸡾ڤʤ���
                                     443�֥ݡ��Ȥ� HTTPS �ꥯ������
AT+GETTEST="www.example.com",1,1 --- 3rd arg �� 1 �ʤ饵���о����񸡾ڤ����
                                     443�֥ݡ��Ȥ� HTTPS �ꥯ������
�����������ɤ�ʲ��˼����ޤ���
�����������Ϥ��θ��Ĵ����̤�ȿ�Ǥ�����ΤǤ����ǽ�μ¸����ʳ��ǤϤ��äȥ�դ����ƤǤ����� �Ȥ��������� AT+GETTEST ���ޥ�ɤϴ����̤�ˤ�ư��ޤ���Ǥ�����HTTP �ꥯ�����Ȥ�����������������Τ� HTTPS �ꥯ�����ȤǤϥ��顼��ȯ������ΤǤ���
AATTEE00


OK
AT+GMR
AT version:0.30.0.0(Jul  3 2015 19:35:49)
SDK version:1.2.0
compile time:Aug 11 2015 14:09:10
OK


AT+GETTEST="www.example.com",1
mode : sta(18:fe:34:a4:0f:a0) + softAP(1a:fe:34:a4:0f:a0)
add if0
11
f 0, 221
scandone
add 0
aid 4

connected with hogehogeSSID, channel 10
WIFI CONNECTED
dhcp client start...
WIFI GOT IP
ip:10.10.0.19,mask:255.255.255.0,gw:10.10.0.1
got ip !!!
start connect to server
client handshake start. 
client handshake failed
reconnect callback, error code -28 !!! 
���顼������ -28 �� SDK �� include/espconn.h ���������Ƥ��ޤ�
/* Definitions for error constants. */

#define ESPCONN_OK          0    /* No error, everything OK. */
#define ESPCONN_MEM        -1    /* Out of memory error.     */
#define ESPCONN_TIMEOUT    -3    /* Timeout.                 */
#define ESPCONN_RTE        -4    /* Routing problem.         */
#define ESPCONN_INPROGRESS  -5    /* Operation in progress    */

#define ESPCONN_ABRT       -8    /* Connection aborted.      */
#define ESPCONN_RST        -9    /* Connection reset.        */
#define ESPCONN_CLSD       -10   /* Connection closed.       */
#define ESPCONN_CONN       -11   /* Not connected.           */

#define ESPCONN_ARG        -12   /* Illegal argument.        */
#define ESPCONN_ISCONN     -15   /* Already connected.       */

#define ESPCONN_HANDSHAKE  -28   /* ssl handshake failed	 */
#define ESPCONN_SSL_INVALID_DATA  -61   /* ssl application invalid	 */
�ϥ�ɥ��������˼��Ԥ��Ƥ���褦�Ǥ�������Ǥϲ���狼��ޤ��󡣤��ơ�

SDK v1.2.0 �Ǥ� AT ���ޥ�ɳ�ĥ��� SSL ����ǽ���ʤ���ͳ

�Կ��˻פ������õ�����Ȥ���Ʊ����������������桼���ȥ����åդα����˵��Ť��ޤ�����

Re: SSL connection via AT commands

Postby doughboy �� Tue Apr 21, 2015 11:59 pm

I am writing AT command to support SSL, but it seems none of
the espconn_secure_* api works. 
At least when I connect to real ssl servers using real
cerfificates. (and yes, I have set buffer size to 8196 and
use the patched ssl library) esp module will
reset (I think due to wdt timeout). I already reported this
via email.
Re: SSL connection via AT commands

Postby Espressif_Faye �� Mon Apr 27, 2015 10:22 am

Hi, doughboy,

We debugged on your problem, it's the RAM limitation cause that.

AT commands has only 17KBytes available heap now��
SSL need 12KBytes free heap size, 
if you espconn_secure_set_size to set 5KBytes��it is not enough..

So SSL can not be used in AT commands because RAM is limited. 

Sorry for the inconvenience.

AT ���ޥ�ɥץ������¹Ի��ˤϻĥҡ��פ� 17KB ���٤�����SSL �����ˤ� 12KB �Υҡ��פ�ɬ�פǡ������� espconn_secure_set_size() �ǿ� KB �� SSL �Хåե����ݤ���ꤹ��ȴ����˸ϳ餷�Ƥ��ޤ������Τ��ᡢAT ���ޥ�ɤ� SSL �򰷤����ȤϤǤ��ʤ����Ȥ����äǤ���

�ۥ��Ȥؤ���³�׵������ system_print_meminfo() ����� system_get_free_heap_size() ��ƤӽФ��Ƥߤ�ȼ��η�̤Ǥ�����


data  : 0x3ffe8000 ~ 0x3ffe89d8, len: 2520
rodata: 0x3ffe89e0 ~ 0x3ffeabd4, len: 8692
bss   : 0x3ffeabd8 ~ 0x3fff5010, len: 42040
heap  : 0x3fff5010 ~ 0x3fffc000, len: 28656

system_get_free_heap_size=16592 

�ʤ�ۤɡ��ʤ���AT ���ޥ�ɥ��åȤ� SDK �ˤ����Ƥϥ饤�֥������Ƕ��뤵��Ƥ��ꡢ����ޥ�ɤ��ɲä��뤳�ȤϤǤ��Ƥ��¸�Τ�Τ��ѹ����뤳�ȤϤǤ��ޤ���

���ơ�

��Ƭ�˽񤤤��褦�ˡ�ESP-WROOM-02 ���̿��⥸�塼��Ȥ��ư��������ˤ����Ƥϥ��ꥢ���ͳ�ǤΥ��ޥ���Ϥ��Ǵ�ñ���̿����������ѤǤ��뤳�Ȥˤ��ص�������ޤ���

�������������� SSL �����ѤǤ��ʤ����Ȥ��礭�ʥޥ��ʥ��Ǥ�����Ѥ����ꤹ��Ȼ��Ӥ����ꤵ��뤳�Ȥˤʤ�Ǥ��礦�����Τ����¸�� AT ���ޥ�ɥ��åȤ����륤�󥿡��ե��������ߤǤ� SSL �����μ�����ɬ�פǤ��ꡢ������ˡ�Ϥ��������ͤ������ΤΤɤ����ޤ��ʰ��ݤ�����ޤ���

����Ϥ���Ȥ��ơ������Ǥ� ESP-WROOM-02 �ϼ�Ω�����ޥ�����Ȥ��Ƥ�¦�̤������碌�Ƥ��뤿�ᡢ�׷�ˤ�äƤ�ñ�Τǽ�����ޤ��ʤ����Ȥ���ǽ�Ǥ���櫓�ǡ��ȤɤΤĤޤ����ʽвٻ��� AT ���ޥ�ɥ��åȤϡ֤��ޤ������٤Τ�Τȳ���ڤ�٤��ʤΤ��⡩

����ʤ��Ȥ�ͤ��ʤ��顢SSL �������Τ�Τ������ư��뤳�Ȥ��ǧ���뤿������ǤΥץ������� AT ���ޥ�ɥ��åȤ��ڤ�Υ��ñ�Τǵ�ư��������ѹ�����ư����Ƥߤޤ�����
�ۥ��Ȥؤ���³�׵����Υҡ��׾����ϰʲ����̤�ǡ�HTTPS �ꥯ�����Ȥ�����ʤ���������ޤ�������Ϥ������­������Τ褦�Ǥ���


data  : 0x3ffe8000 ~ 0x3ffe8560, len: 1376
rodata: 0x3ffe8560 ~ 0x3ffe9764, len: 4612
bss   : 0x3ffe9768 ~ 0x3fff2b30, len: 37832
heap  : 0x3fff2b30 ~ 0x3fffc000, len: 38096

system_get_free_heap_size=34856

�����о�����θ��ڤˤĤ���

Ω���ߤޤäƤ��Ƥ�������ʤ��Τǡ�������ˤ��Ƥ�ɬ�פȤʤ� SSL �����о�����θ��ڤ˼��Ĥ��Ƥߤ뤳�Ȥˤ��ޤ�����

SDK ��Ʊ���Ρ�ESP8266 SSL User Manual�פˤ� HTTPS ���饤����Ƚ����ˤ����ƥ����о�����򸡾ڤ�����ˡ�����Τ褦�˵��Ҥ���Ƥ��ޤ���

�ʥ���å��Ǽ���ɽ����

�嵭�ɥ�����Ȥ����ȴ��

CA verify function default to be disabled, user can enable it
by espconn_secure_ca_enable.

3.1. Generate CA Certificate

(1) Put script ��make_cert.py��and CA certificate into
    the same folder. 
(2) Run script ��make_cert.py�� to generate esp_ca_cert.bin
    which contains all CA certificates
    (2 CA certificates at most) in the same folder. 
    Download address of esp_ca_cert.bin depends on
    espconn_secure_ca_enable.

3.2. CA Verify

STEP 1: ESP8266 connects to server, read esp_ca_cert.bin
        from flash, get the corresponding SSL 
        ctx. Only 2 CA certificates is allowed at most.
STEP 2: ESP8266 starts TLS handshake, get certificate from
        SSL server, check with the CA in step 1��
        • if CA check fail, connection break��
        • if succeed, CA verify pass. 
4.2. espconn_secure_ca_enable

Function: 
  Enable SSL CA (certificate authenticate) function 

Note��
  • CA function is disabled by default 
  • If user want to call this API, please call it before 
                 espconn_secure_accept
                 (ESP8266 as TCP SSL server) or 
                 espconn_secure_connect
                 (ESP8266 as TCP SSL client)
Prototype: 
  bool espconn_secure_ca_enable (uint8 level, uint16 flash_sector) 

Parameter: 
  uint8 level : set configuration forESP8266
                SSL server/client��
                 0x01 SSL client��
                 0x02 SSL server��
                 0x03 both SSL client and SSL server 

  uint16 flash_sector : flash sector in which CA
  (esp_ca_cert.bin) is downloaded. For example, 
  flash_sector is 0x3B, then esp_ca_cert.bin need to
  download into flash 0x3B000

Return:
  true : succeed
  false  : fail 

��make_cert.py�פ� SDK �ˤϴޤޤ�ޤ��󡣲����ڡ����˥���������ɥ�󥯤��Ǻܤ���Ƥ��ޤ���

�ʲ��μ��ǡ�https://www.example.com/�פΥ����о�����θ��ڤ��ߤޤ�����

  • DigiCert �Υ롼�Ⱦ������֥饦������ X509 ������DER ���󥳡��ɡˤǥ������ݡ��Ȥ���ĥ�Ҥ� .cer �Ȥ���
  • *.cer ���֤����ǥ��쥯�ȥ�Ǿ嵭�� make_cert.py ��¹Ԥ���esp_ca_cert.bin�פ���������
  • espconn_secure_connect() �����˲����Ԥòµ­½Ò¤ï¿½user1.bin ��ե�å�����ꥵ���� 1024KB �λ���ǥӥ��
    espconn_secure_ca_enable(0x01, 0x65)); // 0x01 = client
  • ¾�� *.bin �ե�����Ȱ��ˡ�esp_ca_cert.bin ��ե�å������� 0x65000 ���ϡ�User Data area�ˤ����˽ñ¤­¹ï¿½ï¿½ï¿½
    ���ӥ�ɤ��� user1.bin �Υ������� 300KB �ۤɤǤ���;͵��ߤ� 400KB �Ȥ���
    �֡����ΰ�� 4KB �ȹ绻����� 404KB �ˤĤ� 404 * 1024 = 413696 = 0x65000
    - ���Υ���ޥåסʺƷǡˤ򻲾ȤΤ���
    ��1024KB �ե�å�����ѻ��Υ���ޥå�
    
         - SDK �Ρ�Espressif IOT SDK User Manual�פ��
    
    Note 
    
    • System param (system parameter area) is the last 16KB offlash. 
    
    • User param is the user parameter area used by Espressif demo code
      ( IOT_Demo or AT ). If users develop their own application, 
      user data can be saved in any available flash area. 
    
    • User Data area ( green area in pictures below ) means the flash
      area that may be available, if program area doesn��t reach the
      maximum size, remaining area can be used to save user data. 
    
  • �����̤�˥����о�����θ��ڤ��Ԥ�� www.example.com �ؤ� HTTPS �ꥯ�����Ȥ�����˽������졢�롼�� CA �� DigiCert �ǤϤʤ������Ȥؤ� HTTPS �ꥯ�����Ȥˤ����Ƥϥϥ�ɥ��������λ����ǥ��顼�Ȥʤ뤳�Ȥ��ǧ

��衧SDK v1.3.0 �ʤ� AT ���ޥ�ɳ�ĥ��� SSL ������ư����

�����������Ƥ�����ˡ�2015-08-08 �˸������줿 esp_iot_sdk_v1.3.0_15_08_08 �Υ�꡼���Ρ��Ȥμ��ε��Ҥ��ܤ����ӹ���Ǥ��ޤ�����

Optimization:

1.Memory optimization to save 12KBytes.
            :

���ҤΤȤ��ꡢSDK v1.2.0 ��Ȥäƥӥ�ɤ��� AT ���ޥ�ɳ�ĥ�Ǥ� SSL ����ǽ���ʤ��ä��Τϥ�����­���������ä����ᡢv1.3.0 �� 12KB ;͵�����褿�ΤǤ���Ф��뤤��ư���ǽ�ǤϤʤ����ȹͤ��ޤ����� �ºݤ� v1.3.0 �ǥӥ�ɤ��� user1.bin �� AT+GETTEST ���ޥ�ɤ����Ȥ��� HTTPS �ꥯ�����Ȥ�����˽�������뤳�Ȥ��ǧ���ۥ��Ȥؤ���³�׵����Υҡ��׾����ϰʲ����̤�Ǥ������ޤ��Ϥ�Ǥ������Ǥ���


data  : 0x3ffe8000 ~ 0x3ffe83ac, len: 940
rodata: 0x3ffe83b0 ~ 0x3ffe9d40, len: 6544
bss   : 0x3ffe9d40 ~ 0x3fff18b8, len: 31608
heap  : 0x3fff18b8 ~ 0x3fffc000, len: 42824

system_get_free_heap_size=31376

ư����ͻ� ��ư�衧2ʬ19�á�

������� GETTEST ���ޥ�ɤϽ���Υۥ��Ȥ��Ф� "GET /" ��Ԥ��Τߤ����ƤǤ������ʾ�Τ褦�����ȤǤ�ư����ǧ�Ǥ������ả���Ǥ�դ� URI �λ���� POST �᥽�åɤؤ��б��ʤɼ��Ѿ�ɬ�פ����դ���긵�ǹԤ����Ȥˤʤ�Ǥ��礦���ڤ��ߤǤ���

���ư��ǻ��Ѥ��Ƥ��븽�����Υե�����켰�Τ��� user1.bin �ʳ��ΥХ��ʥ��ʲ��Υ��������֤˼���Ƥ��ޤ��� ��ʬ�δĶ��� AP �� SSID �ȥѥ���ɤ򥽡����˵��Ҥ��� user1.bin ��ӥ�ɤ����ޤ����ΤǤ����ΥХ��ʥ�켰�� ESP-WROOM-02 �Υե�å������˽񤭹���� AT+GETTEST ���ޥ�ɤ�ư���Ϥ��Ǥ�����̣�Τ������ϼ�����Ǥ�Ǥ����������


(tanabe)

klab_gijutsu2 at 18:00���������URL��Comments(0)��TrackBack(0)
2015ǯ04��21��

��TWE-LITE�ץե����०�����ץ�����ߥ󥰤λ��

¤Ï¤Æ¤Ê¥Ö¥Ã¥¯¥Þ¡¼¥¯¤ËÅÐÏ¿

2017-01-13 �ɵ���
TWE-LITE�ʵ�ɽ����TWE-Lite�ס��Υ᡼�������Ѥ��Ʊ�Ҥ���Υꥯ�����Ȥ˴�Ť��ƴ�Ϣ�ս�β�����Ԥ��ޤ�������̤Ȥ��ơ�2015ǯ4��˸����������ε�����2017ǯ1��ߤο���������䥭����ɤ���ʬŪ��ȿ�Ǥ��줿���ƤȤʤäƤ��ޤ���ǰ�Τ����׽�������ä��Ƥ��꺮��ˤĤʤ������Ǥ��ä˴ޤޤ�Ƥ��ʤ���Ƚ�Ǥ��Ƥ��ޤ������������ȤκݤˤϤ����ղ�������

��Υ磻��쥹��������ͤ� ZigBee ̵���ޥ�����⥸�塼���TWE-LITE DIP�פϥ����ȥѥե����ޥ󥹤��⤯�͵��Τ������ʤǤ�����ڤ˥Ρ��ɴ֤�̵���̿���¸��Ǥ��뤿�� IoT �����������ǤȤ��Ƥ����η�����Ĥ�������֥ͥåȥ���Τ����ƻ��Ω�ƤȤ��Ƥ�ͭ�ѤǤ��礦��
ɸ��Τ�Τ˲ä�ʣ����ŵ��Ū�����Ӥ�¨�����ե����०�������Ȥ��Υ����������ɤ���ȯ�Ķ��ȤȤ��̵���Ǹ�������Ƥ��뤳�Ȥⶽ̣���������ʤϥۥ��� PC �������Ѥ� USB �����ץ� ��TWE-LITE R�� �ޤ��ϻ��Τ� USB ���ꥢ���Ѵ��⥸�塼�롿�����֥���ͳ�Ǽ�ͳ�˥ե������񤭴�������褦�˥ǥ����󤵤�Ƥ��ޤ���

���Τ褦��ñ�ʤ��̿��⥸�塼��ǤϤʤ��ץ�����ޥ֥�ʥޥ�����Ȥ��Ƥ�¦�̤������碌�ʤ�����ʤ������Ǥ��뤳�Ȥ� TWE-LITE DIP ���礭��̥�ϤǤ����ޤ�����Ķ��ñ���פμ����̤�вٻ���ɸ��ե�����Ǥϰ����䤹�����ä˽Ż뤵��Ƥ��ꡢ�������ä��ָ��ι����ȱ��ο������������ʤ���Ĺ�ȸ��äƤ褤�Ǥ��礦��

��ߤΤ��ä���

TWE-LITE �桼���ϥ᡼�������󼨤��륽�եȥ��������ѵ��������˴�Ť��� TWE-NET SDK �����Ѥ��뤳�Ȥ��Ǥ��ޤ����ޤ��������ǧ����ϰϤǸ����ե�����Υ����������ɤ���Ѥ����ꤽ�����Ƥ�������뤳�Ȥ��ǽ�Ǥ���

�ͥåȤ򻲾Ȥ���ȸ������Ǥϼºݤ˸����ե�����˼��ä��� TWE-LITE DIP ��ȤäƤ������ѼԤ����ʤο͵�����٤ޤ����ޤ�¿���ʤ��褦�˸��������ޤ�������2015ǯ04������ε��ҡ��������طʤˤϡ��ޤ������Υե����०�����������¤��Ƥ��뤿����Ѥ����פʥ�������¿�����Ȥ���������ޤ���������˲ä��ơ���̩�˵��Ҥ���Ƥ���ƥե�����Υܥ�塼��Τ��륽���������ɤϤ������Ƥ�Ŭ�ڤ����򤷤ʤ���м�򿨤�ˤ����Ȥ�������⤢��褦�˻פ��ޤ����᡼�������������Ƥ��뤳���Υե�����ϴ���Ū�˼��Ѥ���Ū�Ȥ����ΤǤ��äƶ����ѤǤϤ���ޤ��󤫤顢���Ѥ���¦�ϥ����ɤ������򤸤ä���ڤ��ߤʤ���Υ��ϥ���Ф��륹���󥹤�Ω�Ĥ��Ȥ����ޤ����Ǥ��礦��

�������������Ф餯 TWE-LITE �˿��줿���ݤǤϡ������ˡ֤���äȤ���­������פ�����и����ե�����Υ����ɤ��긫�Ϥ��䤹���ʤꡢ���Τ��Ȥ�����ͥ�줿���ʤ�긵�dz��Ѥ��뵡���Ȥ��뤳�Ȥˤ�Ĥʤ���褦�˴����ޤ������פ��⤫�٤��Τ� "Hello, world!" �Τ褦�ˤ�äȤ�ñ��Ǵʷ�����Ƥ���Ϥ��ޤ�����˽��������դ�����Ƥ������᡼���ξ����ʥ���ץ�ե����ॳ���ɷ��Ǥ����Ǥ��ǰ�ʤ��麣�ΤȤ�������������Τϸ�������ޤ���������2015ǯ04������ε��ҡ��������ǡ��¸����ٶ��򤫤ͤƸ������Ǥμ�ʬ����ã���ʤ�ˤ������������ɤ�񤤤Ƥߤ뤳�Ȥˤ��ޤ�������Ϣ�β����Ǥε��������������β��ˤϸ����ޤǤ�ʤ������ե�����Υ������Ⱦ嵭�� SDK �ޥ˥奢�뤬���˻��ͤˤʤ�ޤ��������λ�ߤϺ�����³���뤫�⤷��ޤ��󤬡��ޤ��Ϥ����ޤǤΥ����������ɤ�ư����ͻҤ�������ޤ�����̣�Τ������������ƤߤƲ�������

���ܵ����˷ǺܤΥ����������ɤˤϸ����ե����०�����Υ����������
�����Ѥ��ޤޤ�ޤ�����갷���˺ݤ��Ƥ����ɽ�����ǧ�ξ塢���Ǥ�
 �֥�Υ磻��쥹���եȥ��������ѵ��������פ����Ƥ��餷�Ʋ�������
  �ʤ����ܵ����Ǥγƥ����������ɤηǺܤʤ�Ӥ˥᡼�������������Ⱦ��
  �ġ��Υڡ����ؤ�ľ�ܤΥ�󥯡�����ʸ�񤫤�ξ����ȴ��ˤĤ��Ƥ�
  �����������˥�Υ磻��쥹�ͤ�꾵�������Ƥ��ޤ���

���ܵ�������ʸ������ܵ����˷ǺܤΥ����������ɤˤϸ��꤬�ޤޤ��
�������ǽ��������ޤ������Τ��Ȥ������ʤ�»���˷Ҥ��ä��Ȥ��Ƥ�
��ɮ�Ԥ���� KLab �ϰ��ڤ���Ǥ���餤�ޤ��󡣤��餫���ᤴλ����������

���Ѿ���ˤĤ���

TWE-LITE �ѥץ�����ߥ󥰤�ɬ�פʾ����¿�����Ϥꡢ�᡼�������������Ȥξ��������Ǥ� TWE-NET SDK �ޥ˥奢�����ޤ���NXP ���� JN5164 �ѤΥڥ�ե���� ��TWE-LITE �� I/O �ݡ��Ȥޤ��� API �Υޥ˥奢��������ʾ��󸻤Ȥʤ�ޤ�����³�Υ����������ɤ򻲾Ȥ����ǺǾ���ɬ�פʤ�äȤ����Ū�ʻ���������ʲ���ȴ�褷�ޤ���
���ޤϥ���å����礭��ɽ������ޤ�

TWE-LITE DIP �Υԥ�����   ï¿½Ê¥á¡¼ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½È¤ï¿½ï¿½ï¿½Ä¶ï¿½ï¿½Ã±ï¿½ï¿½TWEɸ�ॢ�ץ���ڡ�������

TWE-LITE �ե����०���������ɤ�ư��ե���   ï¿½ï¿½ï¿½ï¿½ï¿½Ç¤ï¿½ SDK �ޥ˥奢������

Test01�� LED �����Ǥ�����

�ޤ��ϥޥ������Żҹ���������ǤΡ�Hello, world!�פˤ����� LED �����ǡ��������L �����פ�Ԥ��ޤ����ͥåȥ���̿��ϹԤ��ޤ���

ư����ͻ�

���֤μ̿��ȹ����ޡʥ���å����礭��ɽ����

������������  GitHub

�桼������Υ��٥�ȥϥ�ɥ���� 1�ü����� E_EVENT_TICK_SECOND ���Τ˸Ʊ������ϥݡ��Ȥ� Lo, Hi ��ȥ��뤹��

Test02�� �����å����� LED �ξ��֤�Ϣư������

��� Test01 ������ư���ĥ���ɥ쥹�Ǥ��������٤Ͽʹ֤�����ȿ�������Ƥߤޤ��������ȥ����å��� ON/OFF �� LED ������/���� ��Ϣư���ޤ����ͥåȥ���̿��ϹԤ��ޤ���

ư����ͻ�

���֤μ̿��ȹ����ޡʥ���å����礭��ɽ����

������������  GitHub

����Υ��٥�ȥϥ�ɥ� cbToCoNet_vMain() ��ǥ����ȥ����å��ξ��֤˱����� LED �ξ��֤��Ѳ�������

Test03�� ���ꥢ���ͳ�ǥǥХå���å����������

�ץ�����ߥ󥰤ˤϥǥХå��Τ���μ��ʤ��Բķ�Ǥ���Test02 �Υ����ɤˡ����ꥢ����³��ͳ�� PC ��Υ����ߥʥ륢�ץ�إȥ졼��ʸ����Ϥ��������ä��Ƥߤޤ���PC �Ȥ���³�ˤ����Ѥ� USB �����ץ� ��TWE-LITE R������Ѥ��Ƥ��ޤ������ʻ��Τ� USB ���ꥢ���Ѵ��⥸�塼�롿�����֥�����ѤǤ��ޤ������ͥåȥ���̿��ϹԤ��ޤ���

ư����ͻ�

���֤μ̿��ȹ����ޡʥ���å����礭��ɽ����

������������  GitHub

��ư���� UART �ȥǥХå������Ѥν������Ԥ� vfPrintf() �ؿ���Ȥäƥ��ꥢ��إȥ졼��ʸ�����

Test04�� �����å������ǥ�å����������� �� ����¦�� LED ��ȿ��

̵����������Ԥ��ޤ���Test02 �����֤�Ʊ����Τ�⤦�ҤȤ��Ѱդ��ޤ��������ȥ����å������������ȥ�å�������֥����ɥ��㥹�Ȥ�����������¦�� LED �����������������ޤ���

ư����ͻ�

���֤μ̿��ȹ����ޡʥ���å����礭��ɽ����

������������  GitHub

�����å��������� ToCoNet_bMacTxReq() �ˤ��֥����ɥ��㥹�Ȥ�¹ԡ�����Υ��٥�ȥϥ�ɥ� cbToCoNet_vTxEvent() ����� cbToCoNet_vRxEvent() ������������Τؤ��б���Ԥ�

Test05�� ���Ͼ�������������������ѥ����ɤ�����

�嵭 Test04 �Ǥ�������������Ω�������������Ϥ��ޤ��뤳�Ȥ���Ū�˥᡼������������̵���������ץ��App_Tag�ˡ�������2015ǯ04������Ǥ�̾�Τϡ�Samp_Monitor�ס��������ܥ��󡦼��������å��б���ǽ�ˤ�����ҵ�������EndDevice_Input�ˤǤΰʲ����׽�������줿���ƤǤ���

  • TWE-LITE �Υ⡼������ӥå� 1 (M1) �� GND ����³����Ƥ���Сʤ��ʤ�� M1 �� Lo �Ǥ���Сˡ��ǥ��������� 1 (DI1) ��Ω���夬�� (Lo -> Hi) �������Υȥꥬ���Ȥ���
    ��ŵ��Ū�ˤ�ʿ����Ƴ�̾��֤μ����꡼�ɥ����å�����������Υ�����Ǥ��줿������
    • Ω���夬��ȥꥬ���ξ�� ���ŤΤ��� DI1 �������ץ륢�åפ�̵�������롣���Τ��ᤳ�ξ��ϳ����ץ륢�å��ñ¹³¤ï¿½ï¿½ï¿½ï¿½Ö¤ï¿½ï¿½ë¡£ï¿½Ê¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½È¾ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ò»²¹Í¤ï¿½ 1M�� �ñ¹³¤ï¿½ï¿½ï¿½Ñ¡ï¿½
  • M1 �� GND ����³����Ƥ��ʤ���� DI1 ���������� (Hi -> Lo) ��ȥꥬ���Ȥ���
    ��ŵ��Ū�ˤ�ʿ������Ƴ�̾��֤Υ����ȥ����å����������줿������

  • �����ò½ª¤ï¿½ï¿½ï¿½ï¿½é¤¹ï¿½ß¤ä¤«ï¿½ï¿½ Sleep ���֤ذܹԤ� DI1 �ξ��֤��Ѳ������ Sleep ������������

����¦�� Test04 �Τ�Τ򤽤Τޤ޻Ȥ��ޤ����ʲ���ư�衦�̿��Ǥ�����¦�����֤ϼ����꡼�ɥ����å���ȤäƤ���Ω���夬�긡�Ф�ԤäƤ��ޤ��� ���ʤߤˤ������֤��Ե���Sleep�˾��֤ξ�����ή��¬�ä��Ȥ��� 3��A��0.003mA�ˤǤ��������̤� CR2032 ���������̤Ϥ��褽 225mAh �Ǥ��뤳�Ȥ��顢�����Υ����Ȥ����Ѥ���ñ��׻�������Ե���³��ǽ���֤� 225mAh / 0.003mA * 0.7 �� 52500���� �� 2187.5�� �� 5.99ǯ�Ȥʤ�ޤ����ºݤ����Ӽ�̿���������٤ˤ�ä��礭���Ѥ��Ǥ��礦��

���Ӽ�̿���ꥭ��졼�� - www.digikey.jp

ư����ͻ�

���֤μ̿��ȹ����ޡʥ���å����礭��ɽ����

������������  GitHub

�Ÿ�����ľ���ꥻ�åȸ�Ϥޤ����Τޤ� Sleep ���֤ذܹԡ�DI1 �ξ��֤��Ѳ�����ȵ�������������Ԥ��դ����� Sleep �ء�DI1 ��Ω���夬�꡿Ω��������Τɤ����������Ԥ����� M1 �� Lo / Hi ���֤Ƿ��ꤹ��

��Ͽ����̵���������ץ�ץ������ޥ����ε�Ͽ

2015ǯ4��긵�μ¸�Ū�׷�ؤ��б��Τ�������Ǥθ������ץ���̵���������ץ��App_Tag�ˡ���������̾�Τϡ�Samp_Monitor�ס��οƵ���Parent/�ˤ���ӻҵ���EndDevice_Input/�˥����ɤΥ������ޥ������ߤޤ������ʲ��Ϥ��ε�Ͽ�Ǥ���

�ѹ���ä������������إå�

���١����ΥС������� 2015ǯ4��20�������κǿ��ǡ�Samp_Monitor v1.4.1 �¡פǤ���2017ǯ1��ߤϴ��˸�����λ��
���ѹ��ս�ϼ��̻ҡ�MODIFIED_BY_KLAB�פǶ��̤��Ƥ��ޤ�

�ѹ�����

EndDevice_Input��

  • ���󥵥⡼�ɤ� PKT_ID_BUTTON�ʲ����ܥ��󡦼��������å��� �ξ�硢���٤�������λ�Ǥ������˥��꡼�׾��֤ذܹԤ�������β�������֤�������ԤäƤ���ܹԤ��� (diff)

Parent��

  • �Żҥ֥�������³�����ꤷ DO4 �λ��Ѥ��ɲá����󥵥⡼�ɤ� PKT_ID_BUTTON �λҵ�����ѥ��åȤ����������硢DO1 �� LED �ȥ���˹�碌 DO4 �ξ��֤�ȥ��뤹��
  • PKT_ID_BUTTON �λҵ�����μ���ȯ����ϿƵ����ꥻ�åȤ����ޤ� DO1 �� LED �����Ǥ�����ʼ���̵ͭ�������ܤdz�ǧ���뤿����ص��� (diff)

�ʲ���ư�衦�̿��Ǥϻҵ�¦�����֤ϼ����꡼�ɥ����å�����Ѥ�Ω���夬�긡�Ф�ԤäƤ��ޤ����������äƤ��λҵ����ѥ�᡼�������ˤ����ơ�m�����󥵼��̤�����פˤ� 0xFE����p�����󥵸�ͭ�ѥ�᡼��������פˤ� 1 ����ꤷ�Ƥ��ޤ���

ư����ͻ�

���֤μ̿��ȹ����ޡ��塧�Ƶ��������ҵ����ʥ���å����礭��ɽ����

�����͡�

2017ǯ1��13�������Ǥκǿ��� SDK ��2014/8�����˼�Ͽ����Ƥ���� Samp_Monitor v1.3.2 �λҵ�¦�����������ɤˤ�����ΰտޤȤϰۤʤ��Τȹͤ���������å����ޤޤ�Ƥ��ޤ���

  1. �ҵ��Υѥ�᡼���������Ƥ򥻡����ΰ褫���ɤ߽Ф������ߥ�
    ��/TWESDK/Wks_ToCoNet/Samp_Monitor/EndDevice_Input/Source/EndDevice_Input.c��
    �� �� Samp_Monitor v1.4.1�� �Dz�������ޤ���
  2. �ҵ��Υ��󥵥⡼�ɤ� PKT_ID_BUTTON (0xFE) �ξ��θ�ͭ�ѥ�᡼�� Ω���夬�� (1) / Ω�������� (0) ������Ф������
    ��/TWESDK/Wks_ToCoNet/Samp_Monitor/EndDevice_Input/Source/ProcessEv_Button.c��
    �� �� Samp_Monitor v1.3.3 �Dz�������ޤ���

���Τ��ᡢ���λ����ǡ�̵���������ץ�פ�Ȥ�����ñ�Τ����ۤ���Ƥ����������Ѥ���ۤ����ɤ��Ǥ��礦��


(tanabe)
klab_gijutsu2 at 16:37���������URL��Comments(18)
Blog�⸡��
�ǿ�����
Archives
���Υ֥����ˤĤ���
DSAS�Ȥϡ�KLab �����ۤ����Ѥ��Ƥ��륳��ƥ�ĥ����ӥ��Ѥ�Linux�١����Υ���ե�Ǥ�������5����Υǡ������󥿤ˤƹ��ۤ������Ѥ��Ƥ��ޤ������桹��DSAS����Ȥ��䤹�����������ˡ������Ƥ����ϤDZ��ѤǤ��뤳�Ȥ��ܻؤ��ơ��������ɤ˶Ф���Ǥ��ޤ���
���Υ֥����Ǥϡ������ DSAS �ǻȤäƤ��뵻�ѤξҲ�䡢�¸����Ƥߤ���̤���𡢥ȥ�֥�˴������ޤ줿���ηи��̤ʤɡ���������������������򿥤�ޤ��ƾҲ𤷤Ƥ��������Ȼפ��ޤ���
�ǿ�������
<%==comments[n].author%>
<% } %>