Enabling additional serial ports in Android (AADK) for ConnectCard for Wi-i.MX28

I tested a CCARDWMX28 with aadk-1.4.0.5 and works fine using the AUART2.
The default images have enabled the AUART2(TTL) and works fine with the SerialConsole app using the node /dev/ttySP2.
 
I’ve configured and rebuilt default android kernel from sources in aadk 1.4:
Here are the ports that are enabled by default:
User-added image
I have enabled AUART4. SSP3 seems to be disabled by default. AUART1 conflicts with LCD so I have not enabled it. With the new kernel both SerialConsole  and SerialPort_1.1.apk work with /dev/ttySP4 – it has DB-9 port so it is very easy to test.
 
If you boot a ccardmx28 with a kernel that supports the AUART4 you have the following rights:
/ # ls -la /dev/ttySP*
crw-rw---- bluetooth bluetooth 242,   0 1970-01-02 00:05 ttySP0
crwxrwxrwx root     root     242,   2 1970-01-02 00:04 ttySP2
crw-------       root     root     242,   4 1970-01-02 00:04 ttySP4
 
 
Then if you modify it to 777:
/ # chmod 777 /dev/ttySP4
/ # ls -la /dev/ttySP*
crw-rw---- bluetooth bluetooth 242,   0 1970-01-02 00:05 ttySP0
crwxrwxrwx root     root     242,   2 1970-01-02 00:04 ttySP2
crwxrwxrwx root     root     242,   4 1970-01-02 00:04 ttySP4
 
 
and start the Serial Console app, you will see both serial ports:
User-added image 
 By default the node /dev/ttySP4 is not included in the list of serial ports permissions.
This process is done in the file ueventd.ccardimx28js.rc:
/dev/ttySP0              0600   bluetooth  bluetooth
/dev/pmem_gpu             0660   system     graphics
/dev/snd/*                0664   system     audio
/dev/ttyUSB*              0640   radio      radio
/dev/ttyACM*              0640   radio      radio
/dev/video0               0660   system     camera
/dev/video16              0660   system     graphics
/dev/mxs_pxp              0666   system     graphics
/dev/mxs_viim             0664   system     media
/dev/fsl_cache            0666   system     graphics
/dev/gsl_kmod             0666   system     graphics
/dev/uinput               0666   system     input
/dev/ttySP1              0775   system     gps
/dev/ttya0                0775   system     gps
/dev/ptya0                0775   system     gps
/dev/ttya1                0775   system     gps
/dev/ptya1                0775   system     gps
/dev/mmcblk               0664   root       root
/dev/spidev*              0777   root       root
/dev/i2c*                 0777   root       root
 
# Serial ports permissions (needed by Java Serial API)
/dev/ttySP1              0777   root       root
/dev/ttySP2              0777   root       root
/dev/ttySP3              0777   root       root
 
# sysfs properties
/sys/devices/virtual/input/input*   name        0660  root   input
/sys/devices/virtual/input/input*   max         0660  root   input
/sys/devices/virtual/input/input*   min         0660  root   input
/sys/devices/virtual/input/input*   poll        0660  root   input
 
# /sys/devices/platform/mxsdhci.2/mmc_host/mmc0/mmc0:000* boot_bus_config 0660 root root
# /sys/devices/platform/mxsdhci.2/mmc_host/mmc0/mmc0:000* boot_config 0660 root root
# /sys/devices/platform/imx-i2c.2/i2c-2/2-0044 mode 0660 system system
# /sys/devices/platform/imx-i2c.2/i2c-2/2-0044 lux 0660 system system
# /sys/devices/platform/imx-i2c.2/i2c-2/2-0044 int_lt_lux 0660 system system
# /sys/devices/platform/imx-i2c.2/i2c-2/2-0044 int_ht_lux 0660 system system
# /sys/devices/platform/imx-i2c.1/i2c-1/1-000e enable     0660 system input
# /sys/devices/platform/mxs-i2c.0/i2c-0/0-000a enable     0660 system input
# /sys/devices/platform/mxc_sdc_fb.0/graphics/fb*       fsl_disp_property 0660 system graphics
# /sys/devices/platform/mxs-fb.0/graphics/fb*   mode 0660 system graphics
# /sys/devices/platform/mxc_sdc_fb.1/graphics/fb*       fsl_disp_property 0660 system graphics
# /sys/devices/platform/mxc_sdc_fb.0/graphics/fb*       mode 0660 system graphics
# /sys/devices/platform/mxc_sdc_fb.1/graphics/fb*       mode 0660 system graphics
# /sys/devices/platform/mxc_dvfs_core.0 enable 0660 system system
# /sys/devices/platform/busfreq.0 enable 0660 system system
 
 
If you add the  node /dev/ttySP4 to this list:
/ # busybox vi ueventd.ccardimx28js.rc
 
[...]
 
# Serial ports permissions (needed by Java Serial API)
/dev/ttySP1              0777   root       root
/dev/ttySP2              0777   root       root
/dev/ttySP3              0777   root       root
/dev/ttySP4              0777   root       root

 

 
And finally reboot your device, in the next boot when you start the Serial Console app you will see the node /dev/ttySP4.
 
Notice that this application save the list of the serial ports, then if you can not see the serial port /dev/ttySP4 you must to stop the app and clear the cache for this application from the settings menu (Settings -> Apps -> Serial Console -> “Force Stop” and “Clear data”.
Last updated: Jan 01, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?