Linux provides device drivers that can talk to the modem interface
on phones. This driver is named acm
and is usually
autodetected and used.
Linux also provides device drivers for USB to serial converters. There is a builtin database of which vendor and product ids are applicable. Since there is a wide variety of converter chips, there is also a wide variety of drivers.
BitPim can access USB devices directly. This is done using
libusb
which accesses the usb filesystem. You
need to ensure the filesystem (usbdevfs) is mounted, usually
below /proc/bus/usb
.
By default Linux configures USB devices so that they are owned by
root. You should be running BitPim as yourself, not root. Most recent
Linux distributions use hotplug, and these instructions show you
how to configure it.
Edit /etc/hotplug/usb.usermap
Add a line to the bottom.
usbcell 0x0003 VID PID 0 0 0 0 0 0 0 0 0
You need to replace VID and PID with the relevant vendor and product ids. The VID and PID can also be obtained from the Comm Port Settings dialog.
Note For more recent versions of hotplug, it is considered better form
to create the file /etc/hotplug/usb/usbcell.usermap
.
Create /etc/hotplug/usb/usbcell
This script is executed whenever the device is inserted. Here
is a simple example that makes the device be owned by root, group owned by
cellusers
and readable/writable by root and the members of cellusers
.
#!/bin/bash if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ] then chown root "${DEVICE}" chgrp cellusers "${DEVICE}" chmod 660 "${DEVICE}" fi
You can adjust that script as you see fit. Don't forget to make it executable. On many versions of Linux, there is a script named usbcam
in the same directory that changes the device to be owned by the same person who is logged into the console. If you prefer that behavior, then copy usbcam
to usbcell
Recent Linux distributions (based on 2.6 kernel) may use "udev" instead of hotplug. With udev, the usb device ownership and permission can be set by a method that is similar in concept, but different in implementation. The following will work on Fedora Core 5. A similar procedure should work on other distributions that use udev.
As done with the hotplug method above, create a cellusers
group and put the users that will use BitPim in that group.
Create /etc/udev/rules.d/60-cell.rules
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="cell_rules_end" # LG Phone SYSFS{idVendor}=="1004", SYSFS{idProduct}=="6000", GROUP="cellusers", MODE="0660" LABEL="cell_rules_end"
1004 and 6000 should of course be replaced with the relevant VID and PID. (For the Sanyo SCP-3100 the VID/PID is 0474/071f).
If you have a single user machine, you may find it easier to use a
mode of 0666 and leave off the GROUP
item.
BitPim can now auto-detect known USB devices (cell phones with USB cables) being connected to the computer (it is not aware if a device is disconnected from the computer). This feature is only available on systems runing udev
version 095 or later (udevinfo -V
) when BitPim is installed.
In order to take advantage of this feature, make sure that the followings are in place:
/etc/udev/rules.d/60-bitpim.rules
exists.
/usr/bin/bpudev
exists.
cellusers
exists and you belong to that group.
When a known device is connected, this feature sets the the device group to cellusers
, permission to 0664
, and initiates the BitPim phone detection process. The end result is that BitPim will be able to:
BitPim Online Help built 17 January 2010