Skip to content

Commit 5e454bc

Browse files
committed
Give the snap access to serial ports - closes #3152
1 parent 639e181 commit 5e454bc

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ It is an open source [Web of Things](https://www.w3.org/WoT/) gateway.
1414

1515
- If you have a Rasberry Pi, the easiest way to use the gateway is to [download and flash](http://webthings.io/gateway/) a pre-built software image to an SD card.
1616
- If you prefer to use Docker, we have a prebuilt Docker image available [here](https://hub.docker.com/r/webthingsio/gateway), for both ARM and amd64. You can also build your own image from this repository.
17-
- On Ubuntu or Ubuntu Core you can install the experimental [snap package](https://snapcraft.io/webthings-gateway) with `$ snap install webthings-gateway --edge`. (Requires the `system-observe` and `network-manager` interfaces to be connected in order to configure network settings).
17+
- On Ubuntu or Ubuntu Core you can install the experimental [snap package](https://snapcraft.io/webthings-gateway).
1818
- Otherwise, you can build WebThings Gateway from source yourself (see below).
1919

2020
## Documentation

snap/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
A self-hosted web application for monitoring and controlling a building over the web.
2+
3+
**Installation**
4+
5+
On Ubuntu Server/Ubuntu Desktop:
6+
7+
`$ sudo snap install --edge webthings-gateway`
8+
`$ sudo snap connect webthings-gateway:system-observe`
9+
`$ sudo snap connect webthings-gateway:hardware-observe`
10+
`$ sudo snap connect webthings-gateway:network-manager`
11+
`$ sudo snap set system experimental.hotplug=true`
12+
`$ sudo snap restart webthings-gateway`
13+
14+
On Ubuntu Core:
15+
16+
`$ snap install --edge webthings-gateway`
17+
`$ snap install network-manager`
18+
`$ snap connect webthings-gateway:system-observe`
19+
`$ snap connect webthings-gateway:hardware-observe`
20+
`$ snap connect webthings-gateway:network-manager network-manager:service`
21+
`$ sudo snap set system experimental.hotplug=true`
22+
`$ snap restart webthings-gateway`
23+
24+
Currently untested on other host operating systems.
25+
26+
To connect a USB dongle:
27+
28+
`$ snap interface serial-port`
29+
30+
(to find the name of the slot automatically created by hotplug, then...)
31+
32+
`$ snap connect webthings-gateway:serial-port snapd:foo`
33+
34+
(where "foo" is the name of the slot)
35+
36+
Note: This snap package is currently experimental and may not yet be fully functional. For manual installation instructions of a stable version please see https://webthings.io/docs/gateway/installation/

snap/snapcraft.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ apps:
1818
- network-bind
1919
- system-observe
2020
- network-manager
21+
- serial-port
22+
- hardware-observe
2123

2224
parts:
2325
python-deps:

0 commit comments

Comments
 (0)