Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

umqtt subscribe to topic with 23 bytes fails #284

Open
@DDDanny

Description

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:

#122 bytes
mqtt.subscribe(b"/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/2") 

but one more character:

#123 bytes
mqtt.subscribe(b"/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/234567890/23") 
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "test.py", line 169, in <module>
 File "umqtt_simple.py", line 154, in subscribe
 File "umqtt_simple.py", line 173, in wait_msg
OSError: -1

this might be related to #163 which also deals with 127 bytes

it might be related to

struct.pack_into("!BH", pkt, 1, 2 + 2 + len(topic) + 1, self.pid)
as this is hitting the 128...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /