Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
greubel
Level 7

USB Drive access

I just acquired a 2T USB drive and moved over 300 movies to it. Now when I mount the drive, it takes over a minute and a half before the application gets control back. The drive shows that it is being accessed. This occurs at app startup and first access OR when I plug the drive in while the app is running.

What is Roku doing ? and why so long ?

14:55:57.201 * Disk Volumes roList
14:55:57.209 . count 4
14:55:57.217 . [0] common:
14:55:57.224 . [1] ext1:
14:55:57.233 . [2] pkg:
14:55:57.241 . [3] tmp:
14:57:24.972 USB ext1:/ Volume MOVIES
0 Kudos
8 Replies
Komag
Level 9

Re: USB Drive access

Holy crap, I thought my 16GB stick was a good size! 2TB is over 100X as big, so whereas my stick takes 1s to process, yours takes 100s, just the scale of it maybe?
0 Kudos
squirreltown
Level 8

Re: USB Drive access

I've been using a 1TB HFS drive with 300-ish movies for a long time. If I disconnect it and reconnect it it takes no more then one second to register with the app once the app starts looking. This is with an app based on the SDK USB example.
Kinetics Screensavers
0 Kudos
Komag
Level 9

Re: USB Drive access

Maybe the exact format/codec of the movies makes a difference
0 Kudos
greubel
Level 7

Re: USB Drive access

Maybe it's the format of the drive, FAT32 ? It's formatted as one partition.
I have tested the code using a USB hub with 8 drives with multiple partitions, formatted as FAT and NTSF.
Could be just the number of files ???
0 Kudos
RokuMarkn
Level 7

Re: USB Drive access

It's not clear to me what you mean when you say "before the application gets control back". Are you talking about your own app, the Roku Media Player app, or the Roku firmware? I think you said that if the drive is already plugged in when you start "the app", it takes a long time. That doesn't really make sense to me, so could you clarify? If you're talking about your own app, are you saying that if you put a print statement in the first line of Main(), you don't see it for several minutes?

--Mark
0 Kudos
squirreltown
Level 8

Re: USB Drive access

"greubel" wrote:
Maybe it's the format of the drive, FAT32 ? It's formatted as one partition.
I have tested the code using a USB hub with 8 drives with multiple partitions, formatted as FAT and NTSF.
Could be just the number of files ???


I have Macs, so although I originally used FAT32 for my Roku/USB drive I changed it when I saw i could use HFS. FAT32 was a real pain when you added new files and they would sort by date not alpha. In this situation i would always suspect the drive enclosure first unless its worked OK with other drives. The number of files - unlikely to impossible. The format of the files - at startup most any device is reading the directory not the files themselves, unless it's virus software or the like. I would try a different brand of enclosure, or better yet, try the drive in an enclosure that is proven to work OK.
Kinetics Screensavers
0 Kudos
greubel
Level 7

Re: USB Drive access

The app "Chaneru" starts up and tries to get the USB drive /volume information.
This also occurs if the drive is removed and pluged back in.
This time is on a legacy. A Roku3 is faster but still a long delay

It appears that the "GetVolumeInfo()" is causing the delay.
Here is the code:

v = m.drive.GetVolumeList()
Dump_Obj(v,"Disk Volumes") <---- 14:55:57.201 * Disk Volumes roList
for i=0 to v.Count() -1
if instr(1,v[i],"ext") > 0
m.USB_Drives = m.USB_Drives + 1
drv = v[i]+"/"
r = m.drive.GetVolumeInfo(drv)
name = r.label
if name = invalid or Len(name) < 1
name = "Unlabeled"
end if
Logit(["USB ",drv," Volume ",name]) <---- 14:57:24.972 USB ext1:/ Volume MOVIES
0 Kudos
greubel
Level 7

Re: USB Drive access

Tried it with RMP and same symptom
0 Kudos