Android ATCID customized AT command

Source: Internet
Author: User

 

 

ATCID is mainly used to process AT commands transmitted from the PC. The AT commands are mainly divided into three categories: 1. AT command to be processed by Modem; 2. AT commands that need to be processed AT the native layer (processed inside atcid and in other modules); 3. the AT command to be processed AT the Java layer. For these three classes, code implementation needs to be added in different places of ATCID. Before introducing how to customize the AT command, you need to understand the ATCID architecture. For example, the area in the red box indicates the ATCID, where: 1. tty is the device file connected to the PC through USB; 2. the main function of the dispatch module is to view the AT command sent from the PC, which of the three AT commands is the AT command; 3. atci_service is used to process AT commands AT the Java layer; 4. rild receives the AT command to be sent to the Modem for processing; 5. handler processes at commands internally processed by atcid (native layer); 6. audio is similar to the AT command sent to other modules for processing. [AT customization] For the above three categories, customization is required in different places: 1. customizes AT commands internally processed by atcid (native layer processing) 1 ). compile a function in atcid_cust_cmd.c to process your AT command; 2 ). enter the strings, command types, and processing functions of your AT command into the custom_cmd_table table, which is in atcid_cust_cmd_process.h; 2. customize AT commands processed by other modules (native layer processing) 1 ). fill in the string of your AT command in the generic_cmd_table table. This table is customized in atcid_cmd_dispatch.h. 2 ). compile a function to process your AT command. Put this function in the appropriate file in the atci_service (native) directory. 3 ). enter the string, command type, and processing function of your AT command into the generic_types_table table. This table is defined in atci_generic_types_table.h. customize the AT command for processing AT the Java Layer 1 ). fill your AT command in the generic_cmd_table table, which is defined in atcid_cmd_dispatch.h 2 ). fill in your AT command and type in the table mmi_cmd_table, which is defined in atci_generic_cmd_table.h 3 ). in atciService. the initlizeAtparser function in java registers your CLASS to process the AT command 4. if you want to customize the AT command for Modem processing, you do not need to perform special processing on the ATCID side, as long as the input AT command does not adapt to the type defined on the ATCID side, the AT Command will be sent to the Modem for processing, so the specific code for customized implementation of the at command function needs to be written on the Modem end

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.