-
Notifications
You must be signed in to change notification settings - Fork 1k
umqtt subscribe to topic with 23 bytes fails #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like the subscribe method needs to handle variable length encoding of the payload size, in the same way that connect and publish do. |
…coding (fixes micropython#284) * Add `_varlen_encode` method to write variable length encoded remaining length bytes to packet buffer and use it consistently. * Use `int.from_bytes/to_bytes` to de/encode short integers and replace `ustruct` usage with it. * Correctly separate bytes of fixed and variable header in `connect` method. * Comment out unused import of `ubinascii.hexlify`. Signed-off-by: Christopher Arndt <[email protected]>
…coding (fixes micropython#284) * Add `_varlen_encode` method to write variable length encoded remaining length bytes to packet buffer and use it consistently. * Use `int.from_bytes/to_bytes` to de/encode short integers and replace `ustruct` usage with it. * Correctly separate bytes of fixed and variable header in `connect` method. * Comment out unused import of `ubinascii.hexlify`.
…coding (fixes micropython#284) * Add `_varlen_encode` method to write variable length encoded remaining length bytes to packet buffer and use it consistently. * Use `int.from_bytes/to_bytes` to de/encode short integers and replace `ustruct` usage with it. * Correctly separate bytes of fixed and variable header in `connect` method. * Comment out unused import of `ubinascii.hexlify`.
This appears ot have been fixed in the linked MRs/commits. Proposing to close this issue. |
Looks like the author's PR was closed last year without merging, so I think this may still be an issue. |
I had the same issue and @SpotlightKid fix worked for me. Sad that the PR is not merged |
Hi,
I can't subscribe to topic longer than 122 bytes. Publishing works fine!
I kindly ask you to verify and hopefully fix it
Thanks a lot
Danny
OK - working:
but one more character:
this might be related to #163 which also deals with 127 bytes
it might be related to
micropython-lib/umqtt.simple/umqtt/simple.py
Line 148 in f20d89c
The text was updated successfully, but these errors were encountered: