File: README.devel

package info (click to toggle)
usbmuxd 1.0.7-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 512 kB
  • sloc: ansic: 3,818; python: 320; makefile: 25; sh: 17
file content (50 lines) | stat: -rw-r--r-- 1,487 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Background
==========

'libusbmuxd' makes it really simple to talk to a running 'usbmuxd' and
hides all the details for you.  There are two function calls:

usbmuxd_scan()
--------------

This returns a list of all available iPhone-like devices that are
available for talking to.  The returned array contains the USB
product_id, hex formatted serial_number of any iPhones/iTouches and a
non-descript 'handle' for all those devices that are within range (as
of March 2009, that means a device directly plugged into the
computer's USB port).

Once you have found the device you want to communicate with, take its
'handle' and pass this to usbmuxd_connect().

usbmuxd_connect()
-----------------

This takes a handle, a destination port number and tries to setup
a proxy a connection.  It returns a file-descriptor which you should
be able to read(), write() and select() on like any other active network
socket connection.


Technical details
=================

When usbmuxd is running (normally started, or stopped as a result of
'udev' auto-insertion messages), it provides a socket interface in
'/var/run/usbmuxd' that is designed to be compatible with the socket
interface that is provided on MacOSX.

The structures for communicating over this device are documented
in the 'usbmuxd-proto.h', but you shouldn't need to view them 
directly if you are using the libusbmuxd.so library for easy access.


Example
=======

#include <usbmuxd.h>

...

gcc -o leetphone leetphone.c -lusbmuxd