USB mass storage device

Here is an attempt to use the Pokitto SD card by plugging in the Pokitto and it detecting as mass storage device.

image image

It doesn’t seem to work properly yet. Perhaps it can be adapted to use the existing Pokitto SD
functions?

– UPDATE –
After reformatting my SD card to FAT32 following a hint on discord by @jonne about why a different project might not be behaving correctly, this seems to work quite well, not much in the way of slowness etc.
Still use at own risk, but I believe the risk is low.

9 Likes

i tested this. The contents of the SD was showing ok in Linux. I could navigate to a folder. But when I tried to copy (replace) a 17Mb file to that folder the copy just hanged.

1 Like

There might not be an error after all. It is just a bit slow :slight_smile: I tried with a 1 Mb file and it succeeded in about 20-30 sec. So 17Mb would take about 425 s. I probably just did not wait long enough (there are no actual progress bar).

3 Likes

Probably not designed for USB3 :stuck_out_tongue:

@spinal you talked about that you were able to connect Pokitto as an USB drive to a mobile phone. Did you use this kind of cable/adapter?

Edit: Or just use standard usb charging cables for Pokitto and a mobile phone and link them together with this?

I used a normal micro-usb charging cable with an OTG adapter on the phone side. The first link is the one you would need. Internally the adapter shorts the extra micro-usb pin so that the phone knows it HAS to be host. (or os it that the device knows it HAS to be slave?)… Either way an OTG adapter is what you need.

So the second one (female-to-female USB A) does not work? I just ordered it :stuck_out_tongue_winking_eye:

No idea, I don’t have one. I only know that the 5th pin on micro-usb it to signify a slave device, so an OTG adapter has this bridged to ground to tell the phone to always act as the host.

Finally got the USB OTG cable for connecting my phone and Pokitto. Not yest tested it.

2 Likes

I can see the files in the Pokitto SD :slight_smile: It just takes time until the phone can recognize Pokitto.

Now, it is finally possible to copy new games to Pokitto while on the go!

(Of course, you can always take the SD card out and copy files to it but this is way cooler :sunglasses: )

5 Likes

Well alternatively i have been using an otg cable and an SD card reader to add/flash games on the go using my phone since almost day one as i am rarely in front of a computer in my free time :wink:.

1 Like

The usb app is very slow, also I couldn’t make it quit the usb mass storage device loop either.

Tested the usb otg cable with the new Hex game. The unzipped size was about 4 mb. The Usb drive worked very well with the phone.

Is it possible to get a progress bar on the Pokitto screen? If not, even an indication about the file transfer start and end would be very helpful.

No idea, the whole system seems to lock up once it goes into usb mode.

If one of those command-functions in USBMSD_SD.cpp is related to the start/end of reading the file from SPI, that could be hacked to write something on the screen. Thought, updating the whole screen buffer to the screen might cause unwanted delays to the SPI traffic(?), so maybe using direct screen drawing to draw an indicator to the screen would be more SPI friendly.