3 An example showing the use of CHIP on the Linux. The document will describe how
4 to build and run CHIP TV Example on Raspberry Pi. This doc is tested on **Ubuntu
5 for Raspberry Pi Server 20.04 LTS (aarch64)** and **Ubuntu for Raspberry Pi
6 Desktop 20.10 (aarch64)**
10 - [CHIP TV Example](#chip-tv-example)
11 - [Building](#building)
12 - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4)
16 <a name="building"></a>
22 $ sudo apt-get install git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev ninja-build python3-venv python3-dev unzip
24 - Build the example application:
26 $ cd ~/connectedhomeip/examples/tv-app/linux
27 $ git submodule update --init
28 $ source third_party/connectedhomeip/scripts/activate.sh
32 - To delete generated executable, libraries and object files use:
34 $ cd ~/connectedhomeip/examples/tv-app/linux
37 <a name="running-complete-example"></a>
39 ## Running the Complete Example on Raspberry Pi 4
41 > If you want to test ZCL, please disable Rendezvous
43 > gn gen out/debug --args='bypass_rendezvous=true'
46 > Note that GN will set bypass_rendezvous for future builds, to enable
47 > rendezvous, re-generate using
49 > gn gen out/debug --args='chip_bypass_rendezvous=false'
53 1. A Raspberry Pi 4 board
54 2. A USB Bluetooth Dongle, Ubuntu desktop will send Bluetooth advertisement,
55 which will block CHIP from connecting via BLE. On Ubuntu server, you need
56 to install `pi-bluetooth` via APT.
57 3. Ubuntu 20.04 or newer image for ARM64 platform.
61 Follow [Building](#building) section of this document.
65 - [Optional] Plug USB Bluetooth dongle
67 - Plug USB Bluetooth dongle and find its bluetooth device number. The
68 number after `hci` is the bluetooth device number, `1` in this
72 hci1: Type: Primary Bus: USB
73 BD Address: 00:1A:7D:AA:BB:CC ACL MTU: 310:10 SCO MTU: 64:8
74 UP RUNNING PSCAN ISCAN
75 RX bytes:20942 acl:1023 sco:0 events:1140 errors:0
76 TX bytes:16559 acl:1011 sco:0 commands:121 errors:0
78 hci0: Type: Primary Bus: UART
79 BD Address: B8:27:EB:AA:BB:CC ACL MTU: 1021:8 SCO MTU: 64:1
80 UP RUNNING PSCAN ISCAN
81 RX bytes:8609495 acl:14 sco:0 events:217484 errors:0
82 TX bytes:92185 acl:20 sco:0 commands:5259 errors:0
86 $ cd ~/connectedhomeip/examples/tv-app/linux
87 $ sudo out/debug/chip-tv-app --ble-device [bluetooth device number]
88 # In this example, the device we want to use is hci1
89 $ sudo out/debug/chip-tv-app --ble-device 1
91 - Test the device using ChipDeviceController on your laptop /