Workbench local flash on Chromebook


#1

I was excited to learn that the latest Chrome OS (75.0…) would include USB support for Linux so I’d able to flash particle devices locally, using the Workbench on my Chromebook.
The device did register indeed and all looked promising:
image
Yet, I wasn’t able to flash the electron firmware locally through the Workbench.

Does anyone has any experience with this?


#2

I don’t really have any experience using Particle on a chromebook beyond using the web IDE. (IMHO chromebooks aren’t terribly great development machines.)

I do have some questions that might help you get closer to success however.

Could you describe your working environment better?

Could you post some screenshots of workbench and attempts to flash firmware?

Was the electron in DFU mode when you tried to flash firmware?


#3

Thanks for your reply.
Since Chromebooks lately also work as Linux computers, I suspected that this platform wouldn’t be inferior to others, especially that the VSC is not extremely resource hungry.
So far everything has been working as expected on the Linux branch, with the exception of the USB connection. Most certainly it is not specific to the Workbench, but that’s what I’d use for Particle development and I was hopeful that a more experienced developer already figured out how to establish the connection.
Prior to the latest Chrome OS release USB was not supported for Linux applications, so the issue of local flash was out of question.
Following the latest OS update the Chrome OS/Linux recognizes Particle devices connected via the USB port (see pics below), so it would be really great to be able to fully utilize the Workbench.
Upon issuing the local flash command, the process terminates with the this error:


In the meantime it is indicated in the Chrome settings that a USB connected Particle device has been recognized and it is running in DFU mode:
56%20PM

It would be nice to be able to bridge the gap.


#4

ah, interesting. you could try adding udev rules: run the Particle: Launch CLI command and then run particle usb configure in the terminal that launches

if that fails with an interesting error, please share :pray:

btw, if you haven’t seen them already we have docs over here:

https://docs.particle.io/workbench/

in particular, linux tips here:

https://docs.particle.io/support/particle-tools-faq/workbench/#linux-tips

let us know how things go :+1:


#5

oh, another thing that’d be helpful: run the Particle: Audit Environment command and scan the report it generates for fields like ok: false - if you spot any, please share the non-sensitive parts of the report here :pray::+1:


#6

m_m, thanks for your input!
I’ll dive into the suggested docs and report the results
Since I have little experience with Linux, it needs a bit more time.
It is the Chromebooks’ affordability and portability that made me excited about this option, once I was able to install the Workbench and saw that it was running fine.
Using a $250 Chromebook would be a great option for field work and testing which many times happen in an environment where you wouldn’t want to expose a more expensive laptop.


#7

sounds good :+1:

Using a $250 Chromebook would be a great option for field work

good point. it’d be great to see it working - let me / us know what you find!


#8

Hi,

same problem here:

But I’m not using a chromebook, I’m using VSCode/workbench on Win10 computer.

Workbench “Flash” option was working correctly to me before, but since I updated workbench to v1.4.9 (or v1.5.0, not sure which one, as both where installed straight at the same moment) then flashing option didn’t worked anymore to me.

I see in workbench v1.5.0 changelog that "automatically enter dfu-mode when flashing via the local compiler", so I have tried flashing the Electron with and without manually entering in dfu-mode before flashing, and in both cases I receive the same error.

After running Particle: Audit Environment I don’t see any “error” items in my output.

By the way, I can correctly flash the Electron in a windows terminal (cmd or powershell).


#9

have you installed the windows device drivers? if not, you can grab the latest installer over here:

https://binaries.particle.io/drivers/windows/particle_drivers.exe

try downloading and running that, then disconnect and reconnect your device from USB, then try flashing again and let us know if that fixes the issue :+1:


#10

Yes, I had windows device drivers installed (v1.0.0.0).
Anyway I have tried to install them again (selecting “uninstall current drivers” option in the installation process).

Same problem still appears, I can’t directly usb flash the electron from VSCode.

(should we move that issue to a new topic? Sorry to mess it with Chromebook topic as it seems that is not the same problem)


#11

Ok, I see my problem:

I have different electrons (named ELE01, ELE02, …) and I was trying to DFU flash a different electron than the one configured as target device in workbench (for example I was trying to flash ELE02 and it was configured ELE01). If I set the correct target device, then DFU flash success.

But, for DFU flash, it was not mandatory (at least till workbench v1.4.8) that target device was set correctly (target device value was only used for OTA updates, at least in my case).

@m_m, does have it changed in latest versions?


#12

But it’s also not forbidden to have multiple devices plugged into your computer at the same time and hence explicitly putting only that desired device into DFU Mode automatically and only flashing that one is probably what you want (avoiding the risk of flashing the wrong or even all devices).
To eleviate you from the need to select the correct device Workbench would have to check whether there is only one device attached and then use that otherwise ask the user to select which of the attached ones you’d want targeted after the fact.

The current behaviour of trusting you to select the correct one beforehand seems fair to me tho’

I’d have to check, but if Workbench wouldn’t find the targeted device plugged in I could even imagine WB trying to OTA flash it instead which would make the current behaviour even more comfortable and even required.


#13

@pegator adding to what @ScruffR said:

But, for DFU flash, it was not mandatory

it’s still not - you can leave it blank and assuming there’s only one Particle device connected, we’ll target that one :+1:


#14

But it’s also not forbidden to have multiple devices plugged into your computer at the same time

Aha, correct. I was only thinking in connecting only one device (as it is the way I use to do)

it’s still not - you can leave it blank and assuming there’s only one Particle device connected, we’ll target that one :+1:

Good, tested and OK.

Thank you all.