Friday, 20 November 2015

Mount iPhone onto Ubuntu

1. Prerequisite - Install ifuse

2. Connect the iPhone  to the computer using USB.

3. Click Allow / Trust on the iPhone when asked to Allow access or Trust the computer.

4. Following command will display the information about all devices connected to the computer through the USB. The information of our interest is the "Serial number".

$usb-devices

T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  4
P:  Vendor=xyz ProdID=xyz Rev=xyz
S:  Manufacturer=Apple Inc.
S:  Product=iPhone
S:  SerialNumber=
C:  #Ifs= 3 Cfg#= 4 Atr=c0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=fe Prot=02 Driver=usbfs
I:  If#= 2 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=fd Prot=01 Driver=iphe

5. Create a directory - mount point for the iPhone.
$mkdir /media/iPhone

6. Now mount the iphone using the following
$sudo ifuse /media/iPhone/ -u -o rw,allow_other

7. All done. List, copy files from iPhone.
$ls /media/iPhone/


Wednesday, 6 May 2015

Turning on Sony Bravia TV from a computer terminal

Sony Bravia TV allows one to wake it up using (WoL) Wake On LAN. Look for settings on your respective models.

$ sudo apt install wakeonlan 

wakeonlan is a script/utility which allows sending magic packets to networked devices which allow WoL.

The IP address can be found from modem admin utility which also shows the mac address for the TV.

Following command will turn the TV on.

$ wakeonlan -i "IP address of the TV" "Mac address of the TV"