I have created a device claim code for my account using the curl API.
Now when I try claiming a device connected to Serial using this claim code but I keep getting an error “claimcode required”. See below.
C:\Users\aggar>particle serial claim
! claimCode required
I am not sure how the claim code is to be passed as parameter to particle serial claim and could not find reference to it anywhere.
Can someone please help.
Try wrapping your claim code in double quotes. your code there features some forward slashes (
/) which may be taken as path seperators even on Windows.
Thanks ScruffR - tried that and various other forms but its still saying claimCode required…
C:\Users\aggar>particle serial claim “7R/2S0iyFwvRl9ZfKa2oUndKeiZKIfsmguncSC6eLiYOh0ib+0YV2bzkqltIHy/”
! claimCode required
I have looked into the implementation for that command but couldn’t quite figure out what exactly is needed, but you could try
particle serial claim <deviceID> <claimCode>
or maybe try
particle serial claim <COMx> <claimCode>
However, I have filed an issue on GitHub for that
Thanks ScruffR. WIll look forward to hearing more. I also tried the
particle serial claim <deviceID> <claimCode> and
particle serial claim <COMx> <claimCode> versions but they didn;t work either. There must be a specific syntax its looking for.
@jvanier has taken on the issue I filed. Maybe he can chime in here to provide the correct syntax.
The syntax is:
particle serial claim <port> <claimCode>
This is a 63-digit claim code, not a device ID. It’s what you get from the device claims API endpoint.
On the Mac, I was able to get it to work using:
particle serial claim /dev/cu.usbmodemFD3111 ci3CwtnHSy+t37HrLL8KJ4J9LL+OkipxK3F1Yjyvxs3ae6CkJNmgPJmnAnzTbYC
Also note that this only works when the device firmware is 0.6.0 or later. It won’t work with a factory new Photon with 0.5.3 on it until upgraded.
Thanks @rickkas7 @ScruffR
Can confirm that the following syntax has worked:
particle serial claim COM36 “7R/2S0iyFwvRl9ZfKa2oUndKeiZKIfsmguncSC6eLiYOh0ib+0YV2bzkqltIHy/”
COM36 is the coms port particle is connected to on my windows computer
the rest is claim code
Strange, I previously suggested this and you said it didn’t work
Or was your device running on a really old version - which would then be a good point to include in the opening post.
Yes it didn’t work before as the P1 was running an old version. Following @rickkas7 clarification earlier, I upgraded system version first by running and then was able to run particle serial claim in the above format.
I keep getting serial timout. Please let me know if this somehow is fixed as I would need it. No time to figure it out now.