0

Circuit Playground Express filesystem issues on Ubuntu 20.04
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Circuit Playground Express filesystem issues on Ubuntu 20.04

by IvyCPlay on Wed May 26, 2021 11:04 pm

When using MakeCode projects that make use of storage, the folder the files should be in does not show on Ubuntu 20.04 LTS in a GUI file manager. Doing a dir command in a terminal does show the folder, but when you try to interact with it, it causes an input/output error. Windows 10 does not seem to cause this issue. Can anyone help me please?

IvyCPlay
 
Posts: 7
Joined: Wed May 26, 2021 11:02 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by mikeysklar on Thu May 27, 2021 3:34 pm

Since this sounds more like an Ubuntu file manager issue than a MakeCode problem can you try updating your ubuntu release and confirm if the problem still exists?

Current LTS would be: 20.04.2 LTS.

mikeysklar
 
Posts: 4966
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by IvyCPlay on Tue Jun 01, 2021 11:33 am

I am already using the latest LTS.

IvyCPlay
 
Posts: 7
Joined: Wed May 26, 2021 11:02 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by mikeysklar on Tue Jun 01, 2021 3:01 pm

We should be able to troubleshoot this through the OS as it sounds like it might be more on the linux side if you can use terminal, but not the GUI file manager. You should be able to press ctrl-R in the filemanager to get it to reload.

Have you been using the "Storage" MakeCode guide we have?

https://learn.adafruit.com/data-logging ... torage-use

Are you writing to a USB storage device?

mikeysklar
 
Posts: 4966
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by IvyCPlay on Tue Jun 01, 2021 4:10 pm

I am writing directly to the board's storage. I know my code is working properly as it displays fine on a Windows machine.

IvyCPlay
 
Posts: 7
Joined: Wed May 26, 2021 11:02 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by mikeysklar on Wed Jun 02, 2021 11:26 am

Did pressing "ctrl-R" in the Ubuntu file manager when viewing the USB storage on the device show the current updates? The file manager is known to get behind on updates.

mikeysklar
 
Posts: 4966
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by IvyCPlay on Wed Jun 02, 2021 3:55 pm

Unfortunately, no, that does not fix it. I have a feeling its something deeper in the OS due to the fact trying to CD into it on a terminal fails.

IvyCPlay
 
Posts: 7
Joined: Wed May 26, 2021 11:02 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by mikeysklar on Wed Jun 02, 2021 5:06 pm

Earlier you said you were able to see the CPX saved storage files from a terminal, but the GUI filemanager was not seeing them.

This could be user permissions. the CPX mount point has changed or the CPX is not mounted at all if you cannot access the device from the terminal or filesystem browser.

Maybe you could post a sample of what you can see from terminal so it will be easier to understand what is accessible and not.

mikeysklar
 
Posts: 4966
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by IvyCPlay on Wed Jun 02, 2021 10:22 pm

Screenshot from 2021-06-02 22-18-07.png
Screenshot from 2021-06-02 22-18-07.png (30.16 KiB) Viewed 378 times

IvyCPlay
 
Posts: 7
Joined: Wed May 26, 2021 11:02 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by mikeysklar on Thu Jun 03, 2021 5:55 pm

@IvyCPLay,

Thank you this screenshot is helpful

I see that the SPIFLASH mount point is inaccessible on your ubuntu box.

Can you run these two commands and provide the same style of screenshot while the CPX is plugged in to the Ubuntu box.

Code: Select all | TOGGLE FULL SIZE
df -H
mount

mikeysklar
 
Posts: 4966
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by IvyCPlay on Thu Jun 03, 2021 6:22 pm

There's so much text here I can't fit it in one screenshot. Here's a Pastebin link instead: https://pastebin.com/iL8yUFUj

IvyCPlay
 
Posts: 7
Joined: Wed May 26, 2021 11:02 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by mikeysklar on Thu Jun 03, 2021 8:07 pm

Thank you for pasting this. It all looks correct in terms of the filesystem being mounted up.

SPIFlASH looks like it could be a file not a folder. When you issue the following from /media/ivy/MAKECODE what does the output look like.

Code: Select all | TOGGLE FULL SIZE
ls -l SPIFLASH
tail -5 SPIFLASH


btw1: pastebin is pretty cool. I have never seen that.

btw2: what is with all the /snap mounts?

mikeysklar
 
Posts: 4966
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by IvyCPlay on Thu Jun 03, 2021 8:58 pm

Screenshot from 2021-06-03 20-53-47.png
Screenshot from 2021-06-03 20-53-47.png (21.19 KiB) Viewed 342 times


Also, I believe the snap mounts are from snap applications I have installed. I think that's just how those work.

IvyCPlay
 
Posts: 7
Joined: Wed May 26, 2021 11:02 pm

Re: Circuit Playground Express filesystem issues on Ubuntu 2

by mikeysklar on Fri Jun 04, 2021 10:12 am

Okay, I see that the SPIFLASH device is not accessible at all from your Ubuntu despite the USB flash being sucessfully mounted. I did see a note on a microbit makecode page about having to create special UDEV rule with linux due to Web USB conflicts.

https://support.microbit.org/support/so ... leshooting

Linux
If Chromium has been installed from the snap store (the default in the Ubuntu Software Store) it will not be able to access WebUSB devices.

On some Linux distributions eg. Ubuntu, you may need to declare a udev rule. To do this:
Close Chrome
On Fedora, ensure that the plugdev group exists
getent group plugdev >/dev/null || sudo groupadd -r plugdev
Create a file at
/etc/udev/rules.d/50-microbit.rules
with the following content:
SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", MODE="0664", GROUP="plugdev"
Add your user to the plugdev group (replace with your username):
sudo usermod -a -G plugdev <your-username>
Restart the udev rules
sudo udevadm control --reload-rules
Log out and log back in
Open Chrome and try to pair again

mikeysklar
 
Posts: 4966
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.