Skip to content

[Bug] [EV3] NXT color sensor is not recognized or replug on all ports, but the sensor is activate on a re-boot #2601

Closed

Description

@BertLindeman

Describe the bug
Plug an NXT color sensor into port S1 and replug into S2 etc.
The sensor light is ON on Port.S1 and Port.S4 but not on ports S2 and S3.
Keep the sensor in a port where the light does NOT come on.
Then power off and on the hub.
Now the sensor is activated.

I assume the light-on means the sensor is correctly recognized.

To reproduce
Steps to reproduce the behavior:

  1. Get an EV3 with V4.0.0.b7 firmware and power-on
  2. Plug the NXT color sensor successively in Ports S1-S2-S3-S4
  3. Remember on which port the light stayed OFF. Keep the sensor in that port.
  4. Power-off the hub and power-on again
  5. See that now the sensor is activated and the light goes on.

Expected behavior
What did you expect to happen instead?
The sensor should be activated either in none of the ports or in all.

Screenshots
There is a saying that a picture is worth a 1000 words. Screenshots really help to identify and solve problems.

extra info

  1. The EV3 on firmware local-build-v4.0.0b6-11-gba4b03996-dirty on 2026-02-26
    did similar, but on different port.
    Sensorlight stayed OFF on Port.S3

  2. Tried the same with an NXT Light sensor, EV3 color sensor and those did not suffer this problem.

Activity

  1. added
    triage
    on Feb 28, 2026
  2. laurensvalk commented on Mar 2, 2026

    @laurensvalk
    Member

    I can't seem to be able to reproduce this.

    Here is a firmware version with debug info for EV3 detection enabled. You should get output such as:

    Start device scan
    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    

    In cases where the light does not come on, what do you see?

    firmware.zip

  3. added
    platform: EV3
    topic: sensors
    software: pybricks-micropython
    and removed
    triage
    on Mar 2, 2026
  4. added theissue type on Mar 2, 2026
  5. BertLindeman commented on Mar 2, 2026

    @BertLindeman
    Author

    With your debug firmware all ports activate the NXT ColorSensor and report like this:

    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    Color Sensor disconnected.
    Start device scan
    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    Color Sensor disconnected.
    Start device scan
    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    Color Sensor disconnected.
    Start device scan
    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    Color Sensor disconnected.
    Start device scan
    

    So can not recreate the problem on this firmware.

    (My C knowledge is zero, so will not try the crc fix)

  6. BertLindeman commented on Mar 2, 2026

    @BertLindeman
    Author

    Update:
    Did many more tests and then the NXT color sensor did not light up a few times.
    But the log did show the same data. 3 plug in / out (On the sensor side cable off/on) shows:

    Start device scan
    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    Color Sensor disconnected.
    Start device scan
    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    Color Sensor disconnected.
    Start device scan
    Device kind detected: 97
    Initializing NXT Color Sensor.
    Finished initializing NXT Color Sensor.
    

    First plugin - no light
    second plugin - light
    third plugin - no light.

    It is not a cable issue, as the color sensor is fixed to the hub and if the led does not come on, I do a reboot without touching the cable. After reboot the light gets on.

  7. laurensvalk commented on Sep 21, 2026

    @laurensvalk
    Member

    Closing and moving remaining item to #2601

    Note that this platform will probably not support auto detect. Starting the ColorSensor class will initiate the process (but only work on port 4 for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: EV3software: pybricks-micropythontopic: sensors

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions