Skip to content

Commit 71ac465

Browse files
authored
Add AWS IoT FWE Example (#31)
1 parent b85070f commit 71ac465

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# qemu x86-64 wiht FleetWise Edge Agent
2+
3+
This example showcases how to run, include, configure, and use an AWS IoT Fleetwise Edge Agent.
4+
5+
Apart from adding it to an image along with can-utils
6+
```
7+
IMAGE_INSTALL:append = " aws-iot-fleetwise-edge \
8+
can-utils "
9+
```
10+
It's important to configure some of the parameters in order for the FWE to connect to a specific AWS IoT account and to use the right vehicle ID as well as consume data from the appropriate CAN bus.
11+
12+
For more info on what all this means, take a look at the official documentation
13+
https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/vehicles.html
14+
15+
Example config:
16+
```
17+
CERTIFICATE:pn-aws-iot-fleetwise-edge="-----BEGIN-----\nXXXXX\n-----END-----\n"
18+
PRIVATE_KEY:pn-aws-iot-fleetwise-edge="-----BEGIN-----\nXXXXX\n-----END-----\n"
19+
VEHICLE_NAME:pn-aws-iot-fleetwise-edge="v1"
20+
ENDPOINT_URL:pn-aws-iot-fleetwise-edge="xxx.iot.region.amazonaws.com"
21+
CAN_BUS:pn-aws-iot-fleetwise-edge="vcan0"
22+
```
23+
This will use the `configure-fwe` from [here](https://github.com/aws/aws-iot-fleetwise-edge/blob/main/tools/configure-fwe.sh) to create an appropriate config.json.
24+
25+
More information about AWS IoT FleetWise Edge Agent can be found [here](https://github.com/aws/aws-iot-fleetwise-edge/blob/main/README.md).
26+
27+
## build an qemux86-64 image with FleetWise Edge Agent installed
28+
29+
* Build the image
30+
31+
```bash
32+
bitbake core-image-minimal
33+
```
34+
* Run this image in QEMU. (root password disabled)
35+
```bash
36+
runqemu slirp nographic
37+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
MACHINE = "qemux86-64"
2+
DISTRO = "poky"
3+
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
4+
5+
SDKMACHINE = "x86_64"
6+
7+
TEST_SUITES = " ping aws-iot-fleetwise-edge "
8+
9+
QEMU_USE_KVM = ""
10+
QEMU_USE_SLIRP = "1"
11+
12+
IMAGE_INSTALL:append = " aws-iot-fleetwise-edge \
13+
can-utils "
14+
15+
CERTIFICATE:pn-aws-iot-fleetwise-edge="-----BEGIN-----\nXXXXX\n-----END-----\n"
16+
PRIVATE_KEY:pn-aws-iot-fleetwise-edge="-----BEGIN-----\nXXXXX\n-----END-----\n"
17+
VEHICLE_NAME:pn-aws-iot-fleetwise-edge="v1"
18+
ENDPOINT_URL:pn-aws-iot-fleetwise-edge="xxx.iot.region.amazonaws.com"
19+
CAN_BUS:pn-aws-iot-fleetwise-edge="vcan0"
20+
21+
# systemd
22+
DISTRO_FEATURES:append = " largefile ptest multiarch systemd"
23+
VIRTUAL-RUNTIME_init_manager = "systemd"
24+
VIRTUAL-RUNTIME_initscripts = ""
25+
VIRTUAL-RUNTIME_syslog = ""
26+
27+
QB_MEM = "-m 2048"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
BBPATH = "${TOPDIR}"
2+
BBFILES ?= ""
3+
4+
BBLAYERS = "\
5+
${OEROOT}/meta \
6+
${OEROOT}/meta-poky \
7+
${OEROOT}/../meta-aws-demos \
8+
${OEROOT}/../layers/sw/meta-aws \
9+
${OEROOT}/../layers/sw/meta-openembedded/meta-oe \
10+
${OEROOT}/../layers/sw/meta-openembedded/meta-python \
11+
${OEROOT}/../layers/sw/meta-openembedded/meta-networking \
12+
"

0 commit comments

Comments
 (0)