Device not found to unclaim

Hello, I purchased a Photon and it showed up in my account when I login to the website. Then I deleted it from there, hoping to claim it to a “customer” during testing. When I connect to the device using the SoftAP setup, I can get the device info, which shows the deviceId, and shows claimed: true. When I try to unclaim it via the API using an access token obtained from the clientId and secret,I get an error back that the device does not belong to me. What gives?

I can get through the whole SoftAP setup process, and the LED starts to breath cyan (indicating it is connected to the internet), but I never see a customer or the device when I look in the web console. I do set a customer scoped claim code as part of the SoftAP setup before calling connect.

It seems like my device is some sort of limbo. I can send the device ID via PM if someone from Particle can assist.

Has this device got a PRODUCT_ID assigned in code?
Have you tried to claim the device via CLI?

Logged in as the customer or a dummy account (with valid email tho’)

particle device add <deviceID>

If it is still claimed to an account you should be given the option for Particle to send a release request to the current owner. This way you should be able to find out whether it’s still claimed to yourself or your customer already.

Otherwise, @rickkas7?

I was able to claim it via the command line just now, and it showed up back in my account. What do I need to do for a customer to claim it? I have two-legged authentication set up, and these are the steps I am following:

In the web-backend:

  • Create customer with no password using the API
  • Create claim code scoped to this customer (created using clientId and secret, associated with a product)
    In the mobile app:
  • Put device in listening mode
  • Get device info and public key
  • Send claim code to device
  • Call configure with Wi-Fi network details
  • Call connect

I assumed that I have to remove the device from my user account, in order for a customer to claim it.

The Wi-Fi connection is successful, but the device does not show up on the customer (or anywhere for that matter), and the customer does not show up in the console for that matter.

Also, your question: > Has this device got a PRODUCT_ID assigned in code?
I am not sure how to do this or where this fits in in the process above.

When you talk of a customer I assume this would be a customer that’ll have a Particle based product you have registered in https://console.particle.io/products , right?
If so, you got a product ID for that product. And in order to have that device become that product, you need to flash some firmware to it that features these two lines of code

PRODUCT_ID(<yourProductID>)
PRODUCT_VERSION(<yourCurrentVersion>)

And you should also add the device ID to the list of devices for that product.

You are correct about the customer. I was missing the piece about having to add the deviceId to the list of devices for the product. I thought that the fact that I was using an access token created using a specific product OAuth credentials would automatically make that association. Once I added the deviceId to the product using the web console, I was able to claim the device for the customer. Thanks for your help!

1 Like