Will FreeBSD mount my iPhone?

Stuff that plugs in via USB, FireWire, eSATA, PS/2, etc.

Will FreeBSD mount my iPhone?

Postby Anthie » 16 May 2013, 14:58

Will be there a driver for iPhone?
Anthie
Junior Member
 
Posts: 30
Joined: 17 Nov 2009, 11:15
Location: Shanghai

Postby drhowarddrfine » 16 May 2013, 15:43

Don't you need to ask Apple this?
drhowarddrfine
Member
 
Posts: 895
Joined: 16 Nov 2008, 19:57
Location: St. Louis, Missouri

Postby fonz » 16 May 2013, 20:45

If your iPhone has an SD card you can probably insert that into any card reader and mount it. Also, chances are that when you connect your iPhone to your computer using a USB cable, the entire phone is actually recognised as a USB drive, but I wouldn't know for sure because the only [Aa]pples I ever touch are the ones you can actually eat.
ΔS>0 ⇒ Entropy is here to stay.

"Lawyer" is just "liar" pronounced in a regional accent.
User avatar
fonz
Giant Locked
 
Posts: 2236
Joined: 16 Nov 2008, 16:32
Location: in dreamland, swooning over a woman I can't have

Postby sk8harddiefast » 16 May 2013, 20:51

Yes. Is possible. Install from ports [port]sysutils/fusefs-ifuse[/port] and then run [cmd]sudo ifuse -o allow_other <the folder path were you want to be mounted>[/cmd]. Worked for me and copied all my pictures from iPhone to my FreeBSD :)
====================================
| -------> [color="Blue"]UNIX[/color]. Live Free Or Die! <-------- |
====================================
[color="RoyalBlue"]You can say:[/color] I can't do something because is difficult.
[color="RoyalBlue"]You must say:[/color] I tried a lot before say that I can't.
Never Give up.
[color="Green"]http://unixsystems.dyndns.org/[/color]
[color="Sienna"]I am not an BSD expert. But I really want to help.
Don't afraid to ask me anything. If I can I will help!
[/color]
Nice wallpapers to make your desktop more hardcore :) ---> [color="DarkOliveGreen"]http://forums.freebsd.org/showthread.php?t=13416[/color]
User avatar
sk8harddiefast
Senior Member
 
Posts: 1981
Joined: 01 Mar 2010, 00:47
Location: Athens, Greece

Postby ccc » 07 Sep 2013, 21:17

sk8harddiefast wrote:Yes. Is possible. Install from ports [port]sysutils/fusefs-ifuse[/port] and then run [cmd]sudo ifuse -o allow_other <the folder path were you want to be mounted>[/cmd]. Worked for me and copied all my pictures from iPhone to my FreeBSD :)


I've installed [port]sysutils/fusefs-ifuse[/port] from ports and now if I try to mount an iPhone 5 connecting via USB on my FreeBSD 8.3, then I get this error:
Code: Select all
[CMD]# usbconfig[/CMD]
ugen0.1: <UHCI root HUB VIA> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen1.1: <UHCI root HUB VIA> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen2.1: <UHCI root HUB VIA> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen3.1: <UHCI root HUB VIA> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen4.1: <EHCI root HUB VIA> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
ugen0.2: <USB Multimedia Keyboard LITEON Technology> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen0.3: <Optical USB Mouse Logitech> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
[HIGHLIGHT]ugen4.2: <iPhone Apple Inc.> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON[/HIGHLIGHT]

[cmd]# ifuse -o allow_other /mnt/ipod[/cmd]
[HIGHLIGHT]usbmuxd_get_device_list: error opening socket![/HIGHLIGHT]
No device found, is it connected?
If it is make sure that your user has permissions to access the raw usb device.
If you're still having issues try unplugging the device and reconnecting it.
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby sk8harddiefast » 07 Sep 2013, 22:08

Try as root or using [FILE]sudo[/FILE].
====================================
| -------> [color="Blue"]UNIX[/color]. Live Free Or Die! <-------- |
====================================
[color="RoyalBlue"]You can say:[/color] I can't do something because is difficult.
[color="RoyalBlue"]You must say:[/color] I tried a lot before say that I can't.
Never Give up.
[color="Green"]http://unixsystems.dyndns.org/[/color]
[color="Sienna"]I am not an BSD expert. But I really want to help.
Don't afraid to ask me anything. If I can I will help!
[/color]
Nice wallpapers to make your desktop more hardcore :) ---> [color="DarkOliveGreen"]http://forums.freebsd.org/showthread.php?t=13416[/color]
User avatar
sk8harddiefast
Senior Member
 
Posts: 1981
Joined: 01 Mar 2010, 00:47
Location: Athens, Greece

Postby ccc » 07 Sep 2013, 22:24

sk8harddiefast wrote:Try as root or using sudo.


As root:
Code: Select all
/root # ifuse -o allow_other /mnt/ipod
fuse: failed to open fuse device: No such file or directory

/root # ifuse -o allow_root /mnt/ipod
fuse: failed to open fuse device: No such file or directory
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby sk8harddiefast » 07 Sep 2013, 22:35

I'm not sure, but I think that when you do all this process, the iPhone must be unlocked. Try this and if it does not work even like this, tomorrow I will search to find out what happens.
====================================
| -------> [color="Blue"]UNIX[/color]. Live Free Or Die! <-------- |
====================================
[color="RoyalBlue"]You can say:[/color] I can't do something because is difficult.
[color="RoyalBlue"]You must say:[/color] I tried a lot before say that I can't.
Never Give up.
[color="Green"]http://unixsystems.dyndns.org/[/color]
[color="Sienna"]I am not an BSD expert. But I really want to help.
Don't afraid to ask me anything. If I can I will help!
[/color]
Nice wallpapers to make your desktop more hardcore :) ---> [color="DarkOliveGreen"]http://forums.freebsd.org/showthread.php?t=13416[/color]
User avatar
sk8harddiefast
Senior Member
 
Posts: 1981
Joined: 01 Mar 2010, 00:47
Location: Athens, Greece

Postby ccc » 07 Sep 2013, 22:48

Yep, I still get this problem:

Code: Select all
/root # usbconfig
ugen0.1: <UHCI root HUB VIA> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen1.1: <UHCI root HUB VIA> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen2.1: <UHCI root HUB VIA> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen3.1: <UHCI root HUB VIA> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen4.1: <EHCI root HUB VIA> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
ugen0.2: <USB Multimedia Keyboard LITEON Technology> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen0.3: <Optical USB Mouse Logitech> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
[HIGHLIGHT]ugen4.2: <iPhone Apple Inc.> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON[/HIGHLIGHT]

/root # idevicepair unpair && idevicepair pair
usbmuxd_get_device_list: error opening socket!
No device found, is it plugged in?
/root #
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby ccc » 07 Sep 2013, 23:15

I've tried to mount an iPhone 5 on Linux (Debian/Wheezy) and it works well:
Code: Select all
root@wheezy:~# ifuse /media/ipod
root@wheezy:~# ls /media/ipod
AirFair  Books   Downloads   PhotoData     Purchases   Safari
Airlock  DCIM   iTunes_Control   PhotoStreamsData  Recordings

but I still cannot find a solution for FreeBSD.
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby wblock@ » 07 Sep 2013, 23:25

Have you enabled FUSE in [file]/etc/rc.conf[/file], or at least loaded the kernel module?
User avatar
wblock@
Old Fart
 
Posts: 10217
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby ccc » 08 Sep 2013, 00:09

wblock@ wrote:Have you enabled FUSE in [file]/etc/rc.conf[/file], or at least loaded the kernel module?


I have already
Code: Select all
fusefs_enable="YES"
in [FILE]/etc/rc.conf[/FILE]and fuse.ko is loaded:

Code: Select all
/root # kldstat
Id Refs Address    Size     Name
 1   26 0xc0400000 c68d94   kernel
 2    1 0xc1069000 8190     snd_via8233.ko
 3    2 0xc1072000 57908    sound.ko
 4    1 0xc5ebb000 8000     linprocfs.ko
 5    1 0xc5ec3000 28000    linux.ko
 6    1 0xc6267000 e000     [HIGHLIGHT]fuse.ko[/HIGHLIGHT]
 7    1 0xc6388000 68000    radeon.ko
 8    1 0xc63f1000 14000    drm.ko
but still it doesn't work.
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby KNOStic » 08 Sep 2013, 23:18

I can help here, I've even written a script for it as well as a [FILE]devd[/FILE] configuration file for all sorts of iDevices to load automagically. But before I do, just ensure that you have [FILE]/usr/local/sbin/usbmuxd[/FILE] loading in your [FILE]rc.local[/FILE] file - that needs to load first, then you need to also have
Code: Select all
fusefs_enable="YES"
in your [FILE]rc.conf[/FILE].

The [FILE]ifuse[/FILE] library wants to run as user rather than root as well as I discovered the hard way when you make those calls, but it is absolutely necessary to have the device unlocked first before you connect it to the USB port. With these measures, it should work for you as it does reliably for me.

If anyone is interested in the [FILE]fruits.conf[/FILE] file that I wrote up to notify a script to run to automount as well as configure the [FILE]ue0[/FILE] Ethernet device within is here:

Code: Select all
#
# $FreeBSD: release/9.1.0/etc/devd/fruits.conf 000044 2013-03-19 07:06:00Z kmcaleavey $
#
# Discover, mount, unmount newer iFruit products. Adds to usb.conf. Requires iphone script from KNOS Project
#

notify 20 {
   match "system" "USB";
   match "subsystem" "DEVICE";
   match "type" "ATTACH";
   match "vendor" "0x05ac";
   match "product" "(0x1290|0x1292|0x1294|0x1297|0x129c|0x12a0|0x12a8|0x1291|0x1293|0x1299|0x129e|0x129a|0x129f|0x12a2|0x12a3|0x12a4|0x12a5|0x12a6|0x12a7|0x12a9|0x12ad)";
   action   "su -m KNOS -c 'bash /var/home/KNOS/iphone'";
};

notify 20 {
   match "system" "USB";
   match "subsystem" "DEVICE";
   match "type" "DETACH";
   match "vendor" "0x05ac";
   match "product" "(0x1290|0x1292|0x1294|0x1297|0x129c|0x12a0|0x12a8|0x1291|0x1293|0x1299|0x129e|0x129a|0x129f|0x12a2|0x12a3|0x12a4|0x12a5|0x12a6|0x12a7|0x12a9|0x12ad)";
   action   ""su -m KNOS -c 'bash /var/home/KNOS/iphone umount'";
};

nomatch 32 {
   match "bus" "uhub[0-9]+";
   match "mode" "host";
   match "vendor" "0x05ac";
   match "product" "0x129c";
   match "intclass" "0xff";
   match "intsubclass" "0xfd";
   match "intprotocol" "0x01";
   action "kldload -n if_ipheth";
};

nomatch 32 {
   match "bus" "uhub[0-9]+";
   match "mode" "host";
   match "vendor" "0x05ac";
   match "product" "0x12a0";
   match "intclass" "0xff";
   match "intsubclass" "0xfd";
   match "intprotocol" "0x01";
   action "kldload -n if_ipheth";
};

nomatch 32 {
   match "bus" "uhub[0-9]+";
   match "mode" "host";
   match "vendor" "0x05ac";
   match "product" "0x12a8";
   match "intclass" "0xff";
   match "intsubclass" "0xfd";
   match "intprotocol" "0x01";
   action "kldload -n if_ipheth";
};

nomatch 32 {
   match "bus" "uhub[0-9]+";
   match "mode" "host";
   match "vendor" "0x05ac";
   match "product" "0x12a2";
   match "intclass" "0xff";
   match "intsubclass" "0xfd";
   match "intprotocol" "0x01";
   action "kldload -n if_ipheth";
};

nomatch 32 {
   match "bus" "uhub[0-9]+";
   match "mode" "host";
   match "vendor" "0x05ac";
   match "product" "0x12a3";
   match "intclass" "0xff";
   match "intsubclass" "0xfd";
   match "intprotocol" "0x01";
   action "kldload -n if_ipheth";
};

nomatch 32 {
   match "bus" "uhub[0-9]+";
   match "mode" "host";
   match "vendor" "0x05ac";
   match "product" "0x12a5";
   match "intclass" "0xff";
   match "intsubclass" "0xfd";
   match "intprotocol" "0x01";
   action "kldload -n if_ipheth";
};

nomatch 32 {
   match "bus" "uhub[0-9]+";
   match "mode" "host";
   match "vendor" "0x05ac";
   match "product" "0x12a6";
   match "intclass" "0xff";
   match "intsubclass" "0xfd";
   match "intprotocol" "0x01";
   action "kldload -n if_ipheth";
};


Simply place this [FILE]fruits.conf[/FILE] into your [FILE]/etc/devd[/FILE] directory and it will control mounting and unmounting automagically for you by calling a script which you will need to write (shown below) for it to call.

PLEASE NOTE: The script called "[FILE]/var/home/KNOS/iphone[/FILE]" above needs to be replaced with YOUR script to do the calls.

My [FILE]iphone[/FILE] script (called by the above) is as follows:

Code: Select all
#!/bin/sh
#
# Copyright (c) Kevin McAleavey 2007, 2009 - 2013
#

DISCONNECT="$1"

if [ "$DISCONNECT" = "umount" ] ; then
umount -f /media/AppleDevice
sleep 5
su -m root -c "rm -fd /media/AppleDevice"
logger "AppleDevice removed ..."
exit 0

else

logger "AppleDevice called here ..."
su -m root -c "mkdir -p /media/AppleDevice"
idevicepair unpair && idevicepair pair && idevicepair validate
   if [ "$?" = "1" ] ; then
zenity --error --title "AppleDevice loader" --text="Device mount FAILED!!!\n\nCheck to be sure that the device is unlocked and turned on.\nPlease unplug it, wait 5 seconds, and try plugging it in again."
   fi
su -m root -c 'chown KNOS /media/AppleDevice'
logger "AppleDevice call done ..."
sleep 2
ifuse /media/AppleDevice
   if [ "$?" = "1" ] ; then
zenity --error --title "AppleDevice loader" --text="Device mount FAILED!!!\n\nCheck to be sure that the device is unlocked and turned on.\nPlease unplug it, wait 5 seconds, and try plugging it in again."
   fi
fi
exit 0


All of this is used in the GNOME desktop on our machines and works magnificently in automounting it since the normal [FILE]gvfs[/FILE] system won't mount it on its own.

Hope this helps! :)
Kevin McAleavey
The KNOS Project
User avatar
KNOStic
Junior Member
 
Posts: 77
Joined: 20 Jun 2010, 07:08
Location: Voorheesville, NY


Return to Peripheral Hardware

Who is online

Users browsing this forum: No registered users and 1 guest