Assigning hardware in an image

Alexander Sack asac at canonical.com
Wed Jul 8 12:39:37 UTC 2015


Hi Saviq,

On Wed, Jul 8, 2015 at 2:19 PM, Michał Sawicz
<michal.sawicz at canonical.com> wrote:
> Hey snappy!
>
> For the past few weeks I've been working, on and off, on
> porting/packaging the Open Energy Monitor software [1] on my shiny
> Orange Matchbox. The idea is to create a snappy-based image to replace
> their raspbian-based solution for easy maintenance and everything else
> snappy is great for.
>
> All in all packaging seems to have been the easy bit [2] - I fought
> quite a bit with freeing up the /dev/ttyAMA0 serial port for the RFM96Pi
> [3] to communicate over 433MHz. I will describe everything in detail
> soon in a series of posts to G+, I think, but I digress.
>
> Having freed the serial port, I need to hw-assign it to the service that
> expects to read from it. While that's fine in developer mode, I thought
> it must be possible to predefine hw assignments in a gadget or oem snap
> so that the shipped image Just Works™ for the purpose it's built for. I
> couldn't find a way to do so anywhere in the documentation. Ogra
> mentioned this could be done in the app snap, but it wouldn't be
> accepted in the Ubuntu store (and for good reasons - not to mention
> other hw could use a different serial port, so the app snap should have
> a config option for it).
>
> What's the plan for this use case? I thought oem/gadget snaps are
> supposed to rule them all, find them all, bring them all and in the
> darkness – unless you use a white-on-black terminal – bind them (in an
> image)?

We have basic ability to assign hw to apps in the oem snap for 15.04.
The ability to describe capabilities on platform and app level as well
as assigning them will see big improvement towards 16.04, but 15.04
should have the basics you need already.

Have you checked how we map a webcam to the app in our appliance
guide? https://developer.ubuntu.com/en/snappy/guides/appliance-builder-guide-webcam/

Thanks!

>
> [1] https://github.com/openenergymonitor/
> [2] https://uappexplorer.com/app/emonhub-pi.saviq
> [3] http://wiki.openenergymonitor.org/index.php?title=RFM69Pi_V3
>
> Happy snappy,
> --
> Michał Sawicz <michal.sawicz at canonical.com>
> Canonical Ltd.
>
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>



More information about the snappy-devel mailing list