|
If are connecting your SmartMesh IP Manager through the UART pins:
You do not need to do these steps if you plan on connecting your SmartMesh IP Manager over USB. |
By default, the Raspberry Pi uses the UART pin as a command line interface for Linux. After the first boot, you need to configure Linux to not use those pins:
In /etc/inittab
, replace
with
In /boot/cmdline.txt
, replace
with
Reboot the Raspberry Pi so these changes take effect
You do not need to do these steps if you plan on connecting your SmartMesh IP Manager over USB. |
We are connecting the serial API port of the SmartMesh IP manager to the UART on the Raspberry Pi.
Pinout of the Raspberry Pi header:
3.3V | 1 | 2 | 5V |
---|---|---|---|
I2C0 SDSA | 3 | 4 | DNC |
I2C0 SCL | 5 | 6 | GND |
GPIO4 | 7 | 8 | UART TXD |
DNC | 9 | 10 | UART RXD |
GPIO 17 | 11 | 12 | GPIO 18 |
GPIO 21 | 13 | 14 | DNC |
GPIO 22 | 15 | 16 | GPIO 23 |
DNC | 17 | 18 | GPIO 24 |
SP10 MOSI | 19 | 20 | DNC |
SP10 MISO | 21 | 22 | GPIO 25 |
SP10 SCLK | 23 | 24 | SP10 CE0 N |
DNC | 25 | 26 | SP10 CE1 N |
Connections between the Raspberry Pi and DC9003 SmartMesh IP Manager
Raspberry Pi pin | DN9903 pin name (silkscreen) |
---|---|
GND | GND |
3.3V | VBAT |
UART TXD | RX |
UART RXD | TX |
GND | TX CTSn |
GND | RX RTSn
|
The Raspberry Pi comes with Python 2.7, so you can run any application developed using the SmartMesh SDK. Here, we will run DustLink:
Enter the following commands to install DustLink (you only need to do this once)
Start DustLink
http://<your_raspberry_pi_ip_address>:8080/
admin
admin
Managers
Add
section, enter /dev/ttyAMA0
and press Enter. After 10s, this connection is activeRefer to the DustLink documentation for information on using DustLink.
Install screen
:
Create file /home/pi/startDustLink.sh
with the following content:
Change ownership and permission for that file and the DustLink folder:
Have cron
start DustLink on reboot:
then, add the following line:
Reboot the Raspberry Pi
Raspberry Pi is a trademark of the Raspberry Pi Foundation. See http://www.raspberrypi.org/ for details. |