File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,6 +300,23 @@ def test_parse_advertisement_data_zero_padded():
300300 assert adv .tx_power is None
301301
302302
303+ def test_parse_adv_data ():
304+ data = [
305+ bytes .fromhex (
306+ "02.01.06.05.02.E0.FF.E7.FE.0B.FF.65.0B.88.A0"
307+ ".C8.47.8C.EA.D1.C1.0C.09.4D.32.5F.42.31.41.38"
308+ ".53.31.30.50" .replace ("." , "" )
309+ )
310+ ]
311+ adv = parse_advertisement_data (data )
312+
313+ assert adv .local_name == "M2_B1A8S10P"
314+ assert adv .service_uuids == ["0000fee7ffe0-0000-1000-8000-00805f9b34fb" ]
315+ assert adv .service_data == {}
316+ assert adv .manufacturer_data == {2917 : b"\x88 \xa0 \xc8 G\x8c \xea \xd1 \xc1 " }
317+ assert adv .tx_power is None
318+
319+
303320def test_parse_advertisement_data_zero_padded_scan_included ():
304321 data = [
305322 b"\x02 \x01 \x06 \t \xff Y\x00 \xfe \x02 4\x9e \xa6 \xba \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 "
You can’t perform that action at this time.
0 commit comments