I have had my RedBear Duo for about two months and done many many flashes of my firmware during that time. After trying to do an app code flash last night it can no longer connect to the internet.
I just get the Green flashing then a short burst of rapid Green flashing then a flash of Red over and over again.
I have tried provisioning again which works fine using WiFi so the basic WiFi is working. After selecting my home network and giving it the password it goes back to the Green/Green/Red flashing sequence again.
Is there any chance the Particle server that handles the flashing is actually having a problem and not my board?
What does the Red flash mean? Is the server refusing to allow my board to connect for some reason?
When I go into safe mode it only stays there (with a magenta color LED) for a split second before going back to the flashing Green, rapid flashing Green then a single flash of Red then repeat this sequence over and over.
Again what does a flash of Red after the rapid flashing of Green mean? The basic flashing Green means looking for Internet connection and the fact I can provision means WiFi is working.
So there is no way to flash code in Safe mode using WiFi.
Perhaps you are saying to use the USB port to load my app. For that I am going to need to research how one uses the USB port to Flash as I have only ever used the Particle.io website to write and flash code and that, as far as I know requires a working Internet connection in order to flash.
My code does not override the default startup sequence which requires an internet connection before the app code is run. Even if it did entering Safe Mode would block running my app.
This problem started not AFTER successfully flashing my last code change but WHILE flashing the last code change. My app was working then I changed three constants of 0x00 to array variables x[4],x[5]. A very simple change I have made other places many times before while testing.
I can also post a short video tomorrow. It will look like this:
G----G----G----G----G----G----GāG--GāG--GāG--GāR----G----G----G----G----G repeat
The G----G sequence goes for several second before it switches to a single GāG--GāG--GāG--GāR rapid sequence with single Red flash at the end.
Iām not sure wheter the Duo is supported by the Particle CLI, but with a Particel device youād do it this way
particle update
particle flash --usb tinker
to revert back to a safe state.
Otherwise you could read up here
Does your R rapid sequence resemble an SOS pattern (⦠_ _ _ ā¦)?
If so, the single red blink after that indicates a so called hard fault which might be caused by buffer overrun, index violation and such things
I have just reloaded all the firmware and still have the same problem.
Loaded the following firmware:
fac-dct.bin (stored to new location for 0.3.0 firmware and above, downloaded from Particle website per instructions.)
duo-system part 1&2 for firmware 0.3.1
web-server-0.3.1.bin
duo-wifi-r1.bin
Rebooted and got the expected Blue flashing LED. Provisioned with Duo app which reports the following:
Released Version: 0.3.1 (which is what I just loaded)
Bootloader: 5 (latest version which I did not load so donāt know how it got it)
System Part 1: 9 (why the 9 when I loaded 0.3.1?)
System Part 2: 9
User Part: 7
So all looks good. Selected my network and gave it my password.
At this point it when to the slow flashing Green (no pattern just flash flash at equal rate) then the short burst of fast flashing Green then one flash of Red.
Again this looks like the Duo has connected to the the Particle server when it switches to the fast flashing then Red when rejected for some unknown reason. Perhaps I will try deleting and giving Particle my device ID again and see if that helps?
Removing and trying to add my device to Particle website did not help.
Next test was to disconnect my network from the internet.
The Red single flash turns into several Orange flashes. So I think that proves the problem has something to do with the Particle server not wanting to connect to my Duo.
I gave up on Particle.io and have installed the Arduino IDE on my PC.
Tried a couple of example programs (LED flash and a simple Bluetooth 4x LE chat) and both work just find.
So I can see nothing wrong with my board except the Particle.io server will not allow it to connect.
I have two more boards coming and it will be interesting to see if they have the same problem out of the box. If that happens it would seem to indicate Particle.io has dropped support for the RedBear Duo as of Monday night.
RedBear might need to reprovision the device on their side.
You can check their forum. I had a similar issue before and they had to do something on their side.
Thanks for the information. I will contact RedBear and see about a reprovision from their side.
I now have my app running again by using the Arduino IDE. The app has nothing to do with WiFi. It only accesses Bluetooth, CAN and the Serial port for monitoring. It does not write anything to any storage on the Duo so could not corrupt anything in the serial EEPROM.
You need to quote my full sentence not just clip the part you want.
The full sentence was conditional. āIf that happens againā
So IF the same problem happens on the two new boards I get then intentionally (not very likely) or accidentally (most likely) support has been dropped.
Hmm, I can't quite follow that logic
Even if that happened there could still be several (probably more likely) other imaginable reasons hence the conclusion that Particle must have dropped support (or that this would be the probable explanation) would still be a fallacy - with or without the condition in place
After some great help from guohui on the RedBear site who provide a logging app I now have more information and it confirms a problem connecting to the Particle server. Donāt know how to fix it yet but at least I now have an error code.
How do I fix this āUnable to receive key -19ā Error? I think I used the correct fac-dct-r1.bin from the Particle website but if someone has a better link to one I am open to trying it.
Here is what I got. First command seemed to work, second seems to have failed. Did I need to reset between the two commands?
C:\Users\Jim>particle keys server
Found DFU device 2b04:d058
spawning dfu-util -d 2b04:d058 -a 1 -i 0 -s 2082 -D C:\Users\Jim\AppData\Local\particle\node_modules\particle-cli\keys\rsa.pub.der
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
Opening DFU capable USB deviceā¦
ID 2b04:d058
Run-time device DFU version 011a
Claiming USB DFU Interfaceā¦
Setting Alternate Setting #1 ā¦
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000822, size = 512
Download [=========================] 100% 512 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Okay! New keys in place, your device will not restart.
C:\Users\Jim>particle keys doctor xxxxxxxxxxxxxxxxxxxxxxxxxxx
Found DFU device 2b04:d058
Found DFU device 2b04:d058
Error creating keys⦠Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c āopenssl genrsa -out xxxxxxxxxxxxxxxxxxxx_rsa_new.pem 1024ā
āopensslā is not recognized as an internal or external command,
operable program or batch file.
Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c āopenssl genrsa -out xxxxxxxxxxxxxxxxxxxxx_rsa_new.pem 1024ā
āopensslā is not recognized as an internal or external command,
operable program or batch file.
That did it. Thanks ScruffR. Everything is working again.
You were right, Particle did not have an evil plan to ban all RedBear Duoās as I had speculated. (Sorry about that)
I now know a lot more about flashing, keys, dft-util, particle CLI, openSLL and how to compile with Arduino plus two backup RedBear Duoās that should arrive today.
Any theories on how the keys got messed up in the first place?