我用的是MIC300的模块,调试信息已经增加了很多了fd:串口ID
if ((sel = select(fd + 1, &rfds, NULL, NULL, NULL)) > 0)
这里半天才读到一条数据
而且android平台下有些函数还不能用,如gets函数。。怪问题很多啊。

解决方案 »

  1.   

    问题解决了
    setenv bootargs mem=128M console=ttyS2,115200n8 noinitrd init=/init android.ril=ttyUSB0 root=/dev/nfs rw nfsroot=192.168.7.77:/opt/omap3530/filesystem
    ip=192.168.7.167:192.168.7.77:192.168.7.1:255.255.255.0:fanjh:eth0:off video=omapfb:mode:4.3inch_LCD关键就是这个  android.ril=ttyUSB0 这样的话android系统会跟我的测试程序抢这个端口。所有读不到数据
    另外还有个地方在ril.c中将
        /* special override when in the emulator */
    #if 1  改为 #if 0
        {
            static char*  arg_overrides[3];
            static char   arg_device[32];
            int           done = 0;