Go Down

Topic: Serial Port not found after temporarily disabling ModemManager (Read 639 times) previous topic - next topic

juts12

Hello!

I'm very new to Arduino, my apologies if I don't understand something simple.

I'm on Ubuntu 18.04 trying to connect an ATMEGA32U4 board.

Downloaded the IDE, got permissions to ttyACM0, and ran into this error:

Code: [Select]
avrdude: Error: butterfly programmer uses avr_write_page() but does not provide a cmd() method.


To fix this problem I tried this: https://forum.arduino.cc/index.php?topic=580326.0



Basically I tried to disable ModemManager:

Code: [Select]
sudo systemctl stop ModemManager.service

And to check:

Code: [Select]
systemctl status ModemManager.service


It had worked, but now IDE doesn't find that port. Dmesg --follow showed that I had disconnected the device.
Restarting didn't work, reconnecting didn't work (dmesg didn't even recognize that something had been plugged in).

Tried to connect it while in a VM, the ttyACM0 didn't show up in /dev and Arduino didn't find anything.

Thank you! :)

sterretje

I'm no longer a Linux person

What does below return after a reboot
Code: [Select]
systemctl status ModemManager.service


Did you try
Code: [Select]
sudo systemctl start ModemManager.service
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Robin2

What is "butterfly programmer"?

I use Linux Mint all the time without problems though I admit I have not tried uploading to my Leonardo for a considerable time.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sterretje

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Robin2

The butterfly programmer is part of avrdude.
Will it come into play when I upload to an Uno or Mega - because if so it has never caused me a problem. I'm using IDE 1.8.6

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sterretje

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

sterretje

Output of an upload to a Leonardo ( under Windows ;) )


C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM6 -b57600 -D -Uflash:w:C:\Users\sterretje\AppData\Local\Temp\arduino_build_426630/sketch_nov01b.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\sterretje\AppData\Local\Temp\arduino_build_426630/sketch_nov01b.ino.hex"
avrdude: writing flash (7056 bytes):

Writing | ################################################## | 100% 0.56s

avrdude: 7056 bytes of flash written
avrdude: verifying flash memory against C:\Users\sterretje\AppData\Local\Temp\arduino_build_426630/sketch_nov01b.ino.hex:
avrdude: load data flash data from input file C:\Users\sterretje\AppData\Local\Temp\arduino_build_426630/sketch_nov01b.ino.hex:
avrdude: input file C:\Users\sterretje\AppData\Local\Temp\arduino_build_426630/sketch_nov01b.ino.hex contains 7056 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.07s

avrdude: verifying ...
avrdude: 7056 bytes of flash verified

avrdude done.  Thank you.

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Robin2

I was sufficiently intrigued to dig out my Leonardo and try uploading a program to it. It worked first time.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up