- 论坛徽章:
- 0
|
Modem on the Zoom platform来源:https://omapzoom.org/gf/project/omapandroid/wiki/
打算在mini2440上,运行android拨通电话,找了些参考资料!看过这篇文章后很有启发,不敢独享:
The LDP/Zoom platforms come with an onboard Enfora EDG308 GSM/GPRS/EGPRS modem or an optional 3G modem for the Zoom2.
Data sheets on the Enfora EDG308 module can be found here:
http://www.enfora.com/index.cgi?CONTENT_ID=1834&User:LANGUAGE=en
The Radio Interface Layer (RIL) is
the interface between the modem and the Telephony framework in Android.
The source code of the Enfora EDG308 RIL can be found in the
/hardware/enfora/ directory.
The Android Telephony Framework uses
two channels to talk to the modem – one control channel where AT
commands are exchanged between the RIL and modem and a data channel for
PPP traffic. To accomplish this with the UART based EDG308 modem a 3GPP
27.010 multiplexer (/hardware/ti/omap3/gsm0710muxd) is used.
The 3GPP 27.010 spec can be found here: www.3gpp.org\ftp\Specs\html-info\27010.htm
The OMAP platform supports other
modems as well. The important part is to have the right RIL that
corresponds to the modem and its way of communicating whether it is AT
commands or something else.
To substitute the standard RIL with a
new one find the following lines in /vendor/ti/ldp1/
init.omapldpboard.rc and exchange it with the path to your RIL.
service ril-daemon /system/bin/rild -l /system/lib/libenforaedg308-ril.so -- -d /dev/pts/0
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc
If your modem is not using serial
UART to connect to the OMAP platform, but e.g. USB or SPI you just need
to substitute the tty interface that the 27.010 Multiplexer connects
to. Find the following lines and correct to your needs:
service mux /system/bin/gsm0710muxd -v -s /dev/ttyS0 -b 460800 -n 3 -m advanced
user radio
group radio cache inet misc
oneshot
Be sure to know the baud rate your modem and if it supports 3GPP 27.010 “basic” or “advanced” mode.
If your modem connects to the OMAP
platform with a solution that has inbuilt multiplexing e.g. two USB or
SPI channels, the 3GPP 27.010 multiplexer (gsm0710muxd) is not needed
and you can remove it from the init file. Now you need to ensure that
PPP connects to that second multiplexed device. Find the following
lines and correct the path to the new device:
service pppd_gprs /etc/init.gprs-pppd /dev/pts/1
user root
group radio cache inet misc
disabled
You also need to ensure that the
modem know which channel the PPP data will go trough in this case. For
the Enfora EDG308 Modem a proprietary AT command is used to tell which
channel is the control channel and which is the data channel.
e.g.:
AT%DATA=2,\"UART\",0,2,\"SER\",\"UART\",0,1"
You will need to tell the modem the same thing with an AT command suited for that modem.
One important thing when adding new
modems and tty devices that the 3GPP 27.010 multiplexer or RIL/PPP
connects to… is to give the right permissions to the device. Find the
following lines in the init file:
# change permissions for modem
chmod 0660 /dev/ttyS0
chown radio radio /dev/ttyS0
Now do the same for you new device, e.g. a two channel USB device:
# change permissions for modem
chmod 0660 /dev/ttyUSB0
chown radio radio /dev/ttyUSB0
chmod 0660 /dev/ttyUSB1
chown radio radio /dev/ttyUSB1
If PPP is used it is important to
compile the Linux Kernel with PPP support. Enable this at “Device
Drivers” -> “Networking Support” -> “PPP”.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/64117/showart_2017976.html |
|