Author Topic: Is the CLI tool required when changing Oak for upload?  (Read 2836 times)

exeng

  • Sr. Member
  • ****
  • Posts: 454
Is the CLI tool required when changing Oak for upload?
« on: March 05, 2016, 06:21:11 pm »
I've been using two Oak's to upload sketches and finding that I need to run the CLI tool when switching between the two for upload. If I don't run the CLI when switching between the two the upload fails. Is this the normal behavior? I thought I could just select the Oak on particle.io. I don't recall having to use CLI more than once in the past.

Anyone else seeing this?

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Is the CLI tool required when changing Oak for upload?
« Reply #1 on: March 05, 2016, 07:04:11 pm »
How do you select the Oak on particle.io? (honest question - wondering if I missed something there??). However, AFAIK, you have to use the OakCLI to switch between the oaks, because the local config.json file stores the device ID of the Oak to be programmed. So if you don't change that value using the OakCLI, or manually editing/swapping that file, you will keep uploading to the same Oak, regardless of what you do on the Particle cloud (when uploading via the Arduino IDE).

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Is the CLI tool required when changing Oak for upload?
« Reply #2 on: March 05, 2016, 07:36:41 pm »
pfeerick,

Thanks for the response. I guess in the past I was not switching Oaks as often and must have used CLI each time. That, combined with the memory of Erik saying you only had to run CLI once caused me to think exactly that.  I guess that once is only once if you have only had 1 OAK to play with.

In the particle build devices screen you can select (place a star by) the Oak you want to flash. It must only be for flashing from particle.io. I thought that it somehow worked from the Arduino IDE since the compiled sketch is sent up to particle and down to the device.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Is the CLI tool required when changing Oak for upload?
« Reply #3 on: March 05, 2016, 08:47:39 pm »
Ah yes, I know the one you mean now (on the build screen). Yes, that is just for the online IDE, when that becomes an option.

I think the one run of the OakCLI just for the initial particle login, so it can create the config.json file. If you are only programming one Oak, you wouldn't need to use it again.

Pete