android 电话模块,为mini2440上的android添加电话模块

Modem on the Zoom platform来源:

打算在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:

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: \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”.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值