• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

res/values/23-Mar-2024-43

src/com/android/google/experimental/bttraffic/23-Mar-2024-329292

Android.bpD23-Mar-2024153 87

AndroidManifest.xmlD23-Mar-2024692 2319

READMED23-Mar-20242.1 KiB4638

README

1This is a tool to generate classic Bluetooth traffic with specified period and package size.
2Together with the SvcMonitor, which will be called automatically in this android service, can be
3used to measure the CPU usage from the Java layer Bluetooth code and the underlying system service
4com.android.bluetooth.
5
61. Server (Listener) - Client (Sender) model. Both run as an Android service.
72. No pairing needed. Communicate via unsecured RFcomm. Client establishes the connection by
8providing the MAC addr of the server.
93. Bluetooth has to be turned on on both side.
104. Client can configure the traffic by specifying the transfer period and package size.
115. A separate monitor process will be automatically forked and will be reading from /proc file
12system to calculate the cpu usage. The measurement is updated once per second.
136. The monitor process (com.google.android.experimental.svcmonitor/.ScvMonitor) can be run as an
14independent service to measure cpu usage on any similarly configured tests (e.g. wifi, BLE). Refer
15to SvcMonitor's README for usage and details.
16
17Usage:
18To instal the test:
19On both the server and client device, install the 2 apk:
20$ adb install $OUT/system/app/bttraffic/bttraffic.apk
21$ adb install $OUT/system/app/svcmonitor/svcmonitor.apk
22
23To start the service on the SERVER side:
24$ adb shell am startservice -a start --ez ack true \
25com.google.android.experimental.bttraffic/.BTtraffic
26
27To start the service on the CLIENT side:
28$ adb shell am startservice -a start \
29-e addr "F8:A9:D0:A8:74:8E" --ei size 1000 --ei period 15 \
30com.google.android.experimental.bttraffic/.BTtraffic
31
32To stop the test:
33On either the server or client:
34$ adb shell am startservice -a stop \
35com.google.android.experimental.bttraffic/.BTtraffic
36
37To look at the data:
38$ adb logcat | grep bttraffic
39
40Options:
41-e addr: MAC addr of the server, in uppercase letter.
42--ei size: package size, unit: byte; default: 1024, MAX: 20MB
43--ei period: system sleep time between sending each package, unit: ms, default: 5000
44                  ** if -1 is provided, client will only send the package once.
45--ez ack: whether acknowledge is required (true/false)
46