The purpose of this project is to provide simple directions on how to configure simple Web server running on Intel Edison. Code is written for NodeJS, and it will work on any platform (Windows, Linux, PC, MCU...). It is useful to prepare whole project local on desktop PC and then upload final verison to Edison.
Requirements- Intel Edison
- WinSCP software for transfering files
- PuTTy for accessing Intel Edion Linux console.
You should be familiar with Yocto Linux, and this article will not go into step-by-step tutorial how to manage Edison board.
HardwareWe are not using any hardware components like sensors, actuators. Only Edison. But you must finish all step from getting starting tutorial : https://software.intel.com/en-us/get-started-edison-windows
SoftwareIntel Edison come with preinstalled NodeJS. We provide GitHub repository where you can find all files (.js, images, json, html..) for this article. There are main.js and one folder named "files". Inside "files" folder you will find all web documents (index.html, images) for creating web html pages on your web server.
Here is link on github .
If your Edison is connected to Windows PC via USB and finished all step from get started tutorial, you can check USBtoLAN link between Edison and PC. Open your browser and get url : 192.168.2.15
If the Edison is not configured for a WiFi access point, you will see IP Address : none.
You need to configure Intel Edison to have WiFi access. Start any terminal application (like PuTTY) and connect to Linux console running on Edison. Start configure_edison --wifi tools, and follow instructions. IP address for host is 192.168.2.15, username and password you should provide during initial setup at the begining of this article.
root@edison# configure_edison --wifi
null
Configure Edison: WiFi Connection
Scanning: 1 seconds left
0 : Rescan for networks
1 : Exit WiFi Setup
2 : Manually input a hidden SSID
3 : TP-LINK_E1FE2E .....
Now your Edison has WiFi access. By the way, what is 192.168.2.15? That address is internal RNDIS network connection between PC, Edison via USB cabel.
InstallationDownload .zip of whole edison-workbook repository, and copy SimpleWebServer to any temp location on your Windows / Linux. We are doing that only to prepare uploading data to Edison. For uploading to Edison from local folder, we are going to use WinSCP :
You have to upload folder SimpleWebServer from left window to /home/root on right window. That is it... we are almost finished. Going to check.
Start PuTTY terminal, login and navigate to the SimpleWebServer folder. Uploaded data doesn't include npm libraries, so we need start installation of project. For this step, your Edison have to have internet connection!
//install express framework.
npm install
...
... npm will scan package.json and install all dependecies
... be patient
...
//after npm finish installation the last step is running webserver
null
node app.js
Example app listening on port 3000!
null
IT WORKS ....
Now, you open URL in your browser : htpp://192.168.0.109:3000 (this is IP case for my Edison, you can see your IP adress on Device Information web page.
If it works, web page show
Comments