This program receives commands from UART 2 interface of banana pro, with parameters 115200 bps, parity: None, Data bits: 8, Stop bits: 1 and no hardware flow control.
To configure;
-
Install Ubuntu Mate.
-
Type "su" and login as "root".
-
Type "adduser uart" to add a new user.
-
Type "usermod -aG sudo uart"
-
Copy "uartvideo.py" and "init_dev.sh" files to "/home/uart"
-
Type "visudo -f /etc/sudoers"
-
At the end of "/etc/sudoers" file, add the following lines: %sudo ALL= NOPASSWD: /home/uart/init_dev.sh %sudo ALL= NOPASSWD: /bin/chmod
-
Open menu: "System > Startup Applications"
-
Click "Add" and type "UART video player" as Name, "python /home/uart/uartvideo.py" as Command.
-
Type "chmod 777 /home/uart/uart_dev.sh"
-
Edit "/etc/lightdm/lightdm.conf" file as follows: [SeatDefaults] autologin-guest=false autologin-user=uart autologin-user-timeout=0 autologin-session=lightdm-autologin
-
Restart banana pro.
P<file_name>
play <file_name> video
<file_name> is a null-terminated string, it ends with a (0) character.
there's no space between "P" and <file_name>
e.g. Pintroduction.avi : Starts the movie "introduction.avi" in the current directory.
Pvideos\setup.avi : Starts the movie "setup.avi" in the /videos directory.
S
stop playback