Search devices based on device ID?

My project (based on a custom P1 design) is now rolling out in a limited beta. I have about 70 devices in the “Particle Devices” tab, but I’ll soon have many thousand. They are all called “No title (click to edit)” so it’ very hard for me to locate a specific DeviceID. This is useful for pressing the “Signal”-button to identify that you have the correct device in front of you.

Would it be possible to add a search-button with a filter on this list? The same wish applies to the Devices tab in the Console.

How about to give a friendly name via CLI scripting with particle device rename as idea in the meantime?

1 Like

It’s a good idea, but I need to get that in as part of the setup of each board as it comes from the factory. I load a program that registers the device and writes a “friendly ID” to the Flash. I only use the CLI to set WiFi credentials since it appears that it’s not possible to do that with code. (If I call setCredentials on a fresh board I get a hard crash)

So doing this means that I have to:

  1. Use CLI for setup
  2. Have the device register itself with our cloud service
  3. Use CLI to manually give it a name

It increases the length of the setup for each board. For 1000 boards - that stuff matter’s…

It shouldn’t hard fault! Can you post your code?

This only happens to “fresh” P1 modules and I don’t have any left at the moment :-/

If I update the firmware on them it works as it should, but that kind of defeats the purpose since updating them requires them to go online to fetch that update.

@jenschr, you can update via DFU without using OTA.

Right, but when making many hundred boards you really want to find a fully automated way to do this? Using this I can only figure out a way that requires that you put the device in DFU mode 3 times?

  1. I manually place the device in DFU, update it via USB with “particle update” via CLI.

  2. I could then use Bash scripting to flash it via USB. This officially requires that you put the device in DFU mode, but you can make it “jump” straight into programming by issuing a “particle serial flash xxx.bin” command. This will however not successful all the time (maybe 90% of the time?). Here I could supply the wifi credentials and then the software would nee to run a while to do it’s thing (connecting to AWS to register the device and such).

  3. Then I’d need to put it back into DFU mode again to Flash it with it’s final software.

If I had a guarantee that “particle serial flash xxx.bin” would always put it into DFU mode, this could work well, but ever so often it’ll just crash the CLI though, requiring you to kill that window and start up a new session and do it all again. If I manually place the device in DFU mode, it’ll work every time.

Maybe there’s some clever way for my test jig to put the device in DFU mode?

@jenschr, you can put the P1 into DFU mode by setting the port speed to 14400 baud. There is even a shell script for testing P1 flashing in the firmware repo:

firmware\user\tests\scripts\p1sflashtest\p1sflashtest.sh

You could adapt it to your needs.

2 Likes

That looks like a great starting point @peekay123! How do you know all this stuff? :smile:

1 Like

@jenschr, I stand on the shoulders of giants (other Elites) :wink:

3 Likes