I have an old Nexus 9 I'd like to use as display for openHAB.
To preserve the battery I am thinking to keep charge between 20 and 80%
Idea is to plug it into an USB port of my FreeBSD NUC7 and switch on and off the USB port, controlled by termux and termux-battery-status on the tablet.
but the tablet still gets power. Any ideas?
FreeBSD 13.0-RELEASE-p3
I plugged the tablet into a Pi 3B, there I can switch off the usb ports with uhubctl -l 1-1 -p 2 -a 0 and the tablet goes off power. Unfortunately, the PI 3 usb ports are ganged, you switch off all of them at once.
I also compiled uhubctl on FreeBSD, but it does not see any usb ports.
To preserve the battery I am thinking to keep charge between 20 and 80%
Idea is to plug it into an USB port of my FreeBSD NUC7 and switch on and off the USB port, controlled by termux and termux-battery-status on the tablet.
Code:
sudo usbconfig -d 0.3 power_off
sudo usbconfig
ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x8087 product 0x0aaa> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen0.3: <Android gr8rFiV8US03C03C00 Android> at usbus0, cfg=255 md=HOST spd=FULL (12Mbps) pwr=OFF (500mA)
but the tablet still gets power. Any ideas?
FreeBSD 13.0-RELEASE-p3
I plugged the tablet into a Pi 3B, there I can switch off the usb ports with uhubctl -l 1-1 -p 2 -a 0 and the tablet goes off power. Unfortunately, the PI 3 usb ports are ganged, you switch off all of them at once.
I also compiled uhubctl on FreeBSD, but it does not see any usb ports.