This assumes an Ubuntu system.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt install python3.10
cd into the place you have cloned the repo, and create your kivy environment
If you are upgrading your python version in a virtualenv, first delete your old environment. Ignore this if you are doing the initial install:
rm -rf kivy_venv
Create a virtualenv with python3.10 in it:
python -m virtualenv -p python3.10 kivy_venv
Create a direct link to the activate script, for convenience
ln -s kivy_venv/bin/activate
Run the script to enter the environment:
source ./activate
Only do this after having run "activate".
Install cython first. Jnius requires cython, but doesn't make this explicit to pip.
pip3 install cython
Now install the rest.
pip3 install kivy
pip3 install oscpy
pip3 install bleak
pip3 install pydantic
pip3 install websocket-server
pip3 install pytest
Before using buildozer, install the latest version of buildozer (required to make python3.10 work):
pip3 install https://github.com/kivy/buildozer/archive/master.zip
To build and run the Android APK on an Android device connected using debug mode on USB:
buildozer android debug deploy run && adb logcat | grep -Ei "python|bleservice|AndroidRuntime"
The logcat and grep provides a way to watch the debug output of the program.
To try to connect to CafeHub, run it on the Android device. CafeHub will display its IP address. Connect to that ip:5000 on a modern web browser to see a test app that talks to the DE1 via CafeHub.
To run CafeHub in the CLI, having made sure to run the activate script first:
cd src
python3 main.py
Connect to localhost:5000 to try the default test app.
If CafeHub finds an index.html file in /sdcard/CafeHub/web, it will serve that directory over HTTP instead of the test app compiled into the APK.
I suggest installing the awesome SimpleSSHD and using it to update files on your tablet.
To do this I normally install the open source F-Droid app store APK using adb, and then search in there.
Setting up SimpleSSHD
If no key is set in SimpleSSHD, then it generates a one-time password every time there is a connection attempt, and you have to manually copy the key off the screen into the password prompt. To make things easier, I copy my public key as an authorized key, to SimpleSSHD:
scp -P 2222 id_rsa.pub ray@192.168.68.90:authorized_keys
SimpleSSHD doesn't care what username you use.
Once this is done, in Linux, you can mount the directory on your tablet locally using:
sshfs -p 2222 ray@tabletip:/sdcard/ /home/ray/tabletfs/
Now you can simply treat the tabletfs
directory as any other directory, and the files on the tablet will be updated as soon as they are changed locally.
In the past, in Windows, I found WinSCP to be a good program for copying files to SSH servers. I haven't used it in a while.