UART2 in Android 6 BPI-M64

(Milad) #1

I want to use UART 2 of my M64 board in Android. I connect to android with ADB. I can see and use UART0 and UART1 in adb by tty0 and tty1(Debug and Bluetooth) in Dev folder but i cannot see tty2 and tty3 andas a result i cannot use UART2. is it any solution to solve this and use tty2 in adb?

(G San) #2

modify sys_config.fex , delete gpio setting which uart2 used. default setting is wrong.

(Milad) #3

Thanks for your answer, but I don’t see any changes on the operation of bpi-m64 after modifying sys-config.fex. I do the steps as bellow:

-using imgRePacker (runner.bat) I drag and drop “BPI-M64_Android_HDMI_V2.img” file and after that it asks for an option and i press enter leaving it blank

-after unpacking the img file i open sys_config.fex and delete every lines of gpio setting for PB0 and PB1 and every other suspicious pin and also for being sure i set gpio_used to 0. then i set uart2_used to 1 and then I save the file

  • using imgRePacker i drag and drop the unpacked folder and leaving the options blanck i press enter and get the img file in the same folder

-using phonix suit i burn the img to my bpi-m64

-with adb i connect to my board

-in dev folder there are no file named ttyS2(there are just two as ttyS0 and ttyS1)

-using this command (echo 1 > /sys/class/gpio_sw/PB0/data) my gpio still turns on and off and i can still blink a LED

-there are no uart2 and still gpio exists

how could I fix this?

(BPI_Justin) #4

HI: First you can run command and try again.

Trun on LED.

$ adb remount

$ adb shell setenforce 0

(G San) #5

bpim64 androud image default gpio setting is input ,so you cannot control the led turn of/off, you should modify the sys_config.fex by compile the android source code or use dragonface software to modify image and reburn your system.

such as gpio_pin_8 = port:PD3<1><0> for input

gpio_pin_8 = port:PD3<1><1> for output