I post this since I could not find any information about above connection to
use an old/unused Android Phone's Camera via RPI. Most of the tutorials I found
are describing the installation of the RPI's camera modul and the rest is covering
the use of an external USB Camera. I also tried 'motion' and 'usbip' without success.
(both are looking for '/dev/video' devices which where not created with tethering).
Rooted Android Phone with 'IP Webcam' and 'busybox' installed.
edit 'build.prop' (to disable MTP):
search for 'persist.sys.usb.config' and edit the value to 'adb'. This is very important
because MTP tries permanent to connect to your RPI and will disconnect your tethering connection!
iface usb0 inet static
echo 1 > /proc/sys/net/ipv4/ip_forward
3) Connect your Phone with USB cabel to your RPI and activate 'USB Tethering'.
Start the app 'IP Webcam'.
4) Login in your RPI with 'ssh' and check if the 'usb0' interface with IP '192.168.42.100'
was created (with 'ifconfig').
5) Connect to your phone with 'adb shell' and check if the 'rndis0' interface with the
IP '192.168.42.129' was created. (with 'busybox ifconfig').
Add the gw from your RPI:
busybox route add default gw 192.168.42.100 dev rndis0
6) LAN Clients
Create the gw to your RPI:
route add default gw 10.0.0.X dev wlan0
In your browser open the camera with 'http://192.168.42.129:8080'
(the port must be defined in your 'IP Webcam' app).
You can also reach your camera via WAN over VPN.
Android > USB > RPI '192.168.42.0'
LAN Clients > WLAN > RPI '10.0.0.0'
Greetings from Vienna
1 post • Page 1 of 1