Bluetooth LE microcomputer / module Windows 10 Blue too t h LE Application
R01AN6004EJ0100 Rev.1.00 Page 2 of 78
Aug.31.21
Contents
1. Overview ................................................................................................................................. 5
1.1 LED Switch Service Client ....................................................................................................................... 6
1.2 Virtu al U ART C l ient ................................................................................................................................. 6
2. Operation Check ...................................................................................................................... 7
2.1 Executable File ........................................................................................................................................ 7
2.1.1 LED Switch Service Client ..................................................................................................................... 7
2.1.2 Virtu al U ART C l ient ............................................................................................................................... 7
2.2 Windows Ap pl icati on Specificati on .......................................................................................................... 8
2.2.1 LED Switch Service Client ..................................................................................................................... 8
2.2.2 Virtu al U ART C l ient ............................................................................................................................. 10
2.3 Preparation of Operation Check Environment ...................................................................................... 12
2.3.1 Windows PC ........................................................................................................................................ 12
2.3.2 Target Board for RX23W ..................................................................................................................... 12
2.3.3 Target Board for RX23W module ........................................................................................................ 12
2.3.4 EK-RA4W1 .......................................................................................................................................... 12
2.3.5 EB-RE01B ........................................................................................................................................... 12
2.3.6 RL78/G1D Evaluation Board (RTK0EN0001D01001BZ) .................................................................... 13
2.4 Operation Check .................................................................................................................................... 14
2.4.1 Operation check using LED Switch Service Client.............................................................................. 14
2.4.2 Operation ch ec k using Virtual UART Cl ient ........................................................................................ 20
3. Build ...................................................................................................................................... 27
3.1 Build Environment Setup ....................................................................................................................... 27
3.1.1 Install Visua l Stud io 20 17 .................................................................................................................... 27
3.1.2 Install Window s 10 SDK ...................................................................................................................... 30
3.2 File Structur e ......................................................................................................................................... 33
3.2.1 LED Switch Service Client ................................................................................................................... 33
3.2.2 Virtu al U ART C l ient ............................................................................................................................. 33
3.3 Build Windows Application .................................................................................................................... 34
4. Implementation Details .......................................................................................................... 35
4.1 Program file of Wi ndows ap plica tio n ..................................................................................................... 35
4.2 Use Bluetooth LE API of UWP with WPF .............................................................................................. 35
4.3 LED Switch Service Client ..................................................................................................................... 36
4.3.1 MainWindow class ............................................................................................................................... 36
4.3.1.1 Field (Member variable) .................................................................................................................... 36
4.3.1.2 Constructor ........................................................................................................................................ 37
4.3.1.3 Method/ Event han dl er ....................................................................................................................... 38
4.3.2 AdvertisementWatcherInformation class ............................................................................................. 43
4.3.2.1 Property ............................................................................................................................................. 43