How to use serial

Hi, I would like to inquire how to use the serial port using ubuntu os? I’ve looked at the rpi equivalent steps, but can’t see how it applies on the bpi

Best Regrads

pheonixfire

you can see here:

http://wiki.banana-pi.org/Getting_Started_with_M2M

how do I use it for serial device directly?
e.g. serial gps module

the link provided doesn’t explain this

Best Regards
Pheonixfire

yes, you can use serial device.

please check which serial are you connect ,and maybe you need edit code .

how?

I require you to provide more information on how to achieve this

Currently I’m not being told whether I need to do any special configuration to use the
serial line for anything other then console

Best Regards
Pheonixfire

http://wiki.banana-pi.org/Banana_Pi_BPI-M2M#Hardware_interfact

you should use 8+10 (UART2, or 11+13=UART3) +gnd to establish a serial connection. in your running System you should see a /dev/ttySx device. if not i guess it needs to be enabled in DTS (kernel hardware description)

i found no kernel 4.x yet (only 3.4) which i guess has no dts support…maybe you see an ttySx, but maybe not.

i found this thread where m2m is listed for 4.14 too…as far as i see dts is available in mainline-linux: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts?h=v5.4-rc7 but it seems that only uart0/1 are defined where uart1 is used for bluetooth and uart0 should be debug-uart (console)…

Does it need to be released from console duty?

When I looked earlier the rpi equivalent apparently needs to be released

Best Regards
Pheonixfire

I don’t know, but you can use another port…if you use ttyS0 as debug-uart,try ttyS1 for serial communication…

Binding should be in dts(i) only and cmdline (uboot). But maybe first defined is used as debug-uart