Skip to content

[Bug] Occasional Device Disconnects with 4.0.0b9 #2698

@DrTom

Description

@DrTom

One of my custom devices when attached as a PUPDevice gets disconnected by the hub (tested on inventor / spike) occasionally. Such a disconnect happens randomly but likely within 10 minutes with Pybricks 4.0.0.b9. Under Pybricks 3.6.1 the connection seems very stable; two attached devices ran for more than 3 hours without one connection dropped by the hub.

I am experimenting with a several devices which are based on the same hardware and run the same implementation of the UART protocol (LUMP). I am not quite certain what causes the problems but this device tends to send longer packages and those more frequently. The length of the most commonly used mode is 16 bytes. The frequency is slightly higher than 100Hz.

There is also a 32byte mode and it is possible to crank up the frequency further if that helps. I did not yet check if the situation gets worse with those parameters. I would like to help to debug this on the hub but I have no idea how. Since the disconnects are unpredictable and not that frequent it seems instrumentation after the fact is required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hub: primehub/inventorhubIssues related to the LEGO SPIKE Prime hub and LEGO MINDSTORMS Robot Invetor hubtopic: port ioUsing custom devices and protocols on io portstopic: sensorsIssues involving sensors

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions