[Pin to top] porting Android ril-6410 Development Board SIM300 Module

Source: Internet
Author: User

++ ++

This article is original on this site. You are welcome to repost it! Reprinted please indicate the source:

Http://blog.csdn.net/mr_raptor/article/details/6598891

++ ++

 

Environment Introduction:

1. ubuntu 10.10, used as the Android compiling environment, and used NFS to mount the 6410 Development Board as the root file system.

2. android uses friendly source code. /build-android command compiled and used. /genrootfs. run the sh command to generate rootfs in the main directory of the main source code, and delete the installation package under data/app (you can also delete the installation package without deleting it)

3. copy the file system in rootfs to the NFS mount directory. My NFS directory is/work/nfs_root. Install and enable NFS and run the exportfs command to test whether NFS is shared.

4. Modify the kernel startup parameter in uboot:

Setenv bootargs noinitrd init =/linuxrc root =/dev/nfs nfsroot = 192.168.11.11:/work/nfs_root ip = 192.168.11.13: 192.168.11.11: 192.168.11.1: 255.255.255.0: 255.: eth0: off console = ttySAC0, 115200

The Development Board uses the 192.168.11.13 address and the NFS host uses the 192.168.11.11 address. Note: each time the Development Board restarts, you must reset the IP address Because ubuntu automatically updates the IP address.

 

1. We recommend that you first understand the ril framework before migrating RIL, and recommend the following article: http://blog.sina.com.cn/s/blog_682793a50100jeo5.html

 

2. The main modification is the hardware/ril/reference-ril/reference-ril.c file other files basically do not need to be modified, because gooooogle has encapsulated the framework.

Modify row 2043 in the mainLoop function:

If (fd> = 0 &&! Memcmp (s_device_path, "/dev/ttyS", 9 )){
/* Disable echo on serial ports */
Struct termios ios;
Tcgetattr (fd, & ios );
Ios. c_lflag = 0;/* disable ECHO, ICANON, etc ...*/
Tcsetattr (fd, TCSANOW, & ios );
}

After modification:

If (fd> = 0 &&! Memcmp (s_device_path, "/dev/s3c2410_serial1", 20 )){
/* Disable echo on serial ports */
Struct termios ios;

Bzero (& ios, sizeof (ios ));
Tcgetattr (fd, & ios );

Ios. c_iflag | =

Ios. c_cflag | = CLOCAL | CREAD | CS8; // used for local connection and receiving enable data bit length

Ios. c_iflag | = IGNPAR;

Cfsetispeed (& ios, B115200); // you can specify the baud rate.

Cfsetospeed (& ios, B115200 );

Ios. c_lflag = 0;/* disable ECHO, ICANON, etc ...*/

Tcflush (fd, TCIFLUSH );
Tcsetattr (fd, TCSANOW, & ios );
}

3. Modify the AT command in the initializeCallback function. (We recommend that you refer to the commands provided by google and the AT command reference documents provided by the SIM300 module)

 

After the modification, re-compile the Android source code, the new libreference-ril.so copy to the NFS root directory, restart the Development Board can call, answer the phone, about SMS and GPRS next article introduction.

 

Extended: if the source code provided by FriendlyArm is used, you cannot see the phone signal icon and battery icon in the status bar. This is because FriendlyArm has commented it out, set frameworks/base/packages/systemui/src/com/android/systemui/statusbar/StatusBarPolicy. supports annotations in java files.

++ ++

This article is original on this site. You are welcome to repost it! Reprinted please indicate the source:

Http://blog.csdn.net/mr_raptor/article/details/6598891

++ ++

 

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.