Wondering outloud if anybody has had any success in accessing & utilizing the UARTs/serial ports on the EVK when running Android. I have been working on porting the Android serialPort API (http://code.google.com/p/android-serialport-api/) but running into permissions issues (among others). I am using the prebuilt library and not rebuilding via NDK.
If anyone has success with serial port access - I would appreciate some pointers or a code snippet/sample.
Note that (1) the ~myandroid/device/fsl/imx51_bbg/init.rc is copied to out/target/product/imx51_bbg/root/init.freescale.rc and (2) the ~myandroid/device/fsl/imx5x/init.rc is copied to out/target/product/imx51_bbg/root/init.rc upon Make.
You should modify (1) with your own specific changes. Subsequently you can confirm the changes by noting the init.freescale.rc contents in the out folder after Make.
I loaded Adeneo android 2.3.3version image on imx53quick sort board its working fine . But when i write the data and through the serial port application with /dev/ttymxc0 port it is giving read/write permissions are needed. For that i did temporally by setting chmod 777 /dev/ttymxc0 through minicom its working perfectly . so my quesion is how to set the permissions permanently in Android (In linux we will modify init.rc file) so how should i proceed further , and i changed
1) i.MX53-QSB-Android-Gingerbread-Release4.3/src/device/fsl/imx53_loco/init.rc with chmod 0777 /dev/ttymxc0 .After this i compiled but no success
2)i.MX53-QSB-Android-Gingerbread-Release4.3/src/device/fsl/imx5x/init.rc with chmod 0777 /dev/ttymxc0 . After this i compiled but no success
3)i.MX53-QSB-Android-Gingerbread-Release4.3/src/system/core/rootdir/init.rc with chmod 0777 /dev/ttymxc0 After this i compiled but no success
So i followed above procedures but all fail can any one please give me suggestion how to set the permanent permissions in Android for /dev/ttymxc0
And also can i change the permissions in the Serial port apk through android application development tool ??????????? if that is possible please give me the solution how to do in application development
You may have noticed there are several init.rc file variants in several locations. Some of these are the core and used in the make file to produce the .rc files that are run during boot. Modifying one of these 'make(d)' .rc's will do nothing as they are overwritten on your next make! The root 'user' init.rc file is located in the ~myandroid/device/fsl/imx5XXX/ directory and is copied to init.freescale.rc upon make. So this is the file you need to modify. After the make check the init.freescale.rc in your "out/target/product/....." directory and you will see your modifications carried across and you will have confirmed you have updated the correct file!
How do one change the init.rc ? I have tried opening it in several programs without success, and opening it on the boards Emulated terminal does not work either? Chmod 777 /dev/ttymxc0 works like a charm but as u posted before its only temporary
Mike Petersen said:
Yes. You must chmod 777 /dev/ttymxc0. You can temporarily do this from the console port or permanently in the init.rc file.
I am trying to get the serial-port-api project running on my SABRE Tablet and getting the same read/write permissions error. I am using ttymxc0 and I can successfully write echo "test" > /dev/ttymxc0 via the Debug board, but fail when trying to run the app. Did anyone ever figure out the permissions issue?