This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Beagleboard xM permission of UART

Dear Sir

My target board is beagleboard xM.

Host running Ubuntu 10.04 LTS.

My USB to serial console is FTDI serial cable.

 

I'm using the UART on beagleboard xM following this page.

http://www.gelitek.com/shownews.asp?id=247

My xM can recognize  my serial cable is connect to ttyUSB0.

Everything is fine until it comes to the permission.

I can't find the ueventd.rc.

Can anyone help me to read write the ttyUSB*.

 

Thanks for your kindly help.

 

 

 

  • Please tell us which TI Android DevKit version are you running on the beagle xM?

    In TI Android 2.3.4 DevKit 2.1, you can find ueventd.rc at system/core/rootdir/ueventd.rc and it is copied to out/target/product/beagleboard/root/ueventd.rc when you build android for beagleboard.

  • Dear Sir

    Thanks for very quick reply,

    I'm using

    TI_Android_FroYo_DevKit-V2.2.tar.gz

    I didn't find the system/core/rootdir/ueventd.rc on the floyo.

     

  • I think this package contains only the prebuilt images and not the android sources.

    Please check if the ueventd.rc file is present in the top directory of the rootfs ext3 partition of the sdcard you use on the beagleboard. This is the 2nd partition on the sdcard and would probably be automounted on your host as /media/rootfs

    You can edit this file on your host machine and add your settings.

  • Dear Sir

    http://source.android.com/source/downloading.html

    I've download the floyo source code from the page again ,i still not find the ueventd.rc under the path system/core/rootdir/ .

    But I find the Android2.3 source code got the system/core/rootdir/ueventd.rc .

    So, i copy the ueventd.rc and edit it with add /dev/ttyUSB0 0666 root root.

    I tried put ueventd.rc into the microSD under the path /media/rootfs.

    It does't work.

    So,  i'm re-compiling Android floyo source code with ueventd.rc under the path system/core/rootdir/,

    If anything stupid i done, please remind me.

     

    Thanks for your kindly help.

     

  • I went through the TI Android DevKit sources and it looks like  this version does not support ueventd.rc.

    Please edit the following file to add support for your device:

    system/core/rootdir/init/devices.c

    Please add the required device node and permissions to static struct perms_ devperms[]

  • Dear Sir

    I didn't find /system/code/rootdir/init/

    but I find /system/core/init/devices.c

    So , I modify the devices.c with this

    { "/dev/ttyUSB0",        0666,   AID_ROOT,       AID_ROOT,       0 },

    After compile,

    I test it with uart-loopback

    http://elinux.org/images/b/b7/Uart-loopback.c

    The instruction is : ./uart-loopback /dev/ttyUSB0

    It works on my host linux.

    But it still not works on my xM.

    I find that the user name in xM is USER, not ROOT.

    So i re-modify the devices.c , replace ROOT with USER.

    It causes error that there is  undeclared with USER.

    Did i forget anything?

    I'm keep trying to figure out this issue.

     

    Thanks for kindly helps.

     

     

     

     

     

     

     

  • Dear Sir

    I do the test under the Android2.3 with modify the ueventd.rc as the link.

    and

    echo "111" > /dev/ttyUSB0

    and I can receive the "111" on my host linux without permission warning on xM.

    I will try to test it under Android2.2 later.

    It would like be work.

    Thanks for your great help.

  • You cannot modify the ueventd.rc file directly on the device because it is stored in a RAM file system in the uInitrd file on the boot partition of the SD card. For instructions on how to modify files in this ramdisk, see these instructions: https://wiki.linaro.org/MichaelHope/Sandbox/DebuggingOnInitrd

    Once you extract the files from the ramdisk, you simply need to edit the ueventd.rc file and add this line:

    /dev/ttyUSB0 0666 root root

  • Hi Everyone,

                           We have ported android Froyo on AM1808 processor successfully from sdcard. But my problem is i cant access serial port (read, write) using com port.

    I have downloaded android serial port API (.apk file) from link  http://code.google.com/p/android-serialport-api/downloads/list  . After i installed this .apk file on my android device iam getting force close error.

     i have set permissions too.

    Can you please help me out in this issue. Thanks in advance.

    Regards

    Pooja.