Skip to content

Instantly share code, notes, and snippets.

@thalesfsp
Created July 4, 2017 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thalesfsp/0bbade64f128a7c2545895c0bcd2dcb6 to your computer and use it in GitHub Desktop.
Save thalesfsp/0bbade64f128a7c2545895c0bcd2dcb6 to your computer and use it in GitHub Desktop.
Working with Intel Edison

Updating firmware

First download the firmware in the Intel website.

Then open the mounted disk and remove everything inside. Unzip the content of the download in the drive then access the Edison true screen (see the tutorial bellow).

And run the command:

$ reboot ota

Connect to Intel Edison using Screen

After conncting the USB cable to the debug serial port (the mini USB port in the far left) you can find the usbserial address using the command:

$ cat /dev/tty.usbserial*

/dev/tty.usbserial-A903BX8V

It should output something like /dev/tty.usbserial-A903BX8V.

Now you can use screen to connect to the Edison board.

$ screen /dev/tty.usbserial-A903BX8V 115200

After the command screen you pass the Edison "tty.usberial" address that we discovered in the first command, in my case /dev/tty.usbserial-A903BX8V and after that the baud rate 115200

Now you will be prompted with the login screen. If it do not prompt from start just hit the return key.

Poky (Yocto Project Reference Distro) 1.6.1 vitor-edison ttyMFD2

edison login: 

The default login is root and there's no password ;)

After you are logged in you can run the edison-config --setup command to configure the name, password, wifi connection and other goodies of the board.

Turning on the bluetooth module in your Intel Edison

If you run the command hciconfig command and you can't find the module, just restart your bluetooth module.

Run the command

$ rfkill unblock bluetooth

Now if you run the command hciconfig you should see something like:

root@edison:~# hciconfig
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 98:4F:EE:03:FF:19  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING PSCAN 
        RX bytes:661 acl:0 sco:0 events:38 errors:0
        TX bytes:1472 acl:0 sco:0 commands:38 errors:0

Then you can turn the bluetooth device hci0 up.

$ hciconfig hci0 up

Now you are good to go to find and connect to Bluetooth Low Energy devices.

Lets make the Intel Edison act as a Beacon ;)

I will use the Bleno Node.js module to create a Beacon peripheral.

Run npm install bleno then create a file index.js and put this content in:

var bleno = require('bleno');

var uuid = 'e2c56db5dffb48d2b060d0f5a71096e0';
var major = 1;
var minor = 1;
var measuredPower = -59;

bleno.startAdvertisingIBeacon(uuid, major, minor, measuredPower);

Now you can run node index.js and use an iPhone/Android Beacon Reader app to search for it.

How to set a fix IP in Intel Edsion

Edit the file /etc/wpa_supplicant/wpa_cli-actions.sh around the line 50.

$ vim /etc/wpa_supplicant/wpa_cli-actions.sh

Close to the line 50 change it to this.

if [ "$CMD" = "CONNECTED" ]; then
    kill_daemon udhcpc /var/run/udhcpc-$IFNAME.pid
#   udhcpc -i $IFNAME -p /var/run/udhcpc-$IFNAME.pid -S
    ifconfig $IFNAME 192.168.1.171 netmask 255.255.255.0
    route add default gw 192.168.1.1
fi

And we are done!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment