How to assign a hardware in my snap application?

XiaoGuo Liu xiaoguo.liu at canonical.com
Thu Aug 25 02:33:53 UTC 2016


Hi,

On Series 16, we need to use interface to make the connection between the
Ubuntu core and Snap apps in order to make use of the hardware. Previously,
on 15.04, I used the following command do get the hardware assignment:

(RaspberryPi2)ubuntu at localhost:~$ sudo snappy hw-assign piglow.sideload
/dev/i2c-1
'piglow.sideload' is now allowed to access '/dev/i2c-1'

Currently, I list all of the interfaces from raspberry pi snappy image, but
I do not find any interface which corresponds to my requirement.  Do I need
to wait for the interface? or I did it wrongly? What should be the right
interface to use in my case?

ubuntu at localhost:~/apps$ snap interfaces
Slot                    Plug
:bluetooth-control      -
:firewall-control       -
:fuse-support           -
:hardware-observe       -
:home                   -
:kernel-module-control  -
:locale-control         -
:log-observe            -
:mount-observe          -
:network                piglow-app,snapweb
:network-bind           piglow-app,snapweb,webcam-webui
:network-control        -
:network-observe        -
:opengl                 -
:ppp                    -
:process-control        -
:snapd-control          snapweb
:system-observe         -
:system-trace           -
:timeserver-control     -
:timezone-control       -
:tpm                    -
-                       webcam-webui:camera

Also, I find that the "camera" interface is missing in the current image.

Thanks & best regards,
XiaoGuo

-- 
XiaoGuo, Liu (刘晓国)
Mobile: +86-13911181302
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160825/a1bec9ad/attachment.html>


More information about the Snapcraft mailing list