Connecting a samsung galaxy siii to freebsd

I am connecting a samsung smartphone (galaxy s3) to a freebsd machine. It does not automatically mount. When plugging this machine in, the following message appears:

ugen 7.2: <SAMSUNG> at usbus7

When disconnecting, the following message appears:

ugen 7.2: <SAMSUNG> at usbus7 (disconnected)

What does this tell me about how to mount this smartphone?

Can/Do you set it to mass storage mode on the phone before attaching the cable? (I do not have one, but mine has several USB options and does not automatically become a pen drive.

Unfortunately not. When plugging in the device, the screen shows the message:

Connected as a media device (touch for other USB options)

and when pressing that the following two options appear:

Media device (MTP) [switched on by default]
Camera (PTP) [switched off by default]

The former option mentions a link to Android.com, which contains some instructions on how to connect to a Mac or Windows computer, but not Linux or FreeBSD.

So, no mount, but is there a new raw device in /dev ?

There is. The following new line appears:

lrwxr-xr-x  1 root  wheel            9 Oct 20 08:06 ugen7.2 -> usb/7.2.0

List the target (-L). Can you manually mount it?

With listing the target you mean something like the following?:

ls -L ugen7.2

Mounting is something as follows?:

# mount -t msdosfs /dev/ugen7.2 /mnt
mount_msdosfs: /dev/ugen7.2: Block device required

Perhaps a different syntax?

Yes, now that we can see that it is a symbolic link inode, what is the nature of the thing it points to? The -L of ls is like the -follow in find, or stat() versus lstat(): Man Page for stat (linux Section 2) - The UNIX and Linux Forums

Well, that is what ls tells us -- what sort of inode do we have so far.

Here is what I tried:

# ls -L ugen7.1 
ugen7.1

Also can you explain a bit more about the way to mount? What are things to try?

 
ls -lLd ugen7.2

Maybe grep in fstab and mtab files to see if it is present, do df ?

# ls -lLd /dev/ugen7.2
crw-------  1 root  operator    0,  92 Oct 25 04:46 /dev/ugen7.2

This is what is in fstab:

# Device		Mountpoint	FStype	Options		Dump	Pass#
/dev/ad4s1b		none		swap	sw		0	0
/dev/ad4s1a		/		ufs	rw		1	1
/dev/ad4s1e		/tmp		ufs	rw		2	2
/dev/ad4s1f		/usr		ufs	rw		2	2
/dev/ad4s1d		/var		ufs	rw		2	2
/dev/acd0		/cdrom		cd9660	ro,noauto	0	0

Also df shows the same file systems, ie without the ugen7.2.
By the way, all the time, the samsung galaxy is connected via the usb wire.
I dont think I have a mtab file, at least measuring from the "locate mtab" results.

The mtab is usually /etc/mtab. The device is a c character not a b raw device. If there is no parallel raw device, it may be that the USB is being mounted raw as a character device, not through a driver for a flash memory on USB. Make a listing of the *tab files, df and /dev with the phone and with a pen drive (which probably mounts just fine).

Many users of this and similar devices on *NIX say it is easier to connect over the air to a server you establish on the phone: ftp, ssh, samba! I suppose you could mount an sftp service as a drive with the right tools. Some windows articles talk about MTP drivers, mtpfs, gMTP, libmtp: http://libmtp.sourceforge.net/

One says you need an OTG cable, not the micro usb cable used for charging and sync (2 different USB ports on the phone?)

Another suggested this S2 procedure:

Try the following. This was tested on Galaxy SII, i am assuming it will work for SIII as well

  1. go to Menu -> Settings -> Wireless and network -> USB utilities
  2. Click on Connect Storage to PC
  3. Connect the USB cable to your pc.
  4. Click on Connect USB storage
  5. Use your file manager to install/copy/paste.
  6. Once finished, click on Disconnect storage from PC to disconnect and unmount drive from Ubuntu.

Reference: http://www.tuxtrix.com/2011/07/how-to-access-samsung-galaxy-s-ii-usb.html

http://forums.freebsd.org/showthread.php?t=34957

http://code.google.com/p/android/issues/detail?id=32933

1 Like

Here's how I connect devices through USB to FreeBSD 9 RELEASE:

Plug the device into an available USB port.
Open a terminal window and type the following (with root privileges) to see what the system is calling the device connected to USB:

camcontrol devlist

Here's what mine looks like:

<ST9160310AS 0303>                 at scbus0 target 0 lun 0 (pass0,ada0)
< USB Flash Memory PMAP>           at scbus2 target 0 lun 0 (pass1,da0)

Disregard the fact that my example device is a flash drive, the phone should mount this way as well.
Now you can mount the device with:

mount -t msdosfs /dev/da0s1 /MOUNTPOINT

Just be sure that you get the right device and mount point, and your phone should be mounted.

I think you have slice 1 (s1) automatically detected as being connected to your device. If you do this:

# dmesg | grep da0

then you probably do not see this:

da0: Attempt to query device size failed: NOT READY, Medium not present