当前位置:首页 » 安卓系统 » android发送at指令

android发送at指令

发布时间: 2024-10-18 13:14:18

1. AT+CREG和AT+CGREG的区别

AT+CREG用于查询网络注册状态。AT+CGREG用于查询GPRS网络注册状态。


AT 即Attention,AT指令集是从终端设备(Terminal Equipment,TE)或数据终端设备(Data Terminal Equipment,DTE)向终端适配器(Terminal Adapter, TA)或数据电路终端设备(Data Circuit Terminal Equipment,DCE)发送的。通过TA,TE发送AT指令来控制移动台(Mobile Station,MS)的功能,与GSM 网络业务进行交互。


用户可以通过AT指令进行呼叫、短信、电话本、数据业务、传真等方面的控制。90年代初,AT指令仅被用于Modem操作。没有控制移动电话文本消息的先例,只开发了一种叫SMS BlockMode的协议,通过终端设备(TE)或电脑来完全控制 SMS。几年后,主要的移动电话生产厂商诺基亚、爱立信、摩托罗拉和HP共同为GSM 研制了一整套AT指令,其中就包括对SMS的控制。


AT指令在此基础上演化并被加入GSM 07.05标准以及现在的GSM07.07标准,完全标准化和比较健全的标准。如:对SMS的控制共有3种实现途径:最初的Block Mode;基于AT指令的Text Mode;基于AT指令的PDU Mode。


到现在PDU Mode已经取代BlockMode,后者逐渐淡出。GSM 模块与计算机之间的通信协议是一些AT指令集,AT指令是以AT作首,字符结束的字符串,AT指令的响应数据包在 中。每个指令执行成功与否都有相应的返回。其他的一些非预期的信息(如有人拨号进来、线路无信号等),模块将有对应的一些信息提示,接收端可做相应的处理。

2. Android 发送AT指令

1、hardware\ril\reference-ril\Reference-ril.c 中 onRequest() 处理RIL_REQUEST_DIAL 时会 调用requestDial();
2、requestDial()中转换RIL_REQUEST_DIAL 请求为AT指令;
3、通过at_send_command()下发;
4、经过at_send_command_full,at_send_command_full_nolock ,writeline()写到设备中。

3. apktool 回编 报错: brut.common.BrutException:could not exec (exit code = 1) 请各位大神帮忙 谢谢!

apktool解包后确实存在打包回不去的问题,这种情况下即使解包后什么都不做直接回编也失败,问题出在apk包上,可能做了反编译的处理,使jar包结构发生改变,这种情况下就无法对该apk进行反编译和回编的处理了。

汇编时出现:

F:apktool>apktool b Hello Hello.apk

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN

otExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.apktool.Main.cmdBuild(Unknown Source)

at brut.apktool.Main.main(Unknown Source)

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(Unknown Source)

经验证是,反汇编时没有生成apktool.yml

进行反汇编时,改用命令apktool d -r xx.apk xx便可以解决(加上了-r选项)。

(3)android发送at指令扩展阅读:

汇编执行指令经汇编程序翻译为机器指令,二者之间基本上保持一一对应的关系。汇编伪指令又称作汇编指示,用于向汇编程序提供用户自定义的符号、数据的类型、数据空间的长度,以及目标程序的格式、存放位置等提示性信息,其作用是指示汇编程序如何进行汇编。使用汇编语言编写的源代码,需要通过使用相应的汇编程序将它们转换成可执行的机器代码。这一过程被称为汇编过程。

许多汇编程序可以识别代表地址和常量的标签(label)和符号(symbols),这样就可以用字符来代表操作数而无需采取写死的方式。普遍地说,特定的汇编语言和特定的机器语言指令集是一一对应的。

许多汇编程序为程序开发、汇编控制、辅助调试提供了额外的支持机制。有的汇编语言编程工具经常会提供宏,它们也被称为宏汇编器。

4. android 怎么通过蓝牙向一个硬件发送AT指令

将16进制的字符串转换成bytes,通过hexstring2bytes转换,从而发送指令。

5. android kernel和标准linux kernel的区别

android kernel和标准linux kernel的区别

android kernel和标准linux kernel的区别
总的区别可以归纳如下:
ARCH -- 这是Android修改了arch/arm下面的一些档案:
arch/arm:
Chg: arch/arm/kernel/entry-armv.S
Chg: arch/arm/kernel/mole.c
Chg: arch/arm/kernel/process.c
Chg: arch/arm/kernel/ptrace.c
Chg: arch/arm/kernel/setup.c
Chg: arch/arm/kernel/signal.c
Chg: arch/arm/kernel/traps.c
Chg: arch/arm/mm/cache-v6.S
Chg: arch/arm/vfp/entry.S
Chg: arch/arm/vfp/vfp.h
Chg: arch/arm/vfp/vfphw.S
Chg: arch/arm/vfp/vfpmole.c
Goldfish -- 这是Android为了模拟器所开发的一个虚拟硬体平台。Goldfish执行arm926T指令(在2.6.29中,goldfish也支援ATMv7指令),但是在实际的装置中,该虚拟平台的档案不会被编译。
arch/arm/mach-goldfish:
New: arch/arm/mach-goldfish/audio.c
New: arch/arm/mach-goldfish/board-goldfish.c
New: arch/arm/mach-goldfish/pdev_bus.c
New: arch/arm/mach-goldfish/pm.c
New: arch/arm/mach-goldfish/switch.c
New: arch/arm/mach-goldfish/timer.c
YAFFS2 -- 和PC把档案储存在硬盘上不一样, 移动装置一般把Flash作为储存装数模链置。尤其是NAND flash应用非常广泛(绝大多数手机用的都是NAND flash,三星的一些手机使用的是OneNAND)。NAND flash具有低成码带本和高密度的优点。
YAFFS2 是“Yet Another Flash File System, 2nd edition" 的简称。 它提供在Linux核心和NAND flash装置 之前高效率的接口。 YAFFS2并没薯孙有包含在标准的Linux核心中, Google把它新增到了Android的kernel
fs/yaffs2:
New: fs/yaffs2/devextras.h
New: fs/yaffs2/Kconfig
New: fs/yaffs2/Makefile
New: fs/yaffs2/moleconfig.h
New: fs/yaffs2/yaffs_checkptrw.c
New: fs/yaffs2/yaffs_checkptrw.h
New: fs/yaffs2/yaffs_e.c
New: fs/yaffs2/yaffs_e.h
New: fs/yaffs2/yaffs_fs.c
New: fs/yaffs2/yaffs_getblockinfo.h
New: fs/yaffs2/yaffs_guts.c
New: fs/yaffs2/yaffs_guts.h
New: fs/yaffs2/yaffsinterface.h
New: fs/yaffs2/yaffs_mtdif1.c
New: fs/yaffs2/yaffs_mtdif1.h
New: fs/yaffs2/yaffs_mtdif2.c
New: fs/yaffs2/yaffs_mtdif2.h
New: fs/yaffs2/yaffs_mtdif.c
New: fs/yaffs2/yaffs_mtdif.h
New: fs/yaffs2/yaffs_nand.c
New: fs/yaffs2/yaffs_nandemul2k.h
New: fs/yaffs2/yaffs_nand.h
New: fs/yaffs2/yaffs_packedtags1.c
New: fs/yaffs2/yaffs_packedtags1.h
New: fs/yaffs2/yaffs_packedtags2.c
New: fs/yaffs2/yaffs_packedtags2.h
New: fs/yaffs2/yaffs_qsort.c
New: fs/yaffs2/yaffs_qsort.h
New: fs/yaffs2/yaffs_tagspat.c
New: fs/yaffs2/yaffs_tagspat.h
New: fs/yaffs2/yaffs_tagsvalidity.c
New: fs/yaffs2/yaffs_tagsvalidity.h
New: fs/yaffs2/yportenv.h
Bluetooth -- Google为Bluetooth打上了patch,fix了一些Bluetooth的bug
drivers/bluetooth:
Chg: drivers/bluetooth/bfu *** .c
Chg: drivers/bluetooth/bt3c_cs.c
Chg: drivers/bluetooth/btu *** .c
Chg: drivers/bluetooth/hci_h4.c
Chg: drivers/bluetooth/hci_ll.c
Scheler -- 对于Scheler的改变非常小,我对它并没有去研究。
Chg: kernel/sched.c

New Android Functionality -- 除了fix一些bug以及其他一些小的更改,Android增加了一些新的功能,介绍如下:
IPC Binder -- The IPC Binder is an Inter-Process Communication (IPC) mechani *** . It allows processes to provide services to other processes via a set of higher-level APIs than are available in standard Linux. An Inter search indicated that the Binder concept originated at Be, Inc., and then made its way into Palm's sofare, before Google wrote a new Binder for Android.
New: drivers/staging/android/binder.c
Low Memory Killer -- Android adds a low-memory killer that, each time it's called, scans the list of running Linux processes, and kills one. It was not clear in our cursory examination why Android adds a low-memory killer on of the already existing one in the standard Linux kernel.
New: drivers/staging/android/lowmemorykiller.c
Ashmem -- Ashmem is an Anonymous SHared MEMory system that adds interfaces so processes can share named blocks of memory. As an example, the system could use Ashmem to store icons, which multiple processes could then aess when drawing their UI. The advantage of Ashmem over traditional Linux shared memory is that it provides a means for the kernel to reclaim these shared memory blocks if they are not currently in use. If a process then tries to aess a shared memory block the kernel has freed, it will receive an error, and will then need to reallocate the block and reload the data.
New: mm/ashmem.c
RAM Console and Log Device -- To aid in debugging, Android adds the ability to store kernel log messages to a RAM buffer. Additionally, Android adds a separate logging mole so that user processes can read and write user log messages.
New: drivers/staging/android/ram_console.c
Android Debug Bridge -- Debugging embedded devices can best be described as challenging. To make debugging easier, Google created the Android Debug Bridge (ADB), which is a protocol that runs over a USB link beeen a hardware device running Android and a developer writing applications on a desk PC.
drivers/u *** /gadget:
New: drivers/u *** /gadget/android.c
Chg: drivers/u *** /gadget/posite.c
Chg: drivers/u *** /gadget/f_acm.c
New: drivers/u *** /gadget/f_acm.h
New: drivers/u *** /gadget/f_adb.c
New: drivers/u *** /gadget/f_adb.h
New: drivers/u *** /gadget/f_mass_storage.c
New: drivers/u *** /gadget/f_mass_storage.h
Android also adds a new real-time clock, switch support, and timed GPIO support. We list the impacted files for these new moles at the end of this document.
Power Management -- Power management is one of the most difficult pieces to get right in mobile devices, so we split it out into a group separate from the other pieces. It's interesting to note that Google added a new power management system to Linux, rather than reuse what already existed. We list the impacted files at the end of this document.
kernel/power:
New: kernel/power/consoleearlysuspend.c
New: kernel/power/earlysuspend.c
New: kernel/power/fbearlysuspend.c
Chg: kernel/power/main.c
Chg: kernel/power/power.h
Chg: kernel/power/process.c
New: kernel/power/userwakelock.c
New: kernel/power/wakelock.c
Miscellaneous Changes -- In addition to the above, we found a number of changes that could best be described as, 'Miscellaneous.' Among other things, these changes include additional debugging support, keypad light controls, and management of TCP neorking.
(freedom_asic)

Android kernel是从linux kernel 修改过来的,大部分的核心没什么变化。Android厂商会定制原始码修改驱动 或者增加新的特性等。

6. 如何获取当前使用的网络运营商

您好,我来为您解答:
发送at指令获得网络状态
这条指令用来检查无线通信模块是否已经登上网络。如果使用的是中国移动的SIM卡,已登录网络返回值应该是+COPS: 0,0,“China Mobile”,尚未登陆网络的返回值为+COPS:0。
希望我的回答对你有帮助。

热点内容
手机如何从安卓10升级安卓11 发布:2024-11-24 03:01:40 浏览:852
phpmvc开发框架 发布:2024-11-24 02:57:44 浏览:944
编程脑子疼 发布:2024-11-24 02:31:23 浏览:169
c语言状态机 发布:2024-11-24 02:26:56 浏览:281
用友加密狗破解 发布:2024-11-24 02:23:16 浏览:707
鸿蒙系统如何变回安卓桌面 发布:2024-11-24 02:18:26 浏览:412
c语言填充 发布:2024-11-24 02:10:48 浏览:822
命名空间存储 发布:2024-11-24 02:10:45 浏览:472
java重载与重写 发布:2024-11-24 01:59:05 浏览:699
通缉令2ftp 发布:2024-11-24 01:59:04 浏览:295