Author Topic: Warning: device with unknown new version of Micronucleus detected.  (Read 6858 times)

magnets

  • Newbie
  • *
  • Posts: 6
So i'm running ubuntu 64 bit.
i have arduino 1.6.5 and followed the wiki instructions on supporting the digispark pro through arduino.
when i try and upload i get the following error

Code: [Select]
Device reports version as: 2.0
Warning: device with unknown new version of Micronucleus detected.
This tool doesn't know how to upload to this new device. Updates may be available.

i had a good google and have tried the following:
I have ensured i am in the dial out group

i read this post which stated it might be a old version of micronucleus
http://digistump.com/board/index.php?topic=1673.0

however when i do the same query i only get
Code: [Select]
./home/bob/.arduino15/packages/digistump/tools/micronucleus
./home/bob/.arduino15/packages/digistump/tools/micronucleus/2.0a4/micronucleus

so i though maybe my one isn't the right one
as per this post https://digistump.com/board/index.php?topic=1693.0
but i tried the micronucleus attatched to that post and that didin't work either

i tried installing the 32 bit version of libusb via this post
http://askubuntu.com/questions/311401/libusb-0-1-so-4-shared-lib-error-in-ubuntu-64-bit-system
but that also didn't help

i've added the udev rules
i've rebooted
i'm out of ideas...
any help would be greatly appreciated.



Ralf

  • Guest
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #1 on: August 11, 2015, 01:49:50 am »
I am not familiar which Ubuntu 64 bit, but it sounds as if you have an old version of micronucleus in your path. You may try it with "which micronucleus" on the command line.

The Digispark Pro uses a 2.x firmware, because the 1.x version does not support the ATtiny 167. But the Digistump PC software package delivers the 2.x micronucleus commandline tool, which is downwards compatible to the 1.x firmware of the ATtiny85. I think the switch was with the change from Digistump Arduino 1.0.4 to 1.5.8.

Ralf


magnets

  • Newbie
  • *
  • Posts: 6
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #2 on: August 11, 2015, 03:43:01 am »
thanks for the response Ralf!

i tried that command, at the home level, and in the tools folder (i'm fairly new to linux) and as sudo but everytime i get no response

Code: [Select]
bob@Slaptop:~/.arduino15/packages/digistump/tools$ which micronucleus
bob@Slaptop:~/.arduino15/packages/digistump/tools$

i found this post, which seems to agree with your theory, though when i run the suggested fix i don't have an old version
http://digistump.com/board/index.php?topic=1673.0


Code: [Select]
bob@Slaptop:~/.arduino15/packages/digistump/tools$ sudo su
root@Slaptop:/home/bob/.arduino15/packages/digistump/tools# cd /
root@Slaptop:/# find -name "micronucleus"
./home/bob/Downloads/micronucleus
./home/bob/.arduino15/packages/digistump/tools/micronucleus
./home/bob/.arduino15/packages/digistump/tools/micronucleus/2.0a4/micronucleus
./home/bob/.local/share/Trash/files/micronucleus
root@Slaptop:/#

Ralf

  • Guest
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #3 on: August 11, 2015, 05:02:31 am »
Well,

that's funny. The error is typical for an 1.x commandline tool meeting the 2.x firmware. if there was a library missing, you would get a totally different error.

Is the version in the 2.0.4 folder really a 2.x version?

You could try to call it directly on a commandline: change into its folder
cd ~/.arduino15/packages/digistump/tools/micronucleus/2.0a4
and submit a
./micronucleus --help

The last line of the output should be:
Commandline tool version: 2.0a4

Ralf

magnets

  • Newbie
  • *
  • Posts: 6
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #4 on: August 11, 2015, 08:22:26 pm »
thanks for the help, i followed your advice but i'm more confused than ever

it says command not found.

Code: [Select]
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ micronucleus --help
micronucleus: command not found
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ ls
launcher  micronucleus
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ micronucleus --help
micronucleus: command not found
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ cd micronucleus
bash: cd: micronucleus: Not a directory
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$

using nautilus i've checked that both launcher and micronuclues are read write for everyone and ticked the box that says allow executing file as program.

Ralf

  • Guest
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #5 on: August 12, 2015, 12:14:37 am »
Hi,

the command is not

micronucleus --help

but

./micronucleus --help

The "./" tells the shell that it has to search in the actual folder, without it it searches in the path.

Ralf

magnets

  • Newbie
  • *
  • Posts: 6
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #6 on: August 15, 2015, 03:28:28 pm »
thanks for the tip!
sorry for the delay in coming back to you. sick pet.

i don't get that output! so i'm assuming i don't have version 2, i'm going to see if i can get it now

i get this

Code: [Select]
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ ./micronucleus --help
usage: micronucleus [--run] [--dump-progress] [--type intel-hex|raw] [--no-ansi] [--timeout integer] [--erase-only] filename

  --type [intel-hex, raw]: Set upload file type to either intel hex or raw
                           bytes (intel hex is default)
          --dump-progress: Output progress data in computer-friendly form
                           for driving GUIs
             --erase-only: Erase the device without programming. Fills the
                           program memory with 0xFFFF. Any files are ignored.
                    --run: Ask bootloader to run the program when finished
                           uploading provided program
                --no-ansi: Don't use ANSI in terminal output
      --timeout [integer]: Timeout after waiting specified number of seconds
                 filename: Path to intel hex or raw data file to upload,
                           or "-" to read from stdin
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$

so i'll try and get the correct output on the command line then post back my results

magnets

  • Newbie
  • *
  • Posts: 6
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #7 on: August 15, 2015, 04:02:53 pm »
ok, as you can see i'm not super good on linux, but this is what i did

i went to the micronucleus site
https://github.com/micronucleus/micronucleus
https://github.com/micronucleus/micronucleus

and i hit download zip (right hand side near the bottom)
then i extracted the zip to a temporary folder.
and using the command shell (?) i navigated to the folder and got it to list it's contents

Code: [Select]
bob@Slaptop:~/Downloads/temp/micronucleus-master/commandline$ ls
49-micronucleus.rules  builds  library  Makefile  micronucleus.c  Readme

then i ran the make command

Code: [Select]
bob@Slaptop:~/Downloads/temp/micronucleus-master/commandline$ make
Building library: micronucleus_lib...
gcc  -L/usr/lib/x86_64-linux-gnu -lusb -Ilibrary -O -g -D LINUX -c library/micronucleus_lib.c
Building library: littleWire_util...
gcc  -L/usr/lib/x86_64-linux-gnu -lusb -Ilibrary -O -g -D LINUX -c library/littleWire_util.c
Building command line tool: micronucleus...
gcc  -L/usr/lib/x86_64-linux-gnu -lusb -Ilibrary -O -g -D LINUX -o micronucleus micronucleus.c micronucleus_lib.o littleWire_util.o -L/usr/lib/x86_64-linux-gnu -lusb
bob@Slaptop:~/Downloads/temp/micronucleus-master/commandline$

then using nautilus i went to the
home/bob/.arduino15/packages/digistump/tools/micronucleus
folder, and then renamed the current micronucleus as micronucleus.old and pasted in the new micronucleus that the makefile created

now when i run the help i get

Code: [Select]
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ ./micronucleus --help
usage: micronucleus [--help] [--run] [--dump-progress] [--fast-mode] [--type intel-hex|raw] [--timeout integer] [--erase-only] filename [--no-ansi]

  --type [intel-hex, raw]: Set upload file type to either intel hex or raw
                           bytes (intel hex is default)
          --dump-progress: Output progress data in computer-friendly form
                           for driving GUIs
             --erase-only: Erase the device without programming. Fills the
                           program memory with 0xFFFF. Any files are ignored.
              --fast-mode: Speed up the timing of micronucleus. Do not use if
                           you encounter USB errors.
                    --run: Ask bootloader to run the program when finished
                           uploading provided program
                --no-ansi: Don't use ANSI in terminal output
      --timeout [integer]: Timeout after waiting specified number of seconds
                 filename: Path to intel hex or raw data file to upload,
                           or "-" to read from stdin

Commandline tool version: 2.0a5


Success!!
in the arduino ide, i try to upload an example

Quote
Sketch uses 936 bytes (6%) of program storage space. Maximum is 14,844 bytes.
Global variables use 9 bytes of dynamic memory.
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 16% complete
connecting: 22% complete
connecting: 28% complete
connecting: 33% complete
> Device has firmware version 2.0
> Device signature: 0x1e9487
> Available space for user applications: 14970 bytes
> Suggested sleep time between sending pages: 7ms
> Whole page count: 234  page size: 64
> Erase function sleep duration: 1638ms
parsing: 50% complete
> Erasing the memory ...
erasing: 55% complete
erasing: 60% complete
erasing: 65% complete
> Starting to upload ...
writing: 70% complete
writing: 75% complete
writing: 80% complete
> Starting the user app ...
running: 100% complete
>> Micronucleus done. Thank you!


yaaaaaaaaaaaaaaaaaaaaaay

Thanks Ralf!

the only thing i can assume is the digistump arduino script pulled the wrong version of micronucleus (maybe version 2 for 32 bit?) then, because i don't understand Make, i grabbed a wrong version of  micruncleus which gave the strange error

for others following along, you'll need to put the udev rules in to get this to work without sudo

Ralf

  • Guest
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #8 on: August 16, 2015, 06:51:03 am »
That's Fine.

I also suspected, that the micronucleus shipped by digispark may be a 32bit one.

Ralf

panguitou

  • Newbie
  • *
  • Posts: 1
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #9 on: January 15, 2016, 07:42:20 am »
Thank you Magnet !

I was meeting exactly the same problem than you and I followed your excellent method to re-compile micronucleus and now it worked perfectly !

I had the same problem with my old Digispark and it also settled the problem !

You know what ?

 ;D :D

dfp

  • Newbie
  • *
  • Posts: 1
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #10 on: February 08, 2016, 11:47:10 pm »
Compiling had a problem with a missing dependency:
Code: [Select]
> make
make: libusb-config: Command not found
make: libusb-config: Command not found
Building library: micronucleus_lib...
gcc   -Ilibrary -O -g -D LINUX -c library/micronucleus_lib.c
In file included from library/micronucleus_lib.c:30:0:
library/micronucleus_lib.h:35:80: fatal error: usb.h: No such file or directory
   #include <usb.h>        // this is libusb, see http://libusb.sourceforge.net/
                                                                                ^
compilation terminated.
Makefile:49: recipe for target 'micronucleus_lib' failed
make: *** [micronucleus_lib] Error 1

Per this note: http://askubuntu.com/questions/503928/missing-usb-h-file-what-is-it-where-do-i-get-it
the solution was:
Code: [Select]
sudo apt-get install libusb-dev
That got me a clean compile. Don't know yet if I'm going to get a usable micronucleus or not ...

kjubow

  • Newbie
  • *
  • Posts: 2
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #11 on: September 03, 2017, 01:38:51 pm »
Can anyone help me??
I don't exactly understand that part : "home/bob/.arduino15/packages/digistump/tools/micronucleus
folder, and then renamed the current micronucleus as micronucleus.old and pasted in the new micronucleus that the makefile created"
Can you explain it to me ??

PeterF

  • Hero Member
  • *****
  • Posts: 804
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #12 on: September 04, 2017, 03:17:59 am »
Welcome to the forum kjubow! ;)

What 'magnets' did was basically:

  • Download/clone the source code for micronucleus from https://github.com/micronucleus/micronucleus
  • Unzip the file, and navigate to the location of the unpacked files in a terminal window
  • Once he was in that folder, ran the 'make' command to compile the micronucleus executable
  • He then copied the resulting executable to his /home/username/.arduino15/packages/digistump/tools/micronucleus directory, renaming the old file first
  • And then tested it to make sure it worked as expected

First thing is first... are you on linux? As this was specific to linux (and a Ubuntu/Debian flavour of linux at that).

And secondly, how familiar with linux are you? (I'm guessing not very if you don't recognise the /home path - but that's ok - just need to know the baseline from which to provide instructions)

kjubow

  • Newbie
  • *
  • Posts: 2
Re: Warning: device with unknown new version of Micronucleus detected.
« Reply #13 on: September 11, 2017, 11:33:10 pm »
Yes, im running ubuntu. Thanks for reply ;)