question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linux: Continually disconnects the greaseweazle

See original GitHub issue

Hi, @keirf I was messaging you before, but will make this a ticket so I can document the solution somewhere useful 😃

Something in Linux is grabbing the USB port before greaseweazle.

At first I tried fighting modemmanager, but ultimately I’ve uninstalled it, not before adding a few more rules to 49-greaseweazle.rules [1]

lsmod shows nothing using cdc_acm

$ lsmod
Module                  Size  Used by
cdc_acm                36864  0

When I run ./gw info it doesn’t see the GW the first time, this output is in the journal:

$ journalctl -b -f
Aug 31 17:54:40 computer kernel: usb 1-2.1: reset full-speed USB device number 112 using xhci_hcd
Aug 31 17:54:40 computer kernel: usb 1-2.1: USB disconnect, device number 112
Aug 31 17:54:40 computer kernel: usb 1-2.1: new full-speed USB device number 113 using xhci_hcd
Aug 31 17:54:41 computer kernel: usb 1-2.1: New USB device found, idVendor=1209, idProduct=4d69, bcdDevice= 1.00
Aug 31 17:54:41 computer kernel: usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 31 17:54:41 computer kernel: usb 1-2.1: Product: Greaseweazle
Aug 31 17:54:41 computer kernel: usb 1-2.1: Manufacturer: Keir Fraser
Aug 31 17:54:41 computer kernel: usb 1-2.1: SerialNumber: GW135194C04205400002101705
Aug 31 17:54:41 computer kernel: cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device
Aug 31 17:54:41 computer snapd[2144]: hotplug.go:199: hotplug device add event ignored, enable experimental.hotplug

gw info, returns before everything all the journal output completes.

If I run $ ./gw info; sleep 1; ./gw info I get output that looks similar, but the second time it connects:

Aug 31 17:56:43 computer kernel: usb 1-2.1: reset full-speed USB device number 114 using xhci_hcd
Aug 31 17:56:43 computer kernel: usb 1-2.1: USB disconnect, device number 114
Aug 31 17:56:43 computer kernel: usb 1-2.1: new full-speed USB device number 115 using xhci_hcd
Aug 31 17:56:43 computer kernel: usb 1-2.1: New USB device found, idVendor=1209, idProduct=4d69, bcdDevice= 1.00
Aug 31 17:56:43 computer kernel: usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 31 17:56:43 computer kernel: usb 1-2.1: Product: Greaseweazle
Aug 31 17:56:43 computer kernel: usb 1-2.1: Manufacturer: Keir Fraser
Aug 31 17:56:43 computer kernel: usb 1-2.1: SerialNumber: GW135194C04205400002101705
Aug 31 17:56:43 computer kernel: cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device
Aug 31 17:56:44 computer snapd[2144]: hotplug.go:199: hotplug device add event ignored, enable experimental.hotplug
[ end of call to ./gw info]

Aug 31 17:57:12 computer kernel: usb 1-2.1: reset full-speed USB device number 115 using xhci_hcd
Aug 31 17:57:12 computer kernel: usb 1-2.1: USB disconnect, device number 115
Aug 31 17:57:12 computer kernel: usb 1-2.1: new full-speed USB device number 116 using xhci_hcd
Aug 31 17:57:12 computer kernel: usb 1-2.1: New USB device found, idVendor=1209, idProduct=4d69, bcdDevice= 1.00
Aug 31 17:57:12 computer kernel: usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 31 17:57:12 computer kernel: usb 1-2.1: Product: Greaseweazle
Aug 31 17:57:12 computer kernel: usb 1-2.1: Manufacturer: Keir Fraser
Aug 31 17:57:12 computer kernel: usb 1-2.1: SerialNumber: GW135194C04205400002101705
Aug 31 17:57:12 computer kernel: cdc_acm 1-2.1:1.0: ttyACM0: USB ACM device
Aug 31 17:57:13 computer snapd[2144]: hotplug.go:199: hotplug device add event ignored, enable experimental.hotplug

I guess the USB device reset, and the device number increasing every time is expected ?

70-snap.core.rules.d has some stuff about ttyACM0 in it, but it’s a bit hard to understand since it’s all the rules together.

So, stuck for now - but will come back to this and see what else comes up.

[1] -extra ModemManager rules, may be handy:

ATTRS{manufacturer}=="Keir Fraser", ATTRS{product}=="Greaseweazle", \
    ENV{ID_MM_TTY_BLACKLIST}="1"
ATTRS{manufacturer}=="Keir Fraser", ATTRS{product}=="Greaseweazle", \
    ENV{MTP_NO_PROBE}="1"
ATTRS{manufacturer}=="Keir Fraser", ATTRS{product}=="Greaseweazle", \
    ENV{ID_MM_PORT_IGNORE}="1"
ATTRS{manufacturer}=="Keir Fraser", ATTRS{product}=="Greaseweazle", \
    ENV{ID_MM_TTY_MANUAL_SCAN_ONLY}="1"

I also set the filtering-rules=paranoid in ModemManager, similar this: https://newbedev.com/udev-rules-seem-ignored-can-not-prevent-modem-manager-from-grabbing-device

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tdaedecommented, Nov 12, 2021

So I ran into this with one computer - in my case, I found the problem was actually the power draw of the floppy spinning up browning out the USB port and causing either the microcontroller or possibly the USB host to reset (probably the former as the latter usually gives a different dmesg message). It might be worth trying powering your floppy drive from an external 5V power supply and seeing if the problem persists.

In my case, I found that some USB ports would deliver slightly more power, and it was a bit random depending on the position of the spindle motor.

0reactions
stuaxocommented, Jan 5, 2022

Cheers, no further updates as my greaseweazle is in storage so closing makes sense.

When it comes out of storage I’ll give try it and update here if it still doesn’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux: Continually disconnects the greaseweazle - bytemeta
Something in Linux is grabbing the USB port before greaseweazle. At first I tried fighting modemmanager, but ultimately I've uninstalled it, not before...
Read more >
HFE output is hardcoded to double density · Issue #36 - GitHub
Hi, I just build the Greaseweazel board and used an adapter board for this. ... Linux: Continually disconnects the greaseweazle #120.
Read more >
The Greaseweazle: Inexpensive Rescue of Old Floppies
There are many solutions to image old floppies on a very low, flux based level: Kryoflux, Catweasel, Fluxengine or Supercard Pro, ...
Read more >
Universal Discovery Methodology – Hacker, tinkerer, fixer ...
This didn't work, but with the help of a Greaseweazle (another article for another ... So there are two jobs to do –...
Read more >
Links 5/2/2022: Qubes OS 4.1.0 and Ultimate Edition 7.5?
System76 has been selling Linux-powered laptop and desktop ... of his fascinating connections and disconnections to Germany and the US, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found