README.md 2.1 KB
Newer Older
Spyder McHenry's avatar
Spyder McHenry committed
1
2
# a71ch-aws-client

apapkovskiy's avatar
apapkovskiy committed
3
4
5
6
7
8
9
10
## Connecting interfaces for a71ch-aws-client on Cascade-500"

```
sudo snap connect a71ch-aws-client:network-bind :network-bind
sudo snap connect a71ch-aws-client:network-control :network-control
sudo snap connect a71ch-aws-client:network-setup-control :network-setup-control
sudo snap connect a71ch-aws-client:lib-engine rigado-hsm-server:lib-engine
sudo snap connect a71ch-aws-client:lib-cert rigado-hsm-server:lib-cert
apapkovskiy's avatar
apapkovskiy committed
11
sudo snap connect a71ch-aws-client:bluetooth-control :bluetooth-control
apapkovskiy's avatar
apapkovskiy committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
```

## Configuration the JRCP connection

Set the connection hostname (the default value is 127.0.0.1)
```
sudo snap set a71ch-aws-client jrcp-hostname=<jrcp server hostname>
```

Set the connection port (the default value is 8050)
```
sudo snap set a71ch-aws-client jrcp-port=<jrcp server port>
```
## Pre-provisioning A71CH

apapkovskiy's avatar
apapkovskiy committed
27
Set initialize.jsch file for apdu_player
apapkovskiy's avatar
apapkovskiy committed
28
```
apapkovskiy's avatar
apapkovskiy committed
29
sudo snap set a71ch-aws-client device-jcsh="$(cat initialize.jcsh)"
apapkovskiy's avatar
apapkovskiy committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
```
## Provisioning A71CH
```
a71ch-aws-client.provisioning
```
## Switch on auto-provisioning

During the start the  the pub-sub-sample service check whether there is or no SampleConfig.json. If there is no this file then the pub-sub-sample service runs provisioning

```
sudo snap set a71ch-aws-client a71ch-do-provisioning=AUTO_PROVISIONING
```
AUTO_PROVISIONING is the default value for a71ch-do-provisioning

## Switch on provisioning during every the pub-sub-sample service start
```
sudo snap set a71ch-aws-client a71ch-do-provisioning=DO_PROVISIONING
```

apapkovskiy's avatar
apapkovskiy committed
49
## Switch off provisioning
apapkovskiy's avatar
apapkovskiy committed
50
51
```
sudo snap set a71ch-aws-client a71ch-do-provisioning=DONT_PROVISIONING
apapkovskiy's avatar
apapkovskiy committed
52
53
54
```

## The main workflow
apapkovskiy's avatar
apapkovskiy committed
55
1. Install rigado-hsm-server snap in devmode
apapkovskiy's avatar
apapkovskiy committed
56
2. Install a71ch-aws-client snap
apapkovskiy's avatar
apapkovskiy committed
57
58
59
60
3. !!! Very important. Check in the AWS account if there is a thing corresponding to the pre-provisioning device ID, delete it if it present
4. Set up pre-provisioning A71CH
5. Check publishing messages

apapkovskiy's avatar
apapkovskiy committed
61
62
63
64
65
66
67
68
The messages have JSON format and followed structure
{
  "sensors": [ {
                    "sensorMACAddr": "XX:XX:XX:XX:XX:XX",
                    "movements": XX,
                    "RSSI":XX
             }]
}
apapkovskiy's avatar
apapkovskiy committed
69