Hello everyone! I have an original Spark Core as part of my Choosatron device by Jerry Belich. Just brought it out again as my kids (ages 7 and 10) are reading a lot and enjoy Choose Your Own Adventure (tm)-style stories (as do I)!
I want to be able to upload new stories to the Core, but am having a devil of a time getting it to talk. To be clear, the Core is working fine running the Choosatron right now, and I don't want to try swapping it out with anything else newer as most won't be pin-compatible as far as I can tell and also may not physicall fit in the case (talking about the Photon 2 here...)
So, I read and learned what little is available on the docs and here at the community forum, and managed to get CLI version 2.16.0 on my Linux machine which is supposed to be able to talk to it.
Can someone please give me step-by-step instructions to establish communication so I can at least flash new stories to it? I have tried many iterations, including 'particle login', which works. Then 'particle list' which gives an error, "invalid request". I also tried 'particle usb list' which then says, "IN control transfer failed'..????
'Particle setup' also errors with "The serialport dependency is missing or invalid"...
Help!!
One final comment if it helps anyone diagnose this: To flash the Choosatron code and stories originally 10 years ago, I must have created a Spark.io account at the time, right? So, maybe I can't talk to it because it is locked? Not sure if I could come up with what login I would have used...
Thank you for reading all this, and I appreciate someone taking the time to assist with some suggestions.
Regards,
John
(Firestorm76)
What I would do is install the Particle CLI normally, then follow the instructions for downgrading to v2 to make sure you get the external dependencies.
However, that might not work either. If you are still getting SerialPort dependency missing, check the logs for when you did the npm install -g particle-cli@2
. What could be happening is that the version of node.js you have installed is not compatible with v2. The only reasonable way to solve this is to use a node version manager like fnm for Linux and run the Particle CLI under node v16 or v12.
The other solution is to figure out what email your core was associated with, then you could flash it from the Particle Web IDE. However there's a bit of a chicken and egg problem, because the easiest way to do that is to use the Particle CLI to find the Device ID. There is a way to do it not using the CLI but it's more complicated, if it comes to that.
Thank you for the reply Rickkas... I will give those ideas a try and update this chat. I appreciate you taking the time!
.Hi John, in case things so south with the photon, there is this adapter argon/photon2 to photon that may save the day. I do not know the Choosatron but you mentioned space being a limiting factor, so it might not be possible. If you have seen it, please ignore.
Best of luck with this project! your kids will be so happy with new stories in it 
EDIT: I'm sorry, I was mistaken about this adapter.
It is indeed for a photons, not a core.
Not sure what you mean by that adapter. The link you put in just opens the particle store, not to any particular product. Also, searching for adapters only shows the 'particle classic adapter, which appears to only help you with shields, and the pinout looks to be Photon and not original Spark Core. Did you mean to link to something for the Core? Confused...
Looking at your 'downgrading to v2' link, that is where I did already go and tried that. I was thinking somethings got put in v3 when I did that first that interfere with v2 working properly. In fact, after I tried (it said it was successful) installing v2, typing 'particle version' gave me a version 3 response! Even after v3 was supposedly uninstalled (which I did first before installing v2). Why is this so hard? Why can't Particle simply have the v3 software recognize a Core and run with it? Backwards compatibility is your friend!
So, I had to go in and manually delete additional files/folders before asking the CLI for its version actually told me 2.16.0 and not 3.x... And that's when the trouble with 'serialport' and 'usb' modules started. Ugh! No sure if I want to do the same thing over again expecting different results.
Also, I may NEVER have registered the Core with Spark/Particle, and used the DFU software to flash it directly. If so, does that open any additional options now?
Additionally, I think I did get the ID of the Core at some point playing with it through the CLI and LSUSB commands. It is much shorter than the Photon/Photon 2 right? The iSerial attribute I can see from LSUSB is 12 characters long. Is that it?
Thanks for any other help/ideas...
I suspect that you are picking up the installed version of the CLI because it's earlier in your path than the manually installed node.js version.
On the Core, the USB serial number isn't the Device ID, it's a different number. The Device ID (24 character hex) is the same format.
However, programming it by USB is an option that could work. It does not require device claiming, but you will probably need to get the CLI to work properly. Unlike every other device, the Core only uses a monolithic binary that includes both Device OS and the user firmware binary, so there's only ever a single binary to flash. You can ignore any instructions for upgrading Device OS.