512 is max length for variable length, not fixed
This commit is contained in:
parent
96774b15da
commit
a3cc3ebdaf
2 changed files with 2 additions and 2 deletions
|
|
@ -51,7 +51,7 @@ class Characteristic:
|
|||
:param int write_perm: Specifies whether the characteristic can be written by a client,
|
||||
and if so, which security mode is required. Values allowed are the same as ``read_perm``.
|
||||
:param int max_length: Maximum length in bytes of the characteristic value. The maximum allowed
|
||||
is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum
|
||||
is 512, or on nRF, 510 if ``fixed_length`` is True. The default, 20, is the maximum
|
||||
number of data bytes that fit in a single BLE 4.x ATT packet.
|
||||
:param bool fixed_length: True if the characteristic value is of fixed length.
|
||||
:param buf initial_value: The initial value for this characteristic. If not given, will be
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class StringCharacteristic(Characteristic):
|
|||
properties=properties,
|
||||
read_perm=read_perm,
|
||||
write_perm=write_perm,
|
||||
max_length=510, # shorter than 512 due to fixed_length==False
|
||||
max_length=512,
|
||||
fixed_length=False,
|
||||
initial_value=initial_value,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue