he9103G汇总.docx
- 文档编号:30236021
- 上传时间:2023-08-13
- 格式:DOCX
- 页数:111
- 大小:121.08KB
he9103G汇总.docx
《he9103G汇总.docx》由会员分享,可在线阅读,更多相关《he9103G汇总.docx(111页珍藏版)》请在冰豆网上搜索。
he9103G汇总
frescale的imx6的平台,android4.3系统,内核版本3.0.35,采用he910,USB连接方式,以下是he9103G调试总结:
1.所用芯片厂家提供资料:
解压参考此压缩包文档:
添加流程:
一.内核:
1.makemenuconfig配置如下:
配置驱动:
选择DeviceDrivers
USBsupport
进入USBsupport之后选择cdc-acm支持
接着继续在此目录选择USB转串口
最后选择USBdriverforGSMandCDMAmodems
添加ppp协议
配置驱动
选择网络设备支持
选择ppp所有协议
内核至此配置完成。
2.内核添加usb串口驱动
kernel_imx/drivers/usb/class/cdc-acm.c(注:
不同的芯片可能修改的usb驱动文件不一样,he910此芯片是cdc-acm.c(会在目标板上产生/dev/ttyACM0等节点),其他可能kernel_imx/drivers/usb/serial/option.c(会产生节点为/dev/ttyUSB0,/dev/ttyUSB1等),具体请参考厂家资料)
添加内容如下:
模块接上之后,进入串口查看pidvid
cdsys/bus/usb/devices/2-1
catidProduct
catidVendor
#defineTELIT_VENDOR_ID0x1bc7注:
产品ID
#defineTELIT_PRODUCT_HE910_DUAL0x0021注:
制造商ID
staticconststructusb_device_idacm_ids[]={
/*forTELIT3G*/
{USB_DEVICE(TELIT_VENDOR_ID,TELIT_PRODUCT_HE910_DUAL),
.driver_info=NO_UNION_NORMAL,
},
}
上电时序(直接上电了):
/*3G*/
gpio_request(SABRESD_3G_PWR_ON,"3g_power_en");
gpio_direction_output(SABRESD_3G_PWR_ON,1);
gpio_request(SABRESD_3G_SHUTDOWN,"3g_shutdown");
gpio_direction_output(SABRESD_3G_SHUTDOWN,0);
gpio_request(SABRESD_3G_ON_OFF,"3g_on_off");
gpio_direction_output(SABRESD_3G_ON_OFF,0);
msleep(5000);
gpio_direction_output(SABRESD_3G_ON_OFF,1);
msleep(5000);
gpio_direction_output(SABRESD_3G_ON_OFF,0);
到此内核配置完成。
二.Android层
以下是按照所给资料配置,资料名称如下:
1.Android层添加支持he910代码
\\192.168.5.225\yg_ln\M636\M636_JB4.3_Android\hardware\imx\mx6\3G编译出厂商提供的文件
\\192.168.5.225\yg_ln\M636\M636_JB4.3_Android\hardware\ril编译此目录下厂商提供的ril库
/disk2/Extand1/yg_work/M636/M636_JB4.3_Android/hardware/ril/runtime-ril-port支添加持he910设备
{
.name="TELIT-HE910",
.idVendor="1bc7",
.idProduct="0021",
.deviceport="/dev/ttyACM3",//atcmdport
.dataport="/dev/ttyACM0",//dataport注:
id匹配ok则会在logcat信息中找到”TELIT-HE910”这个名字和相应type
.type=TELIT_MODEM,
},
/disk2/Extand1/yg_work/M636/M636_JB4.3_Android/hardware/ril/include
添加
enum{
HUAWEI_MODEM=0,
AMAZON_MODEM,
ZTE_MODEM,
TELIT_MODEM,//添加一个modern名
UNKNOWN_MODEM,
};
编译完成后具体步骤如下:
Androidbuildrequirements
ForproperinstallingTelitRILdriver,pppdisneeded.ItcanusuallybebuiltduringAndroid
buildingprocess.pppdbinaryinthetargetfilesystemshouldbefoundin/system/bin.
2.4.Copyingtherequiredfiles
ForproperinstallingTelitRILdriverseveralfilesshouldbecopiedinsideAndroiddevice:
Commonsetup
-Copychatin/system/bin
-Copylibreference-ril.soin/system/lib
-Copyip-up-ppp0in/system/etc/ppp
-Copyip-down-ppp0in/system/etc/ppp
Anadditionalsetupisneededforeachspecificdevice:
HEFamily
-Copyoptionsin/system/etc
-Copyhsdpa_connectin/system/etc
-Copyhsdpa_disconnectin/system/etc
2.5.ChangingAndroidconfigurationfiles
ForproperinstallingTelitRILdriversomeconfigurationfilesinsideAndroiddeviceshould
bechanged.
Lookfortheinitfile(usuallynamedinit.rc).Intheonbootsectionadd:
chownradiosystem/system/bin/chat
chownradiosystem/system/etc/options
chownradiosystem/system/etc/ppp/ip-up-ppp0
chownradiosystem/system/etc/ppp/ip-down-ppp0
serviceril-daemon/system/bin/rild
socketrildstream660rootradio
socketrild-debugstream660radiosystem
userroot
groupradiocacheinetmiscaudiovpnnet_admin
chmod0770/system/etc/chat
chmod0770/system/etc/options
chmod0770/system/etc/ppp/ip-up-ppp0
chmod0770/system/etc/ppp/ip-down-ppp0
Intheinitsectionwhereservicesaredefinedadd:
servicepppd/system/bin/pppdfile/etc/options
classmain
userroot
groupshellradio
oneshot
disabled
HEFamily
-Addthefollowinglinesintheinitfile(usuallyinit.rc),intheonboot
section:
chownradiosystem/dev/ttyACM0
chownradiosystem/dev/ttyACM3
chmod0770/system/etc/hsdpa_connect
chmod0770/system/etc/hsdpa_disconnect
chownradiosystem/system/etc/hsdpa_connect
chownradiosystem/system/etc/hsdpa_disconnect
-Addthefollowingpropertiestothesystem(usuallyindefault.prop):
rild.libpath=/system/lib/libreference-ril.so
rild.libargs=-d/dev/ttyACM0
2.6.ChangingAndroidframeworkfiles
ForproperworkingoftheTelitRILdrivertheinitAndroidapplicationshouldbechanged.
Openthefilesystem/core/init/property_service.c.
Lookforcheck_control_permsfunctionandreplace
if(uid==AID_SYSTEM||uid==AID_ROOT)
with
if(uid==AID_SYSTEM||uid==AID_ROOT||uid==AID_RADIO).
Openthefilesystem/core/init/init.c.
Lookforservice_stop_or_resetfunctionandreplace
kill(-svc->pid,SIGKILL);
with
if(svc->name!
=NULL){
if(strstr(svc->name,“pppd”)!
=NULL)
kill(-svc->pid,SIGTERM);
else
kill(-svc->pid,SIGKILL);
}else
kill(-svc->pid,SIGKILL);
至此Android配置完成。
总结:
1.内核识别到USB设备
2.Android层通过内核层两个ID匹配实现data(传输数据)和cmd(AT命令)通讯
常用AT命令:
cat/dev/ttyACM3&
echo–en"ATE0\r">/dev/ttyACM3关闭回显。
程序初始化AT部分首先关闭回显。
echo–en"AT\r">/dev/ttyACM3(正常应该返回一个OK)
echo–en"AT+CGSN\r">/dev/ttyACM3(备注:
得到序列号(IMEI))
echo-en"AT+CIMI\r">/dev/ttyACM3(备注:
得到手机IMSI号码)
echo-en"AT+CNUM\r">/dev/ttyACM3(备注:
用户号码)
echo-en"AT+CREG?
\r">/dev/ttyACM3(备注:
查网络注册语音打电话)
echo-en"AT+CSQ\r">/dev/ttyACM3(备注:
查当前信号)
echo-en"ATD667\r">/dev/ttyACM3(备注:
打电话)
echo-en"ATA\r">/dev/ttyACM3(备注:
接听电话电话)
echo-en"AT+CGREG?
\r">/dev/ttyACM3(备注:
查网络注册上网)
Logcat信息:
Kernel:
串口输入命令:
dmesg
显示如下:
root@M636:
/#
U-Boot2009.08-dirty(Sep102014-15:
45:
11)
CPU:
Freescalei.MX6familyTO1.2at792MHz
Thermalsensorwithratio=176
Temperature:
29C,calibrationdata0x55b4ca69
mx6qpll1:
792MHz
mx6qpll2:
528MHz
mx6qpll3:
480MHz
mx6qpll8:
50MHz
ipgclock:
66000000Hz
ipgperclock:
66000000Hz
uartclock:
80000000Hz
cspiclock:
60000000Hz
ahbclock:
132000000Hz
axiclock:
264000000Hz
emi_slowclock:
132000000Hz
ddrclock:
528000000Hz
usdhc1clock:
198000000Hz
usdhc2clock:
198000000Hz
usdhc3clock:
198000000Hz
usdhc4clock:
198000000Hz
nfcclock:
24000000Hz
Board:
i.MX6Q-SABRESD:
unknown-boardBoard:
0x63012[POR]
BootDevice:
MMC
I2C:
ready
DRAM:
1GB
pad6_gpio_init
MMC:
FSL_USDHC:
0,FSL_USDHC:
1,FSL_USDHC:
2,FSL_USDHC:
3
initializeenvironment...
***Warning-badCRCorMMC,usingdefaultenvironment
In:
serial
Out:
serial
Err:
serial
pad6_work
m13088_init
detect13088[4,1]
m13088checksum....
m13088checksumok
Net:
gotMACaddressfromIIM:
00:
00:
00:
00:
00:
00
FEC0[PRIME]
Hitanykeytostopautoboot:
0
kernel@10008000(4656140)
ramdisk@11000000(234907)
kernelcmdline:
useubootcommandline:
console=ttymxc3,115200init=/initvideo=mxcfb0:
dev=ldb,LDB-WVGA,bpp=32video=mxcfb1:
offvideo=mxcfb2:
offfbmem=10Mfb0base=0x27b00000vmalloc=400Mandroidboot.console=ttymxc3androidboot.hardware=freescale
Startingkernel...
Initializingcgroupsubsyscpu
Linuxversion3.0.35-gaaafd08-dirty(yg@tianfeng-Honmax-Server)(gccversion4.6.x-google20120106(prerelease)(GCC))#128SMPPREEMPTWedOct815:
34:
20CST2014
CPU:
ARMv7Processor[412fc09a]revision10(ARMv7),cr=10c53c7d
CPU:
VIPTnonaliasingdatacache,VIPTaliasinginstructioncache
Machine:
Freescalei.MX6Quad/DualLite/SoloSabre-SDBoard
Ignoringunrecognisedtag0x54410008
Memorypolicy:
ECCdisabled,Datacachewritealloc
CPUidentifiedasi.MX6Q,siliconrev1.2
PERCPU:
Embedded7pages/cpu@c1843000s6592r8192d13888u32768
Built1zonelistsinZoneorder,mobilitygroupingon.Totalpages:
208128
Kernelcommandline:
console=ttymxc3,115200init=/initvideo=mxcfb0:
dev=ldb,LDB-WVGA,bpp=32video=mxcfb1:
offvideo=mxcfb2:
offfbmem=10Mfb0base=0x27b00000vmalloc=400Mandroidboot.console=ttymxc3androidboot.hardware=freescale
PIDhashtableentries:
2048(order:
1,8192bytes)
Dentrycachehashtableentries:
65536(order:
6,262144bytes)
Inode-cachehashtableentries:
32768(order:
5,131072bytes)
Memory:
379MB378MB64MB=821MBtotal
Memory:
820916k/820916kavailable,227660kreserved,441344Khighmem
Virtualkernelmemorylayout:
vector:
0xffff0000-0xffff1000(4kB)
fixmap:
0xfff00000-0xfffe0000(896kB)
DMA:
0xfbe00000-0xffe00000(64MB)
vmalloc:
0xd9800000-0xf2000000(392MB)
lowmem:
0xc0000000-0xd9000000(400MB)
pkmap:
0xbfe00000-0xc0000000(2MB)
modules:
0xbf000000-0xbfe00000(14MB)
.init:
0xc0008000-0xc0045000(244kB)
.text:
0xc0045000-0xc0880688(8430kB)
.data:
0xc0882000-0xc0917030(597kB)
.bss:
0xc0917054-0xc0a9cc80(1560kB)
PreemptiblehierarchicalRCUimplementation.
NR_IRQS:
624
MXCGPIOhardware
sched_clock:
32bitsat3000kHz,resolution333ns,wrapsevery1431655ms
arm_max_freq=1GHz
MXC_EarlyserialconsoleatMMIO0x21f0000(options'115200')
bootconsole[ttymxc3]enabled
Calibratingdelayloop...1581.05BogoMIPS(lpj=7905280)
pid_max:
default:
32768minimum:
301
Mount-cachehashtableentries:
512
Initializingcgroupsubsysdebug
Initializingcgroupsubsyscpuacct
Initializingcgroupsubsysfreezer
CPU:
Testingwritebuffercoherency:
ok
hwperfevents:
enabledwithARMv7Cortex-A9PMUdriver,7countersavailable
CPU1:
Bootedsecondaryprocessor
Broughtup2CPUs
SMP:
Totalof2processorsactivated(3162.11BogoMIPS).
print_constraints:
dummy:
NET:
Registeredprotocolfamily16
print_constraints:
vddpu:
725<-->1300mVat700mVfastnormal
print_constraints:
vddcore:
725<-->1300mVat1150mVfastnormal
print_constraints:
vddsoc:
725<-->1300mVat1200mVfastnormal
print_constraints:
vdd2p5:
2000<-->2775mVat2400mVfastnormal
print_constraints:
vdd1p1:
800<-->1400mVat1100mVfastnormal
print_constraints:
vdd3p0:
2625<-->3400mVat3000mVfastnormal
wl12xxirq_num=380
uart5isadded
wl12xx_set_platform_dataplatform_data->irq=380
ram_console:
gotbufferat3ff00000,size100000
ram_console:
uncorrectableerrorinheader
ram_console:
novaliddatainbuffer(sig=0xfff2f7ee)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- he9103G 汇总