I have an output (of a well known btmon tool) as in example below and I need to parse it and get some info from it in the next way: if UUID is presented in the section HCI event: and it equals to 32f9169f-4feb-4883-ade6-1f0127018db3 then take the value of Address: and RSSI: fields and put them together and make a new line. For example,
A0:E6:F8:48:EF:78 B7
A0:E6:F8:48:F1:AF B7
So here is a stream or file I need parse in the described way:
> HCI Event: LE Meta Event (0x3e) plen 43 [hci1] 0.775003
LE Advertising Report (0x02)
Num reports: 1
Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
Address type: Random (0x01)
Address: 27:40:9B:C3:23:7D (Non-Resolvable)
Data length: 31
Company: Microsoft (6)
Data: 010920005a6710df0df2265a4f2c5529c9cf62dfe7427b9f31f2ae
RSSI: -87 dBm (0xa9)
> HCI Event: LE Meta Event (0x3e) plen 43 [hci1] 1.524064
LE Advertising Report (0x02)
Num reports: 1
Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
Address type: Public (0x00)
Address: A0:E6:F8:48:EF:78 (Texas Instruments Inc)
Data length: 31
Flags: 0x05
LE Limited Discoverable Mode
BR/EDR Not Supported
Company: not assigned (30816)
Data: ef48f8e6a000
128-bit Service UUIDs (complete): 1 entry
32f9169f-4feb-4883-ade6-1f0127018db3
RSSI: -73 dBm (0xb7)
> HCI Event: LE Meta Event (0x3e) plen 43 [hci1] 2.375147
LE Advertising Report (0x02)
Num reports: 1
Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
Address type: Random (0x01)
Address: 33:02:7C:4A:D6:FC (Non-Resolvable)
Data length: 31
Company: Microsoft (6)
Data: 01092000de74c964f3b4a3a59fde73f2c0c29651b9532a0e88c4e4
RSSI: -79 dBm (0xb1)
> HCI Event: LE Meta Event (0x3e) plen 43 [hci1] 2.876845
LE Advertising Report (0x02)
Num reports: 1
Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
Address type: Public (0x00)
Address: A0:E6:F8:48:F1:AF (Texas Instruments Inc)
Data length: 31
Flags: 0x05
LE Limited Discoverable Mode
BR/EDR Not Supported
Company: not assigned (44896)
Data: f148f8e6a000
128-bit Service UUIDs (complete): 1 entry
32f9169f-4feb-4883-ade6-1f0127018db3
RSSI: -73 dBm (0xb7)
> HCI Event: LE Meta Event (0x3e) plen 12 [hci1] 2.891581
LE Advertising Report (0x02)
Num reports: 1
Event type: Scan response - SCAN_RSP (0x04)
Address type: Random (0x01)
Address: 6B:AB:CD:7F:B7:65 (Resolvable)
Data length: 0
RSSI: -91 dBm (0xa5)