Author Topic: Abort Mission, -1 error  (Read 25653 times)

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Abort Mission, -1 error
« Reply #15 on: January 03, 2013, 10:27:45 pm »
Any chance you have a second OS on the machine to test with?
I\'m wondering if linux for some reason is more sensitive about the USB controller hardware on the computer - given @MoFoQ\'s issues with one of this computers, but not the other.

Emerica

  • Newbie
  • *
  • Posts: 4
Abort Mission, -1 error
« Reply #16 on: January 03, 2013, 10:59:30 pm »
Nope, I do not, I could boot backtrack or something to see if it\'s distro related.
Building shields for now :)

willscott

  • Newbie
  • *
  • Posts: 10
Abort Mission, -1 error
« Reply #17 on: January 03, 2013, 11:28:24 pm »
Once you get part way through the upload, it\'s a different problem.
Here\'s output from my syslog when attempting to use micronucleus from my ubuntu machine.

Printing out the unexpected res in micronucleus_eraseFlash in library/micronucleus_lib.c (since that\'s what\'s returning -1) gave me -84, which libusb says means either an invalid crc, or no response to the request.

The relevant log line is

kernel: usb 4-2: >usbfs: USBDEVFS_CONTROL failed cmd micronucleus rqt 192 rq 2 len 0 ret -84


My hunch is that either micronucleus isn\'t fully \"claiming\" ownership of the device from the kernel, and something else gets the response message that shouldn\'t, or it may have something to do with initial probing of the device expecting it to be a mass storage device, which confuses it.

MoFoQ

  • Newbie
  • *
  • Posts: 12
Abort Mission, -1 error
« Reply #18 on: January 04, 2013, 05:34:35 pm »
for me:


[1046470.430083] usb 4-1: new low speed USB device using uhci_hcd and address 3
[1046470.586324] usb 4-1: configuration #1 chosen from 1 choice
[1046470.950213] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd micronucleus rqt 192 rq 2 len 0 ret -84
[1046471.540545] usb 4-1: USB disconnect, address 3
[1046472.330047] usb 4-1: new low speed USB device using uhci_hcd and address 4
[1046472.486510] usb 4-1: configuration #1 chosen from 1 choice
[1046474.290792] usb 4-1: USB disconnect, address 4


The last 3 lines will continue to repeat (with the address # changing) until I unplug the spark.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Abort Mission, -1 error
« Reply #19 on: January 04, 2013, 05:38:35 pm »
@MoFoQ - again I apologize if this is a repeat but have you tried these steps: https://github.com/Bluebie/micronucleus-t85/wiki/Ubuntu-Linux

I\'m committed to updating the wiki tonight with among other things a comprehensive linux troubleshooting section.

MoFoQ

  • Newbie
  • *
  • Posts: 12
Abort Mission, -1 error
« Reply #20 on: January 04, 2013, 05:49:33 pm »
Yup, no change:

mofoq@lynx:~/Downloads/arduino-1.0.3/micronucleus-t85-master/commandline$ ./micronucleus --run cdc232.hex
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 33% complete
> Device looks like ATtiny85!
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 50% complete
> Erasing the memory ...
erasing: 66% complete
>> Abort mission! -1 error has occured ...
>> Please unplug the device and restart the program.
mofoq@lynx:~/Downloads/arduino-1.0.3/micronucleus-t85-master/commandline$ cat /etc/udev/rules.d/49-micronucleus.rules
# UDEV Rules for Micronucleus boards including the Digispark.
# This file must be placed at:
#
# /etc/udev/rules.d/49-micronucleus.rules    (preferred location)
#   or
# /lib/udev/rules.d/49-micronucleus.rules    (req\'d on some broken systems)
#
# After this file is copied, physically unplug and reconnect the board.
#
SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"16d0\", ATTRS{idProduct}==\"0753\", MODE:=\"0666\"
KERNEL==\"ttyACM*\", ATTRS{idVendor}==\"16d0\", ATTRS{idProduct}==\"0753\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\"
#
# If you share your linux system with other users, or just don\'t like the
# idea of write permission for everybody, you can replace MODE:=\"0666\" with
# OWNER:=\"yourusername\" to create the device owned by you, or with
# GROUP:=\"somegroupname\" and mange access using standard unix groups.
mofoq@lynx:~/Downloads/arduino-1.0.3/micronucleus-t85-master/commandline$ cat /lib/udev/rules.d/49-micronucleus.rules
# UDEV Rules for Micronucleus boards including the Digispark.
# This file must be placed at:
#
# /etc/udev/rules.d/49-micronucleus.rules    (preferred location)
#   or
# /lib/udev/rules.d/49-micronucleus.rules    (req\'d on some broken systems)
#
# After this file is copied, physically unplug and reconnect the board.
#
SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"16d0\", ATTRS{idProduct}==\"0753\", MODE:=\"0666\"
KERNEL==\"ttyACM*\", ATTRS{idVendor}==\"16d0\", ATTRS{idProduct}==\"0753\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\"
#
# If you share your linux system with other users, or just don\'t like the
# idea of write permission for everybody, you can replace MODE:=\"0666\" with
# OWNER:=\"yourusername\" to create the device owned by you, or with
# GROUP:=\"somegroupname\" and mange access using standard unix groups.
mofoq@lynx:~/Downloads/arduino-1.0.3/micronucleus-t85-master/commandline$ dmesg | tail
[1046954.320068] usb 4-1: new low speed USB device using uhci_hcd and address 12
[1046954.476348] usb 4-1: configuration #1 chosen from 1 choice
[1046957.540132] usb 4-1: USB disconnect, address 12
[1047123.900753] usb 4-1: new low speed USB device using uhci_hcd and address 13
[1047124.056974] usb 4-1: configuration #1 chosen from 1 choice
[1047124.422872] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd micronucleus rqt 192 rq 2 len 0 ret -84
[1047125.040125] usb 4-1: USB disconnect, address 13
[1047125.820068] usb 4-1: new low speed USB device using uhci_hcd and address 14
[1047125.977202] usb 4-1: configuration #1 chosen from 1 choice
[1047126.790271] usb 4-1: USB disconnect, address 14


(note, this is on 10.04 LTS and I have the udev rules in both locations in case 10.04 is considered a \"broken system\")

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Abort Mission, -1 error
« Reply #21 on: January 04, 2013, 11:42:08 pm »
@MoFoQ - I\'m out of ideas for now, for that I apologize.  I don\'t have the time right now to load up 10.04, but if I find the time I certainly will...

I\'m hoping someone else running 10.04 will give it a go too, so we can eliminate whether it is specific to your hardware/install

MoFoQ

  • Newbie
  • *
  • Posts: 12
Abort Mission, -1 error
« Reply #22 on: January 09, 2013, 03:02:10 pm »
what about for 12.04? (micronucleus works by itself (non-root) but not through arduino IDE)

teryret

  • Newbie
  • *
  • Posts: 1
Abort Mission, -1 error
« Reply #23 on: January 11, 2013, 09:23:15 pm »
I\'m getting this exact behavior as well (12.04 on a high end i7 workstation, two sparks).  The one thing I have to add is that when I run \"ls -l /dev/bus/usb/004\"  (ymmv on the 004 part) repeatedly at high speed I can watch the device connect and disconnect from the system.  As you\'d expect from the above dmesg logs it does indeed increment the file descriptor each time it connects (and it shows permissions 0666).

Edit: I\'m using the Arduino IDE (nothing requiring root), but other than that my setup is exactly the same.
« Last Edit: January 11, 2013, 09:29:12 pm by teryret »

tasmaniac

  • Newbie
  • *
  • Posts: 1
Abort Mission, -1 error
« Reply #24 on: January 17, 2013, 11:12:47 am »
I am running Ubuntu 12.10
The following udev rules seem to fix the problem with needing to run as root.  Now I can run as a normal user

ENV{DEVTYPE}==\"usb_device\", ACTION==\"add\", SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"16d0\", ATTRS{idProduct}==\"0753\", MODE:=\"0666\"
KERNEL==\"ttyACM*\", ATTRS{idVendor}==\"16d0\", ATTRS{idProduct}==\"0753\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\"

alx

  • Newbie
  • *
  • Posts: 3
Re: Abort Mission, -1 error
« Reply #25 on: February 18, 2013, 10:12:45 am »
I have the same problem here, aborting after erasing at 79% on my Mac Pro (2010, 10.8.2), also sudo does not help. On my Max Book Pro 13" (2009, 10.8.2) is does work, any ideas? (I've downloaded the digispark+arduino ide today, tried an example program)

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Abort Mission, -1 error
« Reply #26 on: February 18, 2013, 11:07:45 am »
alx - have you tried a hub and/or other all the ports? if so, was the hub powered or unpowered?

alx

  • Newbie
  • *
  • Posts: 3
Re: Abort Mission, -1 error
« Reply #27 on: February 19, 2013, 03:35:51 am »
yes, i've tried two powered hubs and the port directly on the mac pro, and in all cases the digithumb light up, so there is power, and since it's aborting at the end of the erasing it must have been found.

psychogenic

  • Newbie
  • *
  • Posts: 4
Re: Abort Mission, -1 error
« Reply #28 on: February 19, 2013, 11:38:00 am »
FYI, I was having the same error at the end of the erase cycle and have posted a fix related to the micronucleus uploader, here.

Regards,
PatD

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Abort Mission, -1 error
« Reply #29 on: February 19, 2013, 12:45:08 pm »
alx - do you have multiple Digisparks - if so is the issue present with all digisparks? And if not, do you have a second machine you could test on?


Thanks for your patience!