View Full Version : Connecting N900 mass storage mode linux
shadow12
12-02-2009, 05:23 AM
Hi guys, having a small issues connecting the N900 to my Ubuntu install. When connected to the machine using mass storage mode. The device does not get mounted. looking at log/messages it reports seeing it as ehci_hcd
Dec 2 10:13:33 computer kernel: [1038738.136785] usb 1-5: new high speed USB device using ehci_hcd and address 11
Any ideas?
Thanks
archebyte
12-02-2009, 07:02 AM
What version of Ubuntu are you using?
Karmic mounts it automatically as '/media/Nokia N900' when Mass Storage Mode is selected.
47946.744060] usb 5-2: new full speed USB device using uhci_hcd and address 8
[47946.868064] usb 5-2: device descriptor read/64, error -71
[47947.148056] usb 5-2: device descriptor read/64, error -71
[47947.308100] hub 5-0:1.0: unable to enumerate USB device on port 2
[47952.868063] usb 1-8: new high speed USB device using ehci_hcd and address 16
[47953.001490] usb 1-8: configuration #1 chosen from 2 choices
[47953.013522] cdc_acm 1-8:1.6: This device cannot do calls on its own. It is not a modem.
[47953.013701] cdc_acm 1-8:1.6: ttyACM1: USB ACM device
[47953.021625] usb0: register 'cdc_ether' at usb-0000:00:1d.7-8, CDC Ethernet Device, 2a:b9:03:f7:68:92
[47961.177358] usb 1-8: USB disconnect, address 16
[47961.433756] usb0: unregister 'cdc_ether' usb-0000:00:1d.7-8, CDC Ethernet Device
[47962.492105] usb 1-8: new high speed USB device using ehci_hcd and address 17
[47962.626303] usb 1-8: configuration #1 chosen from 2 choices
[47962.638372] scsi5 : SCSI emulation for USB Mass Storage devices
[47962.638609] usb-storage: device found at 17
[47962.638615] usb-storage: waiting for device to settle before scanning
[47967.637593] usb-storage: device scan complete
[47967.639222] scsi 5:0:0:0: Direct-Access Nokia N900 031 PQ: 0 ANSI: 2
[47967.639701] scsi 5:0:0:1: Direct-Access Nokia N900 031 PQ: 0 ANSI: 2
[47967.640522] sd 5:0:0:0: Attached scsi generic sg2 type 0
[47967.640744] sd 5:0:0:1: Attached scsi generic sg3 type 0
[47967.673715] sd 5:0:0:1: [sdc] Attached SCSI removable disk
[47967.677055] sd 5:0:0:0: [sdb] 56631296 512-byte logical blocks: (28.9 GB/27.0 GiB)
[47967.677715] sd 5:0:0:0: [sdb] Write Protect is off
[47967.677718] sd 5:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[47967.677721] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[47967.681907] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[47967.681914] sdb:
[47967.699166] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[47967.699176] sd 5:0:0:0: [sdb] Attached SCSI removable disk
Run the following command on Ubuntu after selecting Mass Storage Mode and post the results.
sudo fdisk -l
On my box, the N900 is seen as /dev/sdb
archebyte$ sudo fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdea1dea1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5222 41945683+ 7 HPFS/NTFS
/dev/sda2 5223 15182 80003700 5 Extended
/dev/sda5 5223 14933 78003576 83 Linux
/dev/sda6 14934 15182 2000061 82 Linux swap / Solaris
Disk /dev/sdb: 29.0 GB, 28995223552 bytes
64 heads, 32 sectors/track, 27652 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
archebyte
12-02-2009, 07:07 AM
Hi guys, having a small issues connecting the N900 to my Ubuntu install. When connected to the machine using mass storage mode. The device does not get mounted. looking at log/messages it reports seeing it as ehci_hcd
Dec 2 10:13:33 computer kernel: [1038738.136785] usb 1-5: new high speed USB device using ehci_hcd and address 11
Any ideas?
Thanks
The N900 will not be mounted if files in the MyDocs are open or directories under MyDocs are 'cd' ed into in Xterm.
debernardis
12-02-2009, 07:10 AM
The N900 will not be mounted if files in the MyDocs are open or directories under MyDocs are 'cd' ed into in Xterm.
This held true for the N8x0 too :)
shadow12
12-02-2009, 07:13 AM
9.04
I dont think i have anything open. Tried straight after reboot as well. Maybe something weird with my ubuntu install. Although never had issues in the past.
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbab9b72c
Device Boot Start End Blocks Id System
/dev/sda1 * 1 4864 39070048+ 7 HPFS/NTFS
/dev/sda2 4865 60771 449072977+ 5 Extended
/dev/sda3 60772 60801 240975 83 Linux
/dev/sda5 4865 7539 21486906 83 Linux
/dev/sda6 7540 9971 19535008+ 83 Linux
/dev/sda7 9972 34286 195310206 83 Linux
/dev/sda8 34287 35563 10253907 82 Linux swap / Solaris
/dev/sda9 35563 60648 201495231 83 Linux
/dev/sda10 60649 60771 987966 b W95 FAT32
Will try on my other linux machines.
archebyte
12-02-2009, 07:44 AM
9.04
I dont think i have anything open. Tried straight after reboot as well. Maybe something weird with my ubuntu install. Although never had issues in the past.
Looks like Ubuntu does not even recognize the eMMC. Have you tried a different USB port?
Do you get the same result when the USB cable is connected after turning off the N900?
shadow12
12-02-2009, 08:01 AM
OK tried all USB ports on PC (excessive I know) no luck.
Tried another ubuntu system at it seems to be working fine. So will try again on this machine after reboot. Can't reboot at the moment too much running.
Weird thing is it did not have all the folders that are listed in the N900 file manager. Is this normal?
zerojay
12-02-2009, 08:10 AM
OK tried all USB ports on PC (excessive I know) no luck.
Tried another ubuntu system at it seems to be working fine. So will try again on this machine after reboot. Can't reboot at the moment too much running.
Weird thing is it did not have all the folders that are listed in the N900 file manager. Is this normal?
It is if you had some programs running that were still accessing those directories, yes.
shadow12
12-02-2009, 08:16 AM
It is if you had some programs running that were still accessing those directories, yes.
On the N900, not to my knowledge. It was after reboot. Unless there are apps I need to shutdown that start on startup? So I guess the directory structure I see on the N900 should be mirrored directly on the Linux machine? If yes I will have a poke around and see.
shadow12
12-02-2009, 08:32 AM
OK rebooted my ubuntu system and it is all ok. The N900 and sdcard get mounted when on and when switched off the same. Still though the only folders I see are: cities, DCIM, Mac OS, tmp as well as autorun.inf
archebyte
12-02-2009, 08:39 AM
OK rebooted my ubuntu system and it is all ok. The N900 and sdcard get mounted when on and when switched off the same. Still though the only folders I see are: cities, DCIM, Mac OS, tmp as well as autorun.inf
The hidden directories are renamed in the N900 File-manager.
.documents -> Documents
.sounds -> Audio Clips
.video -> Video Clips
.images -> Images
DCIM -> Camera
So in Ubuntu, view the hidden directories and you should be good to go. 'ls -la' or Ctrl+H in Nautilus.
Is it just me, or is that behaviour completely perverse and entirely unhelpful? What's the supposed upside of hiding the directories (using the unix convention) then making them visible again via Filemanager hacks?
Also - what happens if you just rename them so they're actually called their 'user visible' names?
shadow12
12-02-2009, 08:45 AM
Excellent. Didn't think of that. Doh!!
Anyhow now I have your ear is there any way to mount smb shares on the N900 and vice a versa. Even just a point in the general direction of a solution would be good. Since with the meamo platform I dont know how much is applicable from previous versions.
shadow12
12-02-2009, 08:47 AM
Is it just me, or is that behaviour completely perverse and entirely unhelpful? What's the supposed upside of hiding the directories (using the unix convention) then making them visible again via Filemanager hacks?
Also - what happens if you just rename them so they're actually called their 'user visible' names?
I guess it stops people deleting them by accident?!?
archebyte
12-02-2009, 09:01 AM
Is it just me, or is that behaviour completely perverse and entirely unhelpful? What's the supposed upside of hiding the directories (using the unix convention) then making them visible again via Filemanager hacks?
IIRC, it is related to localization.
Also - what happens if you just rename them so they're actually called their 'user visible' names?
The File-Manager may take a dump. It should be worth trying it out :P
archebyte
12-02-2009, 09:04 AM
Anyhow now I have your ear is there any way to mount smb shares on the N900 and vice a versa. Even just a point in the general direction of a solution would be good. Since with the meamo platform I dont know how much is applicable from previous versions.
IIRC, smb shares are not supported out of the box. It requires loading some kernel modules. Search tmo - I recall reading a thread where this was discussed.
Andre Klapper
12-02-2009, 10:12 AM
IIRC, smb shares are not supported out of the box.
Yes - See https://bugs.maemo.org/show_bug.cgi?id=2905#c8 .
shadow12
12-02-2009, 10:15 AM
Sorry bumping thread for something a bit more specific. Had a search. Found pages in wiki which relate to using older models but nothing N900 specific (Still not sure what is compatible and what is not). Found this:
https://garage.maemo.org/projects/wizard-mounter
would that work?
shadow12
12-02-2009, 10:20 AM
Yes - See https://bugs.maemo.org/show_bug.cgi?id=2905#c8 .
Wow sounds like I might have opened a can of worms. Are there any 3rd party apps that offer simple mounting support that currently work on the N900? If not are there any projects which are nearly there but need some help?:D
IMHO mounting shares is crucial for a geek phone.
shadow12
12-02-2009, 11:19 AM
Bump (if allowed)
Fargus
12-02-2009, 11:55 AM
@OP - If you want to share information from a Windows machine to the N900 you could always go the other way and use Unix services support on Windows and see if that helps. Depends on what you are trying to achieve. If you can post a use case then we might be able to suggest something slightly different that accomplishes your aim.
shadow12
12-02-2009, 12:03 PM
Thanks for replying in thread.
Well i have three machines. Each sharing certain things like printers and media files. I have them all done through samba since people I live with use windows and like access to those devices. All I want to do is access those shares with my N900 using the wireless network i have in my house. I can already ssh to all of them and that is fantastic but definitely would like share mounting abilities. Also would like to be able to come home mount my N900 share and simply copy files to and from it.
Fargus
12-02-2009, 01:26 PM
Are you hosting the printer and other shares on a main desktop or everything directly to the router via wireless?
If you have a host machine running Linux then I suspect your easiest route at present would be to mount volumes on there and tunnel through.
UPnP is a potential option here, especially for windows i suspect.The easiest long term option would be a NAS device and rsync up to it.
If you need to go direct then have a look at progress on Wizard Mount.
Just an after thought, what about using a webserver for sharing too.
shadow12
12-02-2009, 02:41 PM
Nope, everything is shared through pc's.
I will hold out for a while before I decide. Maybe I will look into wizard moutn.
Thanks for all the help guys.
Laughing Man
12-08-2009, 10:31 PM
Hmm is there no way to use mass storage mode to sync with any mass storage mode supporting music player (doesn't seem to see the n900 at all).
Though I could just drag and drop like I normally do. :D Just thought I'd give it a shot.
jamesrich
12-20-2009, 12:48 PM
I'm also having a problem connecting my N900 to my car's Dension Gateway 300, USB box.
Basically doesn't mount the mass storage memory.
I've also since tried with my Toshiba TV, where it crashes the TV, I've got to switch it off and back on to get the remote working.
Is their a fault with the implementation of USB mass storage?
dalonso
01-05-2010, 05:36 AM
I tested yesterday coonecting the N900 as an usb storage device to my notebook running Karmic, and I'm sure there is something weird in the usb implementation.
At first try two N900 icons appear (there's no sd card in my N900). Sometimes, I cannot even browse any of the icons. Other times, one or the other of the two icons change their image to a "sheet of paper" becoming totally irresponsive and cannot even be opened in Nautilus.
Sometimes I have to unplug and replug in order to get one of the icons (the one with DCIM, Mac OS, ...). I was going crazy looking for MyDocs directory until a I learnt by reading this thread about the hidden directories.
With my N800 it works flawlessly.
Has someone reported a bug?
If the device says it cannot be connected because it says it is in use and your /home/user/MyDocs cannot be unmounted and
lsof /home/user/MyDocs
gives you nothing (if it output something, that something would need to be stopped first), you can unmout it manually in terminal with:
umount -l /home/user/MyDocs
Took me two hours to learn this the other day.
demolition
11-27-2011, 05:55 AM
If the device says it cannot be connected because it says it is in use [...]
you can unmout it manually in terminal with:
umount -l /home/user/MyDocs
What distro are you using?
What distro are you using?
Ubuntu, but I was talking about N900 itself.
impeham
04-03-2012, 03:56 PM
Recently, i have a problem related to mass storage mode - after doing several tests i am able to reproduce this behavior every time:
After restart to the N900, i connect it in mass storage mode, and both mmc and mydocs becomes accessible from my pc.
after i disconnect from mass storage mode and reconnect again, only MyDocs is available and i get this message:
"Only device storage connected, Memory card already in use"
I am unable to access mmc card again in mass storage mode until i restart (it is accessible from the n900 after i disconnect mass storage and not accessible after it is connected again - so it seems that the mass storage mode actually dismounts the card, but still i cannot access it from the pc).
Anyone knows how to debug/fix this issue?
Try the mount -l command on the mmc directory before trying to mount?
impeham
04-03-2012, 04:35 PM
Try the mount -l command on the mmc directory before trying to mount?
i'm not sure i understand what you mean.
-l is an option of umount - not mount, and the problem i'm having is not mounting the mmc, but dismounting it + recognizing it in mass storage mode from the PC.
i'm not sure i understand what you mean.
-l is an option of umount - not mount, and the problem i'm having is not mounting the mmc, but dismounting it + recognizing it in mass storage mode from the PC.
If I understand it correctly, yo ucan always access the mmc card from N900, but from PC only after a reboot, right? If so, try manually unmount (with umount -l) the mmc card before you try to connect it to a pc after second time.
If it is inaccesible from the PC, it probably means it is still mounted somehow on N900.
Maybe something is accessing the memory card.
Try "lsof | grep mmc1" and "ls -lR /proc/ | grep mmc1> tmp;clear; cat tmp;rm tmp"
misterc
04-03-2012, 05:18 PM
Maybe something is accessing the memory card.
Try "lsof | grep mmc1" and "ls -lR /proc/ | grep mmc1> tmp;clear; cat tmp;rm tmp"
lsof /dev/media/
impeham
04-03-2012, 05:34 PM
Before connecting the usb cable and activating mass storage mode:
"lsof | grep mmc1" returns empty
Output of:
"ls -lR /proc/ | grep mmc1> tmp;clear; cat tmp;rm tmp" is empty also:
/proc/irq/86/mmc1:
[root ~]#
Output of:
"lsof /dev/media/" is "lsof: status error on /dev/media: No such file or directory"
Also, as I described in post #31 - after connecting the cable and activating mass storage mode, I can see that there are no files in /media/mmc1(and I also get the error mentioned "Only device storage connected, Memory card already in use")
if I disconnect the cable, I can see the card files again in /media/mmc, which I think shows that the mount/dismount worked correctly by mass storage mode.
I can also freely mount and umount mmc using the following with no errors (which causes the files in /media/mmc1 to be accessible/inaccessible):
mount /dev/mmcblk1p1 /media/mmc1
umount -f -l /media/mmc1
Are you "safely removing" the n900 from your host PC? I sometimes get this problem if I don't.
You can also try running
sudo /usr/sbin/osso-usb-mass-storage-disable.sh
and connect to pc again.
Estel
04-03-2012, 11:15 PM
I don't know if it's useful info for current on-topic problem, but I got different "unknown" behavior - after successfully connecting device in mass storage once, (and removing safely), MyDocs isn't accesible for device. No big deal - I've created script that mount it again after disconnect. Furthermore, while being connected, MMC (microSD) is accessible for *both* desktop and N900 (that is, mounted simultaneously).
I can connect it again to desktop PC, yet, only for limited amount of time. After few hours (wasn't able to detect it precisely), connecting device result in charging only - HUBS with diode lighting up doesn't show any device connected, desktop OS'es doesn't act like seeing anything, etc. I've tried many tricks with osso-usb-mass-storage-enable.sh etc, to no avail. Only restart fix this problem.
I'm perfectly sure, that nothing is accessing it, also, it isn't mounting problem - device isn't recognized as USB gadget at all.
/Estel
impeham
04-04-2012, 05:31 AM
Are you "safely removing" the n900 from your host PC? I sometimes get this problem if I don't.
You can also try running
sudo /usr/sbin/osso-usb-mass-storage-disable.sh
and connect to pc again.
Safely removing the device does not help - same issue.
/usr/sbin/osso-usb-mass-storage-disable.sh does not help also...
retsaw
04-04-2012, 06:11 AM
Maybe something is accessing the memory card.
Try [...] and "ls -lR /proc/ | grep mmc1> tmp;clear; cat tmp;rm tmp"My God, why would redirect the output to a file only to cat the file to stdout again and then delete that file, that is absolutely horrible, you barbarian ;)
I see what you were trying to do, you wanted to get rid of the error messages, but there is a easier, quicker and cleaner way to do that, just redirect the error messages straight to /dev/null e.g. "ls -lR /proc/ 2>/dev/null | grep mmc1"
misterc
04-05-2012, 06:06 PM
Before connecting the usb cable and activating mass storage mode:
"lsof | grep mmc1" returns empty
Output of:
"ls -lR /proc/ | grep mmc1> tmp;clear; cat tmp;rm tmp" is empty also:
that's simply rubbish;
this command will never return anything, ever
/proc/irq/86/mmc1:
[root ~]#
Output of:
"lsof /dev/media/" is "lsof: status error on /dev/media: No such file or directory"[...]
apologies on that one; command should be
lsof /media/mmc1
(for micro SD)
respectively
lsof /home/user/MyDocs
for the internal storage
impeham
04-06-2012, 07:23 PM
Nevertheless, i still have this problem - command shows nothing for the mmc, and still, i'm unable to connect it.
Any other ideas?
Nevertheless, i still have this problem - command shows nothing for the mmc, and still, i'm unable to connect it.
Any other ideas?
Well, as far as I can say, you still dit not try unmounting the mmc folder ON N900 BEFORE connecting the phone to the PC, or did you?
umount -l /wherever/mmc/is
impeham
04-06-2012, 08:19 PM
Well, as far as I can say, you still dit not try unmounting the mmc folder ON N900 BEFORE connecting the phone to the PC, or did you?
umount -l /wherever/mmc/is
i did. umount works well - no errors and the files in /media/mmc1 disappears after i run it and still - connecting the cable afterwards + activating mass storage gives me the error.
i did. umount works well - no errors and the files in /media/mmc1 disappears after i run it and still - connecting the cable afterwards + activating mass storage gives me the error.
Hm, then I have no idea. I would check with different computers (various OSs) if you did not do it already. But I doubt it would change anythingm but you never know.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.