[ Linkit Smart 7688 ] 取得 Mac Address / IP

Firmware 0.9.3 版本可透過點擊 WiFi Button 來得知 Mac Address 或 IP,
當 Linkit Smart 7688 的網路設定為 AP Mode 時,在序列埠監控視窗中會出現 Mac Address;當 Linkit Smart 7688 的網路設定為 Station Mode 時,在序列埠監控視窗中會出現 IP。

MAC Address 如 【 f0:56:76:88:9e:6D 】
IP Address 如 【 192.168.1.106 】

前置準備作業

  1. 準備一片 Linkit Smart 7688 Duo 開發板

  2. 更新 Firmware 為 0.9.3
    http://goo.gl/dVLQ2Y

  3. 安裝 Arduino IDE
    https://www.arduino.cc/en/Main/OldSoftwareReleases

  4. 將 Linkit Smart 7688 Duo 連接至電腦

Arduino Code

  • Step 1. 將下方的程式複製到 Arduino IDE 中,並上傳至 Linkit Smart 7688 Duo 中
long linuxBaud = 9600;       // the baudrate for 7688 UART0

void setup() {  
  Serial.begin(115200);      // open serial connection via USB-Serial
  Serial1.begin(linuxBaud);  // open serial connection to 7688 UART0
}

void loop() {  
  int c = Serial.read();     // read from the USB-Serial

  if (c != -1) {
    Serial1.write(c);        // pass it to the 7688 UART0
  }

  c = Serial1.read();        // read from the 7688 UART0
  if (c != -1) {             
    Serial.write(c);         // pass it to the USB-Serial
  }
} 

Imgur

  • Step 2. 開啟序列埠監控視窗並點擊 WiFi Button

【 AP Mode 】 Imgur

【 Station Mode 】 Imgur


參考資料
List of blogs

Archer

Having being a full stack engineer. Experience with C, Python, Go, Swift, JavaScript, Node.js, LinkIt 7697, LinkIt Smart 7688, Raspberry Pi, ARM mbed, IoT solutions. Contact us : [email protected]

ALL RIGHTS RESERVED. COPYRIGHT © 2016. Designed and Coded by Makee.io