Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent error seen when attempting to upload to JDB #3

Closed
rwaldron opened this issue Nov 22, 2016 · 21 comments
Closed

Consistent error seen when attempting to upload to JDB #3

rwaldron opened this issue Nov 22, 2016 · 21 comments

Comments

@rwaldron
Copy link
Contributor

rwaldron commented Nov 22, 2016

I'm filing this separately because I'm not sure if it's a dupe of #1. If it is, then just close this.

Failed to execute script main
Upgrading target on /dev/cu.usbserial-DB00W8D4 with DFU package /private/var/folders/xz/k2lxgs3s43180_tjwn1v_kwc0000gn/T/arduino_build_939294/jewelbots_blink.ino.zip. Flow control is disabled.

Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 19572
Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
Timed out waiting for acknowledgement from device.

Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.

Possible causes:

  • bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
  • baud rate or flow control is not the same as in the target bootloader.
    Failed to execute script main
  • target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.

I tried this:

  • target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.

No luck!

@rwaldron
Copy link
Contributor Author

Same thing happens when attempting to upload to the JewelBot (the actual device, not dev board)

@rwaldron
Copy link
Contributor Author

After reading more at https://github.com/NordicSemiconductor/pc-nrfutil, I believe this is a duplicate of #1, so I'm closing

@SaraJo
Copy link
Member

SaraJo commented Nov 22, 2016

Are you putting the device in upload mode? (we need a better way to phrase that)

You need to hold down the bottom button for two seconds and it will flash purple to indicate it is ready to upload code.

@SaraJo SaraJo reopened this Nov 22, 2016
@SaraJo
Copy link
Member

SaraJo commented Nov 22, 2016

Also, this is a different issue, so I reopened.

@rwaldron
Copy link
Contributor Author

You need to hold down the bottom button for two seconds and it will flash purple to indicate it is ready to upload code.

Ok, I was definitely not doing that, so let me give it a try

@rwaldron
Copy link
Contributor Author

rwaldron commented Nov 22, 2016

bottom button

The one labelled "Action Button"?

Edit: Yes

@rwaldron
Copy link
Contributor Author

Ok, now I get this:

Upgrading target on /dev/cu.usbserial-DB00W8D4 with DFU package /private/var/folders/xz/k2lxgs3s43180_tjwn1v_kwc0000gn/T/arduino_build_939294/jewelbots_blink.ino.zip. Flow control is disabled.

Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 19572
Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
Failed to execute script main
Sending DFU init packet
Sending firmware file
DFU upgrade took 17.2695930004s
Device programmed.
Failed to execute script main

@SaraJo
Copy link
Member

SaraJo commented Nov 23, 2016

You're good! That means it went through.

"failed to execute script main" is a bug listed here. #1

Very confusing for coding, I'd like to tackle that one ASAP.

@rwaldron
Copy link
Contributor Author

@SaraJo that's good news, but the example sketch doesn't seem to work.

@SaraJo
Copy link
Member

SaraJo commented Nov 23, 2016

Okay, can you paste the sketch here?

Sara J Chipps
862.201.3065
http://SaraJChipps.com http://sarajchipps.com/


No trees were killed in sending this message but a large number of

electrons were terribly inconvenienced.

Pre-order your Jewelbots http://jewelbots.com/

On Wed, Nov 23, 2016 at 1:30 PM, Rick Waldron notifications@github.com
wrote:

@SaraJo https://github.com/SaraJo that's good news, but the example
sketch doesn't seem to work.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGuFXZA9bO_JgmNeOBLQ-O6gWUUzI7Qks5rBIY6gaJpZM4K5jBo
.

@rwaldron
Copy link
Contributor Author

#include <Arduino.h>

LED led;

void setup() {
  // Put your setup code here, to run once.
}

void loop() {
  // Put your main code here, to run repeatedly:
  led.on(1, "blue", 650000);
}

I see the rainbow display and then the D202 LED settles on green.

@SaraJo
Copy link
Member

SaraJo commented Nov 23, 2016

What happens when you unplug it? Same? or, is this on the dev board.

@sm_davison just updated the firmware to not go through the loop until
unplugged, if you have the most recent and the dev board doesn't have the
battery attached that may be hard to test.

These are all things I am adding to the README as we encounter them. Thanks
for being the first eyes.

Sara J Chipps
862.201.3065
http://SaraJChipps.com http://sarajchipps.com/


No trees were killed in sending this message but a large number of

electrons were terribly inconvenienced.

Pre-order your Jewelbots http://jewelbots.com/

On Wed, Nov 23, 2016 at 3:44 PM, Rick Waldron notifications@github.com
wrote:

#include <Arduino.h>

LED led;
void setup() {
// Put your setup code here, to run once.
}
void loop() {
// Put your main code here, to run repeatedly:
led.on(1, "blue", 650000);
}

I see the rainbow display and then the D202 LED settles on green.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGuFY-m9hG1v9_zTnS46eV4iqoVM7zLks5rBKW2gaJpZM4K5jBo
.

@mbrewer
Copy link

mbrewer commented Nov 28, 2016

👋🏼 Hey Sara (& everyone else),

I noticed this thread dropped off. I'm having the issue in issue #1 with the Failed to execute script main while running the 'hello world' program (code same as pasted above in the thread).

The exception here is that I am booting the Jewelbot into coding mode before uploading. So in between those failure messages, the code seems to compile successfully. However, the light doesn't turn blue.

What might I be missing? I saw a link to the Python library pc-nrfutil, but it wasn't clear how we should make use of that, if at all.

@SaraJo
Copy link
Member

SaraJo commented Nov 28, 2016

Hi @mbrewer, have you unplugged your Jewelbot after coding?

the "Failed to execute script main" is a warning and shouldn't stop the device from accepting your sketch.

@mbrewer
Copy link

mbrewer commented Nov 28, 2016

@SaraJo oops—yes, I have! I've been 1) connecting it via USB, 2) booting into coding mode, 3) uploading the code, and 4) unplugging it from USB. And yet, no blue light!

@SaraJo
Copy link
Member

SaraJo commented Nov 28, 2016

That's a puzzler. Do you mind updating the firmware to see if that is the issue? Or, have you done that already?

@mbrewer
Copy link

mbrewer commented Nov 28, 2016

I don't mind at all! However, I will have to pick this thread back up once I get home -- on my work machine right now w/o my Jewelbot.

@SaraJo
Copy link
Member

SaraJo commented Nov 28, 2016

Okay, thank you! Much appreciated.

@mbrewer
Copy link

mbrewer commented Nov 29, 2016

So as far as having the firmware 'updated', I'm currently using what the docs recommended.
image

Is there something else I can update it to?

@mbrewer
Copy link

mbrewer commented Dec 2, 2016

Still having an issue with this. I uploaded the above-listed version of the firmware to the Jewelbot (had a blank sketch open + hit 'upload' button). I got a success rainbow.

Booted into coding mode and uploaded the 'hello world' program. Still no blue LED.

@aulvi
Copy link

aulvi commented Dec 5, 2016

@mbrewer These are (roughly) the steps I performed:

  1. Turn on the JB, it does a little rainbow dance and buzz to let me know it's alive.
  2. Connect up all the USB cables, start the Arduino IDE, place the JB into coding mode by holding The One Button down for two seconds. It should then do a "purple fade" when you let off the button.
  3. Create an empty sketch and stick the LED led; led.on(1, "blue", 2000); code in the loop() function, exactly like the documentation says.
  4. Upload the sketch, the Arduino IDE shouldn't barf any errors.
  5. Unplug the cable from the JB and the led should light up immediately.

I don't know why, but it took me a couple of tries to get this to work. I ended up adding code for ALL of the LEDs (0-3) while debugging and it seemed fine. Best of luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants