commit 6a2847f7ab introduced basic
detection of HP HS2330 based on OEM Ericsson F3607gw modems.
Because some (or all?) HS2330 modems contain flawed text identifiers
containing strange (probably erroneous) binary sequences in place of
the ASCII space '\x20' character, the previous commit is incomplete.
The following logic detects the modem properly, by comparing binary
data as well as ASCII text values.
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>
This adds three more extra configuration options for IFX specific
hardware setups. They are OFONO_IFX_MODEL, OFONO_IFX_AUDIO and also
OFONO_IFX_LOOPBACK.
An example usage would be like this:
ENV{OFONO_IFX_MODEL}="XMM6260", ENV{OFONO_IFX_AUDIO}="FULL_DUPLEX"
The actual supported values are not defined by the IFX modem
detection code. This is up to the modem plugin to change behavior
if needed.
The IFX modem plugin uses a kernel based multiplexer. And to support
different line discipline numbers on different target platforms, allow
them to be specified as option:
KERNEL=="ttyIFX[0-9]*", ENV{OFONO_DRIVER}="ifx", ENV{OFONO_IFX_LDISC}="23"
The extra OFONO_IFX_LDISC option specifies to use line discipline 23
for the multiplexer setup. The number is just an example here and the
correct one will be different.
The IFX device detection is pretty static, but instead of using
a static configuration file it is important to know when the device
node is actually present. For this udev is perfect. Adding a simple
udev rule is all that it takes:
KERNEL=="ttyIFX[0-9]*", ENV{OFONO_DRIVER}="ifx"
With this rule for every TTY with the kernel name like ttyIFX0, a new
modem will be added and the IFX modem plugin driver requested for it.
Huawei EM770W is a 3G WCDMA modem that supports HSPA/UMTS/EDGE/GPRS/GSM
data service and WCDMA/GSM short message services. It also has voice
call capability that supports both 2G and 3G network.
Sometimes, Udev device 'remove' event could not report correct parent
node of current udev_device. Current code replies on the devpath
attached on the parent node to find modem and then remove it.
This fix is to change the way to store the devpath info into a
hashtable. So that we search hashtable to get devpath and remove the
modem.