Skip to content

SD Card Auto-Detect Failure #1

@abible-intellastar

Description

@abible-intellastar

Trying to get a studs card burned and it doesn't seem like fan studs burn will auto detect my sd card reader even though it's in and the card is readable.

abible@abible-latitude:~/proj$ fan studs burn
burn: could not auto detect your SD card

It doesn't seem to be working for a USB card reader either.

The cards are no issue:

[60774.619925] mmc0: new ultra high speed SDR50 SDHC card at address aaaa
[60774.620385] mmcblk0: mmc0:aaaa SS08G 7.40 GiB
[60774.635343] mmcblk0: p1 p2

After some digging through the source, it looks like there might be an issue with reading from stdout. Fwup can see the card,

abible@abible-latitude:~/git/studs/core/src/studsTools$ fwup --detect
/dev/mmcblk0,7948206080

but the code to actually detect whether or not there is a card present isn't functioning as intended:

// attempt to find card devices
out := Buf()
Proc.run("fwup --detect", out)
devs := out.readAllLines
if (devs.isEmpty) abort("burn: could not auto detect your SD card")

I ran the code in the shell and it doesn't seem to work:

fansh> out := Buf()
MemBuf(pos=0 size=0)
fansh> Proc.run("fwup --detect", out)
0
fansh> dev := out.readAllLines
[,]
fansh> dev.isEmpty
true

However trying the actual process command seems to return a result:

fansh> Process(["fwup", "--detect"]).run
fan.sys.Process@15bb6bea
/dev/mmcblk0,7948206080

I am running Ubuntu 18.04 with Java 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions