The use case that’s currently broken for is we have a gadget snap for a device with a branded store, which defines four gpio slots:
slots:
sku-bit-a:
interface: gpio
number: 345
sku-bit-b:
interface: gpio
number: 368
sku-bit-c:
interface: gpio
number: 347
some-led:
interface: gpio
number: 346
There’s a snap hosted in the branded store which specifies the qualified (ie. named) gpio plugs it uses in its snapcraft.yaml. This snap is the only snap hosted in the branded store that uses the gadget slots involved. The expectation was that when the snap gets installed, all of these connections happen automatically.
apps:
ledapp:
command: ledcmd
daemon: simple
plugs:
- some-led
- sku-bit-a
.
.
plugs:
some-led:
interface: gpio
sku-bit-a:
interface: gpio
.
.
I’d been working with @pedronis and @jdstrand on adjustments to the snap-declarations of both the client snap, and the gadget snap to get this to work, but so far to date we’ve been unsuccessful. At this point, the only snap-declaration change that is live, is a Slots stanza for the gadget snap which grants permission to the client snap:
"gpio": {
"allow-auto-connection": {
"plug-snap-id": [
<snapId>
]
}
}
When the snap is installed today, the following error is output:
$ sudo snap install client-snap
2017-05-26T16:41:29-04:00 INFO cannot auto connect client-snap:sku-bit-c (plug auto-connection), candidates found: “gadget:sku-bit-a, gadget:some-led, gadget:sku-bit-b, gadgetc:sku-bit-c”