This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Master Control Panel DFU code uses device name instead of UUID for

During testing I changed the device name in the DFU. After making the change the DFU client in the master control panel would no longer work.

Is it possible to make the master control panel select the device based on the custom UUID instead of the device name?

My thought is that a device name should be user friendly, and a UUID is intended for machines. Therefore the DFU code which is not a person should use the UUID and not the device name designation.

Parents
  • I agree that this should work, and as far as I can see, this works as expected with the current Master Control Panel. When trying it, I'm able to use MCP to upload a new firmware to the device no matter what name it advertises with.

    Edit: The default implementation checks both the name and the address, and if both are not in the advertising packet, it will not work properly. However, you can actually change this by editing the files in lib/dfu/. The method you're looking for is the _discover_peer_named() function in master_emulator.py, and the easiest way to fix this is actually to just not check the name at all, and just succeed if the address is correct.

Reply
  • I agree that this should work, and as far as I can see, this works as expected with the current Master Control Panel. When trying it, I'm able to use MCP to upload a new firmware to the device no matter what name it advertises with.

    Edit: The default implementation checks both the name and the address, and if both are not in the advertising packet, it will not work properly. However, you can actually change this by editing the files in lib/dfu/. The method you're looking for is the _discover_peer_named() function in master_emulator.py, and the easiest way to fix this is actually to just not check the name at all, and just succeed if the address is correct.

Children
No Data
Related