[Solved] Unable to setup Electron with non-particle SIM

I am trying to setup a new electron device with a non-particle SIM with the steps mentioned at https://setup.particle.io/

When I try to flash the firmware binary(with my custom APN) I get the following error:
flash --serial ./firmware.bin
Including:
./firmware.bin
attempting to flash firmware to your device --serial
Token error: Permission Denied

Also the “particle identify” command is stuck forever

Can someone please help ?
I tried login in and out and multiple reboots of the device but no luck.

Just to rule out the obvious:

  • You are in fact writing the command particle flash --serial ./firmware.bin?
  • Your device is either blinking blue?
  • Have you tried DFU Mode (blinking yellow) with particle flash --usb firmware.bin?
  • You are in Listening/Setup Mode (blinking blue) when executing particle identify?

You probably need to leave out the ./ and just type particle flash --serial firmware.bin is you CD-ed into the directory containing the bin file

I don’t know what OS is used here, but Windows and Linux don’t have a problem with ./ (at least for me), but the need to provide the correct path - either explicit or by CDing into it (with or without ./ preceeding the file name) - should go without saying.

Answers to your question:

  1. Exact command and output:
    $sudo particle flash --serial ./firmware.bin
    Including:
    ./firmware.bin
    attempting to flash firmware to your device --serial
    Token error: Permission Denied
    (Tried both with and without ./ it does not make any difference)

  2. Yes the LED is blinking blue when I tried the above command.

  3. I just tried the --usb comand. This is the error that I get:
    $sudo particle flash --usb ./firmware.bin
    Apparently I didn’t find a DFU device? util said dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Deducing device DFU version from functional descriptor length
Found DFU: [2b04:d00a] ver=0200, devnum=8, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01016Kg", serial=“00000000010C"
Found DFU: [2b04:d00a] ver=0200, devnum=8, cfg=1, intf=0, alt=0, name=”@Internal Flash /0x08000000/03
016Ka,01016Kg,01064Kg,07*128Kg", serial="00000000010C"
Found Runtime: [05ac:8289] ver=0103, devnum=6, cfg=1, intf=3, alt=0, name=“UNKNOWN”, serial=“UNKNOWN”

Error writing firmware…no dfu device found.

To verify if I am in the DFU moe I also checked the kernel log:
[ 2927.404660] usb 1-1: new full-speed USB device number 8 using xhci_hcd
[ 2927.533838] usb 1-1: New USB device found, idVendor=2b04, idProduct=d00a
[ 2927.533841] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2927.533842] usb 1-1: Product: Photon DFU Mode
[ 2927.533844] usb 1-1: Manufacturer: Particle
[ 2927.533845] usb 1-1: SerialNumber: 00000000010C

  1. Yes, the device is in Listning mode (blinking blue) for the “particle identify” command

Please let me know if you needs any more information and if there is anything more that I can try to get it working.

PS: I am using Ubuntu

I'm a bit confused about the topic title mentioning "Electron" while your kernel log talks about

That sounds rather puzzling :confused:

Looks like both electron and photon share same code for DFU. The device that I am using is indeed a electron.
This is the log when the device is in listening mode:
[ 7920.730241] usb 1-1: new full-speed USB device number 11 using xhci_hcd
[ 7920.859552] usb 1-1: New USB device found, idVendor=2b04, idProduct=c00a
[ 7920.859556] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7920.859557] usb 1-1: Product: Electron
[ 7920.859559] usb 1-1: Manufacturer: Particle
[ 7920.859560] usb 1-1: SerialNumber: 00000000050C
[ 7920.859678] usb 1-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[ 7920.859996] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

but when I switch to DFU mode it says Photon

[ 7959.520626] usb 1-1: USB disconnect, device number 11
[ 7964.127805] usb 1-1: new full-speed USB device number 12 using xhci_hcd
[ 7964.257275] usb 1-1: New USB device found, idVendor=2b04, idProduct=d00a
[ 7964.257278] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7964.257280] usb 1-1: Product: Photon DFU Mode
[ 7964.257281] usb 1-1: Manufacturer: Particle
[ 7964.257283] usb 1-1: SerialNumber: 00000000010C

Yup, just checked on my own and you’re right - pitty tho’, would’ve been an easy fix :wink:

Can you give us more information about your computer? I take it you are using Linux.

Can you add this udev rules files to /etc/udev/rules.d/50-particle.rules
https://gist.githubusercontent.com/monkbroc/b283bb4da8c10228a61e/raw/e59c77021b460748a9c80ef6a3d62e17f5947be1/50-particle.rules

This will make the DFU device available without sudo

2 Likes

I am using Ubuntu 15.10 on a 2015 MacBook Pro. Please let me know if you needs any specific details about my computer. I have added the udev rule in /etc/udev/rules.d/
I still see the same errors

@jvanier Can you please help me with this problem ? My Electron is unusable due to dis.

@iVivek Try to run particle update to bring your device up to the latest system firmware.

Thanks it finally worked.

I update particle-cli to the latest version and used “particle update” first. Then I updated the firmware using particle flash --usb ./firmware.bin
I had to reset the device multiple times since I kept getting error but after 4-5 tries it finally worked

Note: particle flash --serial ./firmware.bin does not work it gives the following error:

particle flash --serial ./firmware.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: ./firmware.bin

! serial:
Error writing firmware…TypeError: Cannot call method ‘copy’ of undefined
TypeError: Cannot call method ‘copy’ of undefined
at Function.Buffer.concat (buffer.js:499:9)
at Object.YModem._sendPacket (/usr/local/lib/node_modules/particle-cli/lib/ymodem.js:179:20)
at Object.YModem._sendFileHeader (/usr/local/lib/node_modules/particle-cli/lib/ymodem.js:173:15)
at start (/usr/local/lib/node_modules/particle-cli/lib/ymodem.js:147:17)
at runTask (/usr/local/lib/node_modules/particle-cli/node_modules/when/pipeline.js:37:16)
at /usr/local/lib/node_modules/particle-cli/node_modules/when/pipeline.js:42:12
at tryCatchResolve (/usr/local/lib/node_modules/particle-cli/node_modules/when/lib/apply.js:46:23)
at callAndResolve (/usr/local/lib/node_modules/particle-cli/node_modules/when/lib/apply.js:30:12)
at callAndResolveNext (/usr/local/lib/node_modules/particle-cli/node_modules/when/lib/apply.js:40:4)
at tryCatchReject3 (/usr/local/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:856:7)

Please update your electron setup instructions.