Reply
Thread Tools
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#21
That would be great!

In the meantime, does any one know how to setup unfs3 on harmattan?

I can't find any good documentation on how to do that...
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#22
Originally Posted by juiceme View Post
There's one idea I have been thinking about but not yet gone on experimenting stage;

Benefits: Now the partitions could be kept mounted while exporting, without ill effects to the device. All parttions could easily be exported, not just MyDocs.
What's the use case for this? Why would you want to update the files from both places at once?

As long as the g_file_storage or g_mass_storage driver is being used, it cannot be done with the kernel modules as-is.

http://www.linux-usb.org/gadget/file_storage.html
 

The Following User Says Thank You to jackburton For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#23
Originally Posted by jackburton View Post
What's the use case for this? Why would you want to update the files from both places at once?

As long as the g_file_storage or g_mass_storage driver is being used, it cannot be done with the kernel modules as-is.

http://www.linux-usb.org/gadget/file_storage.html
Excactly. I found out the hard way trying this leads to system unstability.

Why it would be usable; The current way it's implemented is too cludgy IMHO.
  • you need a specific daemon to unmount/mount the filesystems on need and handle the exporting
  • there are applications that cannot run when MyDocs is not mounted, for example the camera and things like Easy Debian which have loop-mounted rootFS on MyDocs
  • If you have these kind of applications running, you cannot umount MyDocs before closing them
  • sometimes (yes it has happened) the state machine of usb-moded gets confused and thinks it has mounted MyDocs when it isn't and vice versa

The whole shebang would be simpler if there was a module that had this kind of functionality:
  • both USB ethernet and USB memory storage modes in one gadget
  • ability to export the backing storage in read/write mode without collisions in the locally mounted storage
  • there would be no need at all for usb-moded as user would not need to select between "SDK mode" and "USB memeory mode" and nothing would need to be mounted/unmounted ever again
  • all applications relaying on the exported filesystems could continue working all the time, transparently without need to know if the FS was exported or not

What I think happened, why this thing was done the way it is now; In symbian the devices have this kind of multiple USB modes, that users need to select; thre's mass memory mode, media transfer mode, PC suite mode, whatever.
They were unable to think outside the box at the time this was implemented, and more or less copied the symbian architecture to Harmattan without thinking of simplifying and streamlining it...
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#24
Originally Posted by juiceme View Post
  • there are applications that cannot run when MyDocs is not mounted, for example the camera and things like Easy Debian which have loop-mounted rootFS on MyDocs
  • If you have these kind of applications running, you cannot umount MyDocs before closing them
The need to use all of MyDocs could be replaced with loopback mounted subdirectories I guess. Perhaps some symlinks would allow for easier selecting which file areas to export in the gadget. It still doesn't solve the problem of both sides reading and writing. Based on research, it seems that problem has been addressed via MTP, which is used in Android among others.

http://processors.wiki.ti.com/index....oid_DevKit_MTP

Originally Posted by juiceme View Post
The whole shebang would be simpler if there was a module that had this kind of functionality:[LIST][*]both USB ethernet and USB memory storage modes in one gadget
I believe this is meant to be provided by g_multi driver. Here is a sample I found from: https://github.com/RobertCNelson/too...-ether-load.sh

Code:
modprobe g_multi file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 iSerialNumber=${SERIAL_NUMBER} iManufacturer=Circuitco  iProduct=BeagleBone${BLACK} host_addr=${cpsw_1_mac}
Originally Posted by juiceme View Post
[*]ability to export the backing storage in read/write mode without collisions in the locally mounted storage
Again, it looks like MTP does this.

Anybody know how MTP works as a gadget?
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#25
It looks like the 'sync and connect' mode does both usb networking and file access via MTP by default. This is in the g_nokia driver... Now how to force the behavior is what I'd like to know...
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#26
Originally Posted by mcbook View Post
That would be great!

In the meantime, does any one know how to setup unfs3 on harmattan?

I can't find any good documentation on how to do that...
I got it running here on my N9. I can mount using Windows NFS client, but file access just hangs when I actually try to open the drive letter.

Boo
 
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#27
Hi,

how did you manage to setup unfsd?

I get an error everytime I try to run it...
"Cannot register service"...
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#28
Originally Posted by mcbook View Post
Hi,

how did you manage to setup unfsd?

I get an error everytime I try to run it...
"Cannot register service"...
Start the portmap service first.
 
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#29
that doesn't help unfortunately....
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:15.