谈到与AT向现代android上的命令 [英] Talking to modem with AT commands on android

查看:872
本文介绍了谈到与AT向现代android上的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想谈谈三星Galaxy S2加上与华为P1 XL(U9200)调制解调器发送AT命令,但不能得到任何结果。我使用亚行外壳和查看日志使用logcat的发送命令。

I'm trying to talk to samsung galaxy s2 plus and huawei p1 xl (u9200) modem sending AT commands, but can't get any result. I'm sending commands using adb shell and view logs with logcat.

在三星当我执行猫的/ proc / TTY /驱动器我得到以下内容:

In samsung when i execute cat /proc/tty/drivers i get the following:

/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster

rfcomm               /dev/rfcomm   216 0-255 serial
g_serial             /dev/ttyGS    237 0-3 serial
serial               /dev/ttyS       4 64-67 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console

看起来像我应该发送到的/ dev / ttyGS0 命令,但它不回答。我尝试下面的命令:

Looks like i should send commands to /dev/ttyGS0, but it doesn't reply. I've tried the following commands:

echo "AT\r" > /dev/ttyGS0
echo "ATD12345678900;\r" > /dev/ttyGS0

但没有任何反应。其实,我不知道,我必须将命令发送到该文件,但其他人不回复了。
我读过关于XDA开发者文章,但事实并非如此帮助。

but nothing happens. Actually, i'm not sure that i have to send commands to this file, but others don't reply too. I've read article on XDA-developers, but it didn't help.

随着华为我知道我应该使用哪个文件,但我不能让数据呼叫。我可以做常规语音通话,但我不能执行 AT + CSNS = 4 。只是不工作。我也有LG P765,它是基于一个类似的芯片组和LG我可以使数据呼叫。谁能告诉我,我应该怎么办?

With Huawei i know which file i should use, but i can't make data call. I can make regular voice call, but i can't execute AT+CSNS=4. Just doesn't work. Also i have LG P765, which is based on a similar chipset and on LG i can make data call. Can anyone tell me what should i do?

所有设备都根源于。

推荐答案

我建议大家尽量使用发送AT命令atinout 计划,例如:而不是重定向输出到调制解调器设备运行

I suggest that you try to send AT command using the atinout program, e.g. instead of redirecting output to the modem device run

echo "ATD12345678900;" | atinout - /dev/ttyGS0 -

我猜测,但它可能是在亚行的shell echo命令不跨preT \\ r 作为任何特殊的(那至少说明没有任何响应)。通过使用atinout你guarantied,在命令行得以妥善 \\ r 终止并获取应该是简单,更可靠地工作。

I am guessing, but it could be that the echo command in the adb shell does not interpret \r as anything special (that would at least explain no response whatsoever). By using atinout you are guarantied that AT command lines are properly terminated with \r and capturing should be simpler and work much more reliably.

这篇关于谈到与AT向现代android上的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆