Goodbye IDF 2015

IDF this year was a massive amount of work but well worth the effort.

Publish to IBM Bluemix via Mosquitto from Intel Edison

Here is how to publish to IBM Bluemix via ‘mosquitto_pub’ (comes already installed on Intel Edison).


$ mosquitto_pub -h 'your_org.messaging.internetofthings.ibmcloud.com' 
-i 'd:your_org:your_type:your_mac' -m '{"d":{"Volts":5}}' 
-t 'iot-2/evt/status/fmt/json' -q 1 -p 1883 
-u 'use-token-auth' -P 'YOUR_TOKEN_HERE'

These are the required inputs, replace the variable bits with your own authentication info:
-i client_id aka d:[YOUR_ORG]:[YOUR_TYPE]:[YOUR_MAC]
-h host [YOUR_ORG].messaging.internetofthings.ibmcloud.com
-t topic iot-2/evt/status/fmt/json
-q quality 1
-m value e.g. ‘{“d”:{“Volts”:5}}’
-p port 1883
-u username use-token-auth
-P password ‘YOUR_TOKEN’

Connect Intel Edison to 802.11G or 802.11N Wireless

Thanks to Jeffery Tu for sharing the below solution to connecting Edison to 802.11G and 802.11N.

First, run:

configure_edison --wifi

Next, use the script from the PDF file: edison_wifi_331438001.pdf

Like this:


##
if [ $# != 2 ] ; then
echo "$0  "
exit
fi

wpa_cli -iwlan0 disconnect
wpa_cli -iwlan0 remove_network all
wpa_cli -iwlan0 add_network
wpa_cli -iwlan0 set_network 0 mode 0
wpa_cli -iwlan0 set_network 0 ssid \"$1\"
wpa_cli -iwlan0 set_network 0 aut h_alg OPEN
wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK
wpa_cli -iwlan0 set_network 0 proto RSN
wpa_cli -iwlan0 set_network 0 psk \"$2\"
wpa_cli -iwlan0 set_network 0 scan_ssid 1
wpa_cli -iwlan0 select_network 0
wpa_cli -iwlan0 enable_network 0
wpa_cli -iwlan0 reassociate
wpa_cli -iwlan0 status

Node.js for the Internet of Things at O’Reilly Solid

Had the opportunity to give a workshop on the topic of Intel Edison, Node.js and the Internet of Things at O’Reilly Solid earlier today. Also had a great time attending Sandeep Mistry’s Bluetooth LE + Arduino workshop later in the day.

What the Hack! Hardware hackathon discussion with Jeremy Foster

Thanks so much to Jeremy Foster from Microsoft for spending an hour with Intel to discuss the topic of hardware hackathons. We had a great exchange of ideas about the future of Internet of Things and the importance of DX for hardware and software developers!

How to install Mono on Intel Edison

This is the fastest way to get Mono onto your Intel Edison. I saw some other solutions that involve compiling Mono yourself which takes hours, do this instead to install an existing precompiled image using opkg.

This process works specifically for the Week 18 build (Yocto 2.1).

Step 1: Flash your Edison with the latest image and get it online

Step 2: Configure your Edison with the extended OPKG binaries

First, open a terminal to your Edison and run vi like this:

vi /etc/opkg/base-feeds.conf

Now insert these lines:

 src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32

Now save and quit and run update:

opkg update
opkg upgrade

Step 3: Install Mono

opkg install mono

AWS Pop-up Loft with Intel Edison Part II (May 22nd edition)

Here I am back at the AWS Loft giving a workshop on the topic of connecting Intel Edison to AWS. This time we got a little crazy and started incorporating some Johnny-Five and Node.js-based tracks for interested developers!

How to stream audio via Bluetooth with Intel Edison

I apologize in advance, these are working notes I took during a hackathon from a developer who got Edison working as an audio source via Bluetooth. Some steps may be missing. If you find anything wrong with this please tweet me: @rexstjohn.

First, install PulseAudio via opkg if not installed and unblock Bluetooth (see rfkill instruction below). Install drivers for Bluez etc. There are some steps over here.

$ rfkill unblock bluetooth

Next, put your audio device into pairing mode. Then, on your Intel Edison do this:


$ bluetoothctl (opens the bluetooth agent)...
$ agent
$ set agent KeyboardDisplay
$ default-agent
$ scan on


Locate the audio controller from the list:


$ pair xx:xx:xx:xx (with the audio controller you get from scan on, your Bluetooth speaker)
$ connect xx:xx:xx:xx


On the linux terminal, now play the file


$ pactl list | grep -A1 SUSPENDED | grep Name (show list of devices suspended)


Scroll through the list and find the “sink.” Hint: Look for thing that says “State suspended”, find the “sink” that is suspended.

It will look like this: bluez_sink.[your mac address with colons as underscores]


$ pactl set-default-sink bluez_sink.[yourmacaddress]


Now use PulseAudio / mplayer to play your audio file. Copy a wav file into Edison (probably using scp), then play it like this:


$ “./mplayer youraudio.wav"