particle-iot / particle-android

Particle Open Source for Android
Apache License 2.0
37 stars 38 forks source link

Can't unset the "claimed" status on the device #98

Open brady-aiello opened 4 years ago

brady-aiello commented 4 years ago

The device unclaim() method only unclaims the device in Particle Cloud. It doesn't actually remove the claimed status on the device, which means that no user will be able to reclaim device again until the claimed flag is reset. I faced this issue here: https://community.particle.io/t/failing-to-setup-product-that-has-previously-been-claimed/54410

The flag can be reset to false (c=0) either by reflashing the firmware as described here,

dfu-util -d 2b04:d006 -a 1 -s 1762:64 -D clear_claim.bin

I don't think we can use the particle firmware api for this, though, as it relies on the ability to flash at specific device address offset.

or by manually setting the claim code through the softap api described here.

I see there's already a general "Set" command, but it's only used for setting the claim code.

Can we get an "unsetup" workflow to set "c" to 0 (claimed to false)?