0

Mu Editor : unable to detect device.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Mu Editor : unable to detect device.

by lpatters35254 on Wed Feb 13, 2019 11:21 am

After installing mu-editor via pip3 on an Arch Linux distribution, mu-editor starts successfully but reports that it cannot find the attached Adafruit Feather M4 Express device.

The device is available on /dev/ttyACM0 which is owned by the uucp group. My userid is a member of the uucp group.

Suggestions?

Thank you.

lpatters35254
 
Posts: 2
Joined: Wed Feb 13, 2019 9:29 am

Re: Mu Editor : unable to detect device.

by adafruit_support_carter on Thu Feb 14, 2019 2:57 pm

Check the group of /dev/ttyACM0 and see if it also uucp.

You may also need to deal with modemmanager and add udev rules:
https://learn.adafruit.com/adafruit-ard ... -rules-6-4

adafruit_support_carter
 
Posts: 9884
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mu Editor : unable to detect device.

by lpatters35254 on Fri Feb 15, 2019 9:38 am

I was able to find a solution which works for my environment (Arch Linux). Below are the steps which I used.

I connected the Feather M4 Express to a USB connector. Then, operating as root, I issued the following command to verify that the device was detected as a USB drive.
journalctl -n 40
This will print the last 40 lines of the systemd journal. Below is sample output.

Feb 15 06:37:13 puget4 kernel: usb 2-12: new full-speed USB device number 9 using xhci_hcd
Feb 15 06:37:13 puget4 kernel: usb 2-12: New USB device found, idVendor=239a, idProduct=8026, bcdDevice= 1.00
Feb 15 06:37:13 puget4 kernel: usb 2-12: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Feb 15 06:37:13 puget4 kernel: usb 2-12: Product: Feather M4 Express
Feb 15 06:37:13 puget4 kernel: usb 2-12: Manufacturer: Adafruit Industries LLC
Feb 15 06:37:13 puget4 kernel: usb 2-12: SerialNumber: 5716E3072345733502020293000001FF
Feb 15 06:37:13 puget4 kernel: cdc_acm 2-12:1.0: ttyACM0: USB ACM device
Feb 15 06:37:13 puget4 kernel: usb-storage 2-12:1.2: USB Mass Storage device detected
Feb 15 06:37:13 puget4 kernel: scsi host8: usb-storage 2-12:1.2
Feb 15 06:37:13 puget4 kernel: input: Adafruit Industries LLC Feather M4 Express Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/>
Feb 15 06:37:13 puget4 kernel: input: Adafruit Industries LLC Feather M4 Express Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-1>
Feb 15 06:37:13 puget4 kernel: input: Adafruit Industries LLC Feather M4 Express Consumer Control as /devices/pci0000:00/0000:00:14>
Feb 15 06:37:13 puget4 kernel: input: Adafruit Industries LLC Feather M4 Express as /devices/pci0000:00/0000:00:14.0/usb2/2-12/2-12>
Feb 15 06:37:13 puget4 kernel: hid-generic 0003:239A:8026.0007: input,hidraw5: USB HID v1.11 Keyboard [Adafruit Industries LLC Feat>
Feb 15 06:37:13 puget4 mtp-probe[7862]: checking bus 2, device 9: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-12"
Feb 15 06:37:13 puget4 mtp-probe[7862]: bus: 2, device: 9 was not an MTP device
Feb 15 06:37:13 puget4 systemd-logind[732]: Watching system buttons on /dev/input/event22 (Adafruit Industries LLC Feather M4 Expre>
Feb 15 06:37:13 puget4 mtp-probe[7895]: checking bus 2, device 9: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-12"
Feb 15 06:37:13 puget4 mtp-probe[7895]: bus: 2, device: 9 was not an MTP device
Feb 15 06:37:14 puget4 kernel: scsi 8:0:0:0: Direct-Access PQ: 0 ANSI: 3
Feb 15 06:37:14 puget4 kernel: scsi 8:0:0:1: Direct-Access PQ: 0 ANSI: 3
Feb 15 06:37:14 puget4 kernel: sd 8:0:0:0: [sdb] 4089 512-byte logical blocks: (2.09 MB/2.00 MiB)
Feb 15 06:37:14 puget4 kernel: sd 8:0:0:0: [sdb] Write Protect is off
Feb 15 06:37:14 puget4 kernel: sd 8:0:0:0: [sdb] Mode Sense: 00 00 00 00
Feb 15 06:37:14 puget4 kernel: sd 8:0:0:0: [sdb] Asking for cache data failed
Feb 15 06:37:14 puget4 kernel: sd 8:0:0:0: [sdb] Assuming drive cache: write through
Feb 15 06:37:14 puget4 kernel: sd 8:0:0:1: [sdc] Attached SCSI removable disk
Feb 15 06:37:14 puget4 kernel: sdb: sdb1
Feb 15 06:37:14 puget4 kernel: sd 8:0:0:0: [sdb] Attached SCSI removable disk

The next-to-last line in the above sample shows the disk id which was assigned to the Feather.

Operating as 'root', I created a new directory named CIRCUITPY in the root of the file-system (/CIRCUITPY).

I (operating as 'root') used the following command to mount the newly detected USB drive.

mount -o uid=webmstr,gid=webmstr /dev/sdb1 /CIRCUITPY

Where 'webmstr' is the user/group that I will be operating as when using mu-editor and 'sdb1' is the device id assigned by the system.

Now I (operating as 'webmstr') can successfully use mu-editor to create/edit the 'code.py' file on the Feather.

The following command will un-mount the Feather device.

umount /CIRCUITPY

lpatters35254
 
Posts: 2
Joined: Wed Feb 13, 2019 9:29 am

Re: Mu Editor : unable to detect device.

by adafruit_support_carter on Fri Feb 15, 2019 12:28 pm

Thanks for sharing the info. Might help others working with Arch.

adafruit_support_carter
 
Posts: 9884
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.