After Victor Palau wrote a new blog for his PiGlow API snap, I tried to operate PiGlow LED and learnt following ways to interact with it.
a. Use python:
python3 -c 'from urllib.request import urlopen; print(urlopen("http://REALIP:8000/v1/on", data=b""))'
b. Use curl:
curl -i -X POST "http://REALIP:8000/v1/on"
c. Use html web page in web browser
<form action="http://192.168.0.151:8000/v1/flare" method="post">
<input type=submit value=flare>
In case you want to play snappy but don’t have a Raspberry Pi 2 or other hardware…
1, sudo apt-get install virtualbox
2, download snappy image http://cdimage.ubuntu.com/ubuntu-snappy/15.04/20150423/ubuntu-15.04-snappy-amd64-generic.img.xz
3, unxz ubuntu-15.04-snappy-amd64-generic.img.xz
4, VBoxManager convertdd ubuntu-15.04-snappy-amd64-generic.img snappy.vdi –format VDI
5, launch Virtualbox GUI app, create a new VM, OS type is Linux, Version is Ubuntu 64bit, memory is 512MB, Hard driver use an exist virtual hard disk file and select snappy.vdi we just converted from img file.
6, in Settings->Network, change Network Adapter from NAT to Bridged Adapter
7, Start VM, you can use browser to access Snappy App Store by url “webdm.local:4200” or login in from console or ssh with username/password ‘ubuntu/ubuntu’ to do anything fun snappy things like update/rollback
1, components on the desk
6, piglow plugged
8, Ubuntu Sanppy is running.. \o/
1, Install Ubuntu 14.04 or 15.04 on ONDA V116w.
2, Plug ethernet cable
3, sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get install build-essential git
4.1, git clone https://github.com/lwfinger/rtl8723bu
4.2, cd rtl8723bu
4.4, sudo make install
5.1, git clone https://github.com/lwfinger/rtl8723au_bt
5.2, cd rtl8723au_bt
5.3, ‘git checkout new’ for kernel 3.18 and later
5.5, sudo make install
5, add ‘8723bu’ and ‘btusb’ in /etc/modules
start from official tutorial http://developer.ubuntu.com/scopes/tutorial/
implement search function
implement preview function
build executable file, and dbus service file out
install executable file, scope file and service file.
killall unity-scope-home to restart the Home scope so that it loads the new scope
what’s scope? what’s master scope?
The search engine itself, talking to a web service or a local database. It can be exposed to the user in two ways in the Dash: as a standalone scope or as part of a master scope.
The architecture used to merge multiple scopes in the same Dash view.
how to debug?
use libunity-tool -g
My first scope project
BKMs and tips
recommend C language to programming scope for performance although python and vala still working
Ubuntu SDK do not show Unity Scope project in project list
apt-get remove all QT related packages and reinstall Ubuntu SDK
dbus name limitation
sometime libunity-tool can’t list all running scopes’ dbus name. we can fill its group name and unique name manually
use master scope to list all results.
manually add headers path and libraries to link
check name matched in all place
who familiar Unity API
Michal Hruby (mhr3)
build and install. some files will be not installed if only run ‘sudo make install’
- sudo make install
I followed the link  of linuxjournal to make my Nexus 7 can boot up Android and Ubuntu Touch without reflash system. Now I can easy show off Ubuntu Touch to my friends and read ebook by Kindle for Android now. I’m interested what solution will be used for dualboot on Ubuntu Edge or its successor.