Skip to content

humberto-garza/Edison-Getting-Started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Edison Getting Started (Windows)

It is important to mention that this board works without problems in a Linux Environment as well; but this tutorial focuses in Windows.

First of all, you will need to get some drivers installed so you don't have any issues.

Do this BEFORE you plug your board in!

SETUP

  • Go to This page and get the Driver Software. It is the file: IntelEdisonDriverSetup1.2.1.exe Follow These Steps:
    alt tag

alt tag


alt tag


alt tag


alt tag



alt tag


  • Connect Both USB Cables to The Board
  • Open Windows Device Manager
  • Under Ports (COM & LPT) you should see the COM of your EDISON If you cannot see the Proper COM as in the last picture try the following:
    alt tag

alt tag


alt tag


alt tag


alt tag


alt tag


  • Under Network Adapters you should see the Intel Edison RNDIS Adapter If you cannot see the Proper COM as in the last picture try the following:
    alt tag

alt tag


alt tag


alt tag


alt tag


Flash New Image

When working with the Edison, you may find convenient knowing a way to completely flash the Board:

You must add the dfu-util directory to the path manually. Do the following:

  1. Right-click on the Computer icon and select Properties.
  2. Choose Advanced system settings in the left pane.
  3. Click Environment Variables at the bottom of the Advanced tab.
  4. Edit the Path variable in the system variables list (the lower list). Assuming that dfu-util was extracted to C:\Program Files (x86), insert a semicolon and add C:\Program Files (x86)\dfu-util-0.7-binaries\win32-mingw32 to the path.
  • Reboot your Computer
  • Open Zadig
  • Options>List all Drivers
  • Select RNDIS (Interface 0) and Replace Driver to libusbK (v3.0.7.0)

alt tag


  • Unzip The file To any Folder with no spaces that you wish:
  • CD to that folder and execute flashall and follow the instructions in the screen (this may take up to 15 minutes, be patient):

alt tag


-When it is over, make sure you leave it connected for at least 2 minutes so it reboots properly:

Serial Connection

  • Open Putty, under the serial Connection Write the COM That was assigned to the edison FTDI adapter. We must use the USB Serial PORT; not the Virtual COM Port since this is the one that the Arduino IDE uses. The BAUD is 115200 Reference:
    alt tag

  • Edison login: root
  • Now you can have access to the Linux Yocto OS

SSH Connection (RNDIS)

  • Open Network and Sharing Center
    alt tag

  • Change adapter settings
    alt tag

  • If Disabled, Enable the RNDIS Network Adapter
    alt tag

  • Go To The Adapter Properties and double click the Internet Protocol Version 4 (TCP/IPv4) option
    alt tag

  • Use These parameters for the Static IPv4 Address and click OK
    alt tag

  • Go to Putty and Select SSH Configuration using these Parameters
    alt tag

  • Click YES
    alt tag

  • Edison login: root
  • Now you can have access to the Linux Yocto OS

SSH File Explorer

  • Download WinSCP
  • Open WinSCP and add a New Site with these Parameters (If your Edison has no password, leave that field blank)
    alt tag

  • Add This Key to WinSCP
    alt tag

  • You Should now have access to the Files with GUI
    alt tag

Android/Windows - Wifi SSH

  • Download the App JuiceSSH
  • Configure The Edison Name and Password. I suggest you only change to password to password
configure_edison --setup
  • Start AP Mode. The Second command is to stop that service
systemctl start hostapd
systemctl stop hostapd

Because the Broadcom module does not support STA/AP concurrently, hostapd and wpa_supplicant cannot run simultaneously. Use the following commands to start/stop wpa_supplicant manually:

systemctl start wpa_supplicant
systemctl stop wpa_supplicant
  • Scan with yout Phone (or computer) for WIFI
  • It should be called Something like EDISON:XX:XX
  • The password is the same one as assigned in step 2

In case you want to know the default wifi password before you set it up you must use your Edison Serial number, and it should be something like this: FZED443D01RNZ501. This can be found in the Box or:

cat /etc/hostapd/hostapd.conf | grep wpa_passphrase
  • Now you need to know the Edison IP to access by SSH
ifconfig

alt tag


  • Open JuiceSSH and connect like this:

alt tag


Instead of using JuiceSSH you can just use Putty in Windows

  • You can as well access the archives with a GUI in Android. Donwload File Explorer App
  • Follow These Steps:

alt tag


Interact with Serial 2

As you should know, the Edison's SERIAL2 is actually the Linux Serial terminal; it is connected to the uUSB connector with an FTDI chip, so if you are planning in using the SERIAL2, things might get a bit complicated. I will explain how can you achieve such connection and get the right communication noise free!
Just as a FYI, you should know how to change the BAUD of any Serial /dev/

stty -F /dev/ttyMFD1 [baud]
  • Connect both uUSB cables to your computer.
  • Connect the Edison through COM and SSH in 2 Putty sessions

alt tag


  • Type these Commands in the SSH Session (it has to be in the SSH session because once the first command is executed, the terminal will be disabled and you will not be able to input the second one):
systemctl stop serial-getty@ttyMFD2.service
dmesg -n 1
  • Test your connection with an echo, you should see something like this (rememebr that the serial2 is in /dev/ttyMFD2):
echo Hello World > /dev/ttyMFD2

alt tag


  • Test the connection from the Device to the Edison:

alt tag


Intel Analytics Platform

IoT Analytics includes resources for the collection and analysis of sensor data that the Intel® IoT Developer Kit provides without having to invest in large-scale storage and processing capacity. While it is possible to store sensor values directly on an Intel® Edison board, IoT Analytics is the preferred, convenient location for storing sensor values for safekeeping and future manipulation.

  • Connect your Edison to Internet:
configure_edison --wifi
  • Make a ping to test your connection:

alt tag


There are certain commands to interact with the platform:

  • Make sure that you hace the appropriate version >= 1.7.0
iotkit-admin version  
  • If you do not have this version try these commands to update your toolset:
npm install -g npm
npm install iotkit-agent
npm install mraa
npm update -g iotkit-agent 
  • First you hace to test it works
iotkit-admin test
  • If you are having issues with this, try these commands:
iotkit-admin reset-code
iotkit-admin reset-components
iotkit-admin initialize

When you Register your device in the Platform, it will "belong" to the account that registered it. So if you want to register it in a new account but you did not remove it from the previous account, it will say it is not available. In order to avoid that, you can choose the ID for your device.

  • Choose a new ID fot your Device in this format XX-XX-XX-XX-XX-XX-XX. If you are the owner of this Edison you can skip this step, if you are sharing it you may do this for good. (I recommend you split your phone number to make it fit there and make sure it cannot be repeated by other users in the world); the second command will return the ID and make sure it was accepted:
iotkit-admin set-device-id XX-XX-XX-XX-XX-XX-XX
iotkit-admin device-id

alt tag


  • Once you did this, go to: menu>Devices>Add a New Device:

alt tag


  • Go to: menu>Account>Activation Code:

alt tag


  • Activate your Device with the Code you just got:
iotkit-admin activate [activation_code]
  • By Default your new account hase some sensors registered, you can check them out like this:
iotkit-admin catalog

alt tag


  • For this test, we will try the temperature one and add the powerswitch as well:
iotkit-admin register temperature temperature.v1.0
  • Make sure the register was successful, you should see something like this:
iotkit-admin components

alt tag


  • Set the Communication protocol to mqtt and start the service :
iotkit-admin protocol mqtt
systemctl start iotkit-agent
  • Test sending sensor data to the cloud:
iotkit-admin observation temperature 40

alt tag


  • Go to the Platform menu>charts Select your device and you should see in the graph the 40 degrees we just sent:

alt tag


You can go further and control your board with this platform

  • We will test this in Arduino To Make Sure it all works, and understand the program flow. Download the Library and add it to your Intel Arduino IDE
  • You should see the examples in your IDE Like this

alt tag


  • Register the Powerswitch and test it:
$ iotkit-admin register power powerswitch.v1.0
$ iotkit-admin observation power 1

Make sure that there is no other process “listening” to the port UDP41235 or UDP41234 before you run it (kill -9 if necessary)

  • Leave running the IoTKitActuationExample.ino
  • Go to menu>control, select your device, select power component and follow these steps:

alt tag


  • See the message in the Arduino serial monitor

To Go even further you can explore the platform rules!

  • Go to menu>control and instead of sending all valid actions, save them as complex command

alt tag


  • Go to menu>rules>Add a Rule, The Priority will not modify the behavior of the actuation; this just helps the sorting

alt tag


alt tag


alt tag


  • When a rule's condition is met, you can see it in your dashboard. Remember you are responsible for the code that listens to the platform's notifications

alt tag


####Configure your MCU launching service to run scripts automatically Doing this with the new Yocto Image is quite simple, all you have to do is follow these instructions this was taken from the official Intel Edison MCU Setup guide:

Just as a FYI, you should know how to keep the WiFi up even after reboot so it will reconnect automatically /dev/

systemctl start connman
systemctl enable wpa_supplicant
systemctl start wpa_supplicant
#In this file you can see the WiFi configuration:
vi /etc/wpa_supplicant/wpa_supplicant.conf 
``
`
> - In a serial communication session with your board, open the mcu_fw_loader.sh file using a text editor such as vi.<br/>

vi /etc/intel_mcu/mcu_fw_loader.sh


For each script that you want to run, type /folderpath/scriptname.sh, where folderpath is the location where the script is stored and scriptname is the name of the script, as shown in the example below. Each script should be on its own line. Be sure to include any required arguments for running the script.
For example, the following file is configured to run **init_i2c8.sh** and **init_DIG.sh**:<br/>

> ![alt tag](Diagrams/51.PNG) <br/>
----------

#### MCU SDK
In order to get the MCU to work, you can follow this [guide](https://software.intel.com/en-us/node/545143)

About

Edison Setting Up

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published