Import devices - Feature Request - Accept the 2D barcode scan input

So I recently discovered the very nice:

This allows you to import many devices at a time to a product, sandbox, etc. It's nicely done with a lot of nice functionality.

Would I would love to see is be able to put my cursor in the Manual entry field and use a 2D barcode scanner to add devices to the queue to be added. This nearly works but it parses out the 2nd part of the 2D barcode on the Particle.IO sticker rather than the 1st part. In this case, the serial number happens to be the first part.

Any chance you could code it such that it parses out the first 15 characters rather than the last 15 characters of the 2D barcode.

Not a big deal as I just use excel, scan a bunch of devices in, split by text and then copy/paste it over but I'm lazy... would be nice if I could just do it right in the web browser. :slight_smile:

Notice in the screen shot, I had my cursor in the manual entry box. I scanned in a particle device given it's 2D barcode but the number that made it in the queue of devices to be added was the 2nd number in that 2D barcode and not the first. If it accepted the 1st, I could just run down and scan as many as I want without any manual manipulation in excel or notepad.

Figured I'd ask.

1 Like

It should already do that. Could you DM me exactly what your reader is putting in the text box? I need the exact serial number and mobile secret. The code picks out what it belives are a serial number, Device ID, or ICCID, but I think it's falsely detecting the mobile secret as one of the other things.

1 Like

Thanks Rick... I just sent you a DM.

@jgskarda, I just tested with my barcode reader and it seems to have picked up the serial number just fine. Mind you, the device I scanned was already in a product, if that makes a difference, and it was correctly identified from the scan.

Huh.. interesting. What type of device were you scanning? I was scanning a boron. I wonder if they encode different data in the 2D barcode in different device types? I tried a few different ones too and it always picked up the second number. The mobile secret I think is what it’s called. Both are exactly 15 characters in length. If I can in the 2D barcode into notepad I get this.
P044ADREDACTEDF PHRE6REDACTEDLF

The serial number is the first one but what gets entered is the second.

Fixed. There is a fallback serial number rule for things that might possibly be a serial number. It should only have used that if there was not a known serial number on the same line; this is what caused the mobile secret to overwrite the actual serial number.

4 Likes

Awesome. Thanks Rick! I'll be testing it again here shortly for the next batch.

(Update) - I just scanned in a batch of 10. All worked great. Thank you very much!

5 Likes