I am working on PM 2.5 sensor on BPi M2 at Ubuntu 15.04. I can only find ttyS0 which is serial console but not other serial port, like ttyS2 the one mentioned by BPI_Q.
You said it work at Linux. Is there any easy way to enable ttyS2?? Since I am not very good at compiling image, is it possible to use official image to enable it??
You have to modify the sys_config.fex for your board, and comment the lines defining the GPIO on the same pins as the ones used by the serial 2 or 3, and set the “used” flag to true for the corresponding USART :).
It should work !
Both systems use the same method and share a common sys_config.fex / BSP (partially ?), so it should work. I posted a topic some time ago about this issue : Android sys_config customization and peripherals . You need to edit the fex file, process it to get a bin, then replace whatever file needs to be replaced.
On linux, we rebuild the kernel to fit to our needs anyway, so I can’t tell exactly how to do it without recompiling everything. It worked on android though, so I guess it’s possible !