Trouble with SD Card
-
- Posts: 7
- Joined: Mon Jun 20, 2016 9:23 am
Trouble with SD Card
Hi community.
After connecting pyboard to my PC, I insert MicroSD Card to pyboard. Just standard boot from flash.. When I write
>>> os.listdir('/')
I can see
['flash', 'sd']
so, it's clear that the board can identify SD Card. But when I write
>>> os.listdir('/sd')
I get this error;
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: No such file or directory: '/sd'
So, I can't read or write SD card. What could be the problem?
After connecting pyboard to my PC, I insert MicroSD Card to pyboard. Just standard boot from flash.. When I write
>>> os.listdir('/')
I can see
['flash', 'sd']
so, it's clear that the board can identify SD Card. But when I write
>>> os.listdir('/sd')
I get this error;
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: No such file or directory: '/sd'
So, I can't read or write SD card. What could be the problem?
Re: Trouble with SD Card
I think that only unpatrtitioned SDcards which are formatted using FAT32 are supported.
I know lots of SDs get reformatted using multiple partitions (for say Raspberry Pi), and I don't think that these are suppoted.
I know lots of SDs get reformatted using multiple partitions (for say Raspberry Pi), and I don't think that these are suppoted.
-
- Posts: 7
- Joined: Mon Jun 20, 2016 9:23 am
Re: Trouble with SD Card
Thank you for your answer Dave. Bad luck for me because I have tried 2 different SD card which are formatted single partition FAT32
I changed one of them to NTFS, it's same. Now I'm trying EXT4.. No, it's same. What can I do anymore?

Re: Trouble with SD Card
You have to carefully read Daves answer 
Unpartitioned SD card. Means no partition at all.
Under linux that means you need to have no sdb1 or sdbX but only sdb.
And you need to format sdb and not sdbX
Not sure how to manage this under the windows world, which I left long time ago.
There is no support for EXT4, NTFS and Co.
Good luck
EDIT: Could be also sdc sdd or whatever, you need to check... don't tell me you erased your harddisk by using my sdb example

Unpartitioned SD card. Means no partition at all.
Under linux that means you need to have no sdb1 or sdbX but only sdb.
And you need to format sdb and not sdbX
Not sure how to manage this under the windows world, which I left long time ago.
There is no support for EXT4, NTFS and Co.
Good luck
EDIT: Could be also sdc sdd or whatever, you need to check... don't tell me you erased your harddisk by using my sdb example

Re: Trouble with SD Card
Hi folks, I cannot confirm that. I just looked at two SD cards on two systems, size 8 and 16GB, but I had a 64GB card used too. Boths cards are accepted by PyBoardV1. Both have a single partition with a partition sector formatted as FAT. On on system, the cards show up as /dev/sde1, on the other as /dev/mmcblk0 and /dev/mmcblk0p1. What I did, I reformatted the cards before using as FAT.
SO maybe you should confirm that the cards have a single partition only, or use a different computer for verification, that they are properly formatted.
P.S.: When inserted into PYBoard, the cards are shown as /dev/sdc1.
SO maybe you should confirm that the cards have a single partition only, or use a different computer for verification, that they are properly formatted.
P.S.: When inserted into PYBoard, the cards are shown as /dev/sdc1.
-
- Posts: 7
- Joined: Mon Jun 20, 2016 9:23 am
Re: Trouble with SD Card
I used GParted to format SD Cards, under Linux. No flags, no partitioning, just plain format to FAT32.
Note that; there is NO trouble when I reset the board while SD card is connected. PyBoard is running from SD Card properly. So, I don't think there is a format unsuitability.
Now, I'm going to change the firmware to the latest version.
Note that; there is NO trouble when I reset the board while SD card is connected. PyBoard is running from SD Card properly. So, I don't think there is a format unsuitability.
Now, I'm going to change the firmware to the latest version.
Re: Trouble with SD Card
Hello ahmet_cihan, just two questions:
a) are there any files on the SD card you're trying
b) when PyBoard is connected to your PC, is the SD card visiblle as external drive?
Regards, Robert
a) are there any files on the SD card you're trying
b) when PyBoard is connected to your PC, is the SD card visiblle as external drive?
Regards, Robert
-
- Posts: 7
- Joined: Mon Jun 20, 2016 9:23 am
Re: Trouble with SD Card
Hi Robert.
1- There is not any file on the SD Card.
2 - When I boot Pyboard with a SD Card, PC can see SD Card as an external drive. In this case there is no problem. Problem occurs when I connect SD Card after flash boot.
I changed the firmware to the latest. What now; I insert SD Card after flash boot
>>> os.listdir('/')
I can see
['flash']
This is more logical
Because formerly, I could see 'sd' with this command but it gave error when I tried to list 'sd'. But now I can't see 'sd' in the list of '/'.
Still no problem with SD boot.
1- There is not any file on the SD Card.
2 - When I boot Pyboard with a SD Card, PC can see SD Card as an external drive. In this case there is no problem. Problem occurs when I connect SD Card after flash boot.
I changed the firmware to the latest. What now; I insert SD Card after flash boot
>>> os.listdir('/')
I can see
['flash']
This is more logical

Still no problem with SD boot.
Re: Trouble with SD Card
What do you mean with
PyBoard boots from its image in flash outside the file system. It just takes boot.py and main.py from a filesystem in flash or SD if present.
There might be a problem with the SD card connector.
, especially when there is no file on the SD card.Still no problem with SD boot.
PyBoard boots from its image in flash outside the file system. It just takes boot.py and main.py from a filesystem in flash or SD if present.
There might be a problem with the SD card connector.
-
- Posts: 7
- Joined: Mon Jun 20, 2016 9:23 am
Re: Trouble with SD Card
I will explain step-by-step;
SD Card: no data, no file, FAT32 formatted.
PC: Linux (Ubuntu 15.04)
A - Connect SD Card -> then -> Plug in USB
1- Command "screen /dev/ttyACM0"
2- Darkness
3- CTRL+C
4- I have console.
5- >>> import os
>>> os.listdir('/')
['flash', 'sd']
6- No problema!
B- Plug in USB, NO SD Card
1- Command "screen /dev/ttyACM0"
2- Darkness
3- CTRL+C
4- I have console.
5- >>> import os
>>> os.listdir('/')
['flash']
6- Connect SD Card
7->>> os.listdir('/')
['flash']
still cannot see 'sd'
SD Card: no data, no file, FAT32 formatted.
PC: Linux (Ubuntu 15.04)
A - Connect SD Card -> then -> Plug in USB
1- Command "screen /dev/ttyACM0"
2- Darkness

3- CTRL+C
4- I have console.
5- >>> import os
>>> os.listdir('/')
['flash', 'sd']
6- No problema!
B- Plug in USB, NO SD Card
1- Command "screen /dev/ttyACM0"
2- Darkness

3- CTRL+C
4- I have console.
5- >>> import os
>>> os.listdir('/')
['flash']
6- Connect SD Card
7->>> os.listdir('/')
['flash']
still cannot see 'sd'