File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- metadata (version = "0.2.0 " )
1
+ metadata (version = "0.2.1 " )
2
2
3
3
require ("aioble-core" )
4
4
Original file line number Diff line number Diff line change 33
33
34
34
_ADV_TYPE_FLAGS = const (0x01 )
35
35
_ADV_TYPE_NAME = const (0x09 )
36
+ _ADV_TYPE_SHORT_NAME = const (0x08 )
36
37
_ADV_TYPE_UUID16_INCOMPLETE = const (0x2 )
37
38
_ADV_TYPE_UUID16_COMPLETE = const (0x3 )
38
39
_ADV_TYPE_UUID32_INCOMPLETE = const (0x4 )
@@ -187,9 +188,9 @@ def _decode_field(self, *adv_type):
187
188
yield payload [i + 2 : i + payload [i ] + 1 ]
188
189
i += 1 + payload [i ]
189
190
190
- # Returns the value of the advertised name, otherwise empty string .
191
+ # Returns the value of the complete (or shortened) advertised name, if available .
191
192
def name (self ):
192
- for n in self ._decode_field (_ADV_TYPE_NAME ):
193
+ for n in self ._decode_field (_ADV_TYPE_NAME , _ADV_TYPE_SHORT_NAME ):
193
194
return str (n , "utf-8" ) if n else ""
194
195
195
196
# Generator that enumerates the service UUIDs that are advertised.
Original file line number Diff line number Diff line change 3
3
# code. This allows (for development purposes) all the files to live in the
4
4
# one directory.
5
5
6
- metadata (version = "0.2.0 " )
6
+ metadata (version = "0.2.1 " )
7
7
8
8
# Default installation gives you everything. Install the individual
9
9
# components (or a combination of them) if you want a more minimal install.
You can’t perform that action at this time.
0 commit comments