Page 1 of 1
USB tether to Android tablet with Buster question
Posted: Thu Sep 26, 2019 8:30 pm
by sonettguy
I would like to use my Android Galaxy Tab A tablet as a monitor for my pi 4 running Buster. I found the following article on setting it up on an earlier device.
https://joshuawoehlke.com/android-raspb ... -over-usb/. One of the steps is the following.
Log into your Pi via SSH or open up a terminal in its GUI and pull up your network interfaces.
Paste the following onto the bottom of the file, then save and exit (ctrl-X, Y):
Code: Select all
iface usb0 inet static
address 192.168.42.42
netmask 255.255.255.0
network 192.168.42.0
broadcast 192.168.42.255
But the interfaces file says:
Please note that this file is written to be used with dhcpcd. For static IP, consult /etc/dhcpcd.conf and "man dhcpcd.conf."
I'm instantly over my head. I'm concerned that I will screw things up so I'd like a little advice here. I think I am setting up a static address for the USB tether. The manual has about 400 options. One is
"static value" Configures a static value. If you set ip_address then dhcpcd will not attempt to obtain a lease and just use the value for the address with an infinite lease time. If you set ip6_address, dhcpcd will continue auto-configuration as normal. Here is an example which configures two static address [sic], overriding the default IPv4 broadcast address...
static ip_address=192.168.0.10/24...
Is that what I should do, add in this case "static ip_address=192.168.42.42" in dhcpcd.conf instead of adding text to the interfaces file?
Second, I can't find an enable USB tethering switch in settings of the Tab A. Does this mean that I can't use this device?
Re: USB tether to Android tablet with Buster question
Posted: Thu Sep 26, 2019 8:46 pm
by neilgl
What I do on my iPad is to install VNCviewer. I then enable VNC server on the pi. Then use the IP address of the pi to connect to it from the tablet via WiFi - that may work on your tablet?
Re: USB tether to Android tablet with Buster question
Posted: Thu Sep 26, 2019 10:05 pm
by fruitoftheloom
sonettguy wrote: ↑Thu Sep 26, 2019 8:30 pm
I would like to use my Android Galaxy Tab A tablet as a monitor for my pi 4 running Buster. I found the following article on setting it up on an earlier device.
https://joshuawoehlke.com/android-raspb ... -over-usb/. One of the steps is the following.
Log into your Pi via SSH or open up a terminal in its GUI and pull up your network interfaces.
Paste the following onto the bottom of the file, then save and exit (ctrl-X, Y):
Code: Select all
iface usb0 inet static
address 192.168.42.42
netmask 255.255.255.0
network 192.168.42.0
broadcast 192.168.42.255
But the interfaces file says:
Please note that this file is written to be used with dhcpcd. For static IP, consult /etc/dhcpcd.conf and "man dhcpcd.conf."
I'm instantly over my head. I'm concerned that I will screw things up so I'd like a little advice here. I think I am setting up a static address for the USB tether. The manual has about 400 options. One is
"static value" Configures a static value. If you set ip_address then dhcpcd will not attempt to obtain a lease and just use the value for the address with an infinite lease time. If you set ip6_address, dhcpcd will continue auto-configuration as normal. Here is an example which configures two static address [sic], overriding the default IPv4 broadcast address...
static ip_address=192.168.0.10/24...
Is that what I should do, add in this case "static ip_address=192.168.42.42" in dhcpcd.conf instead of adding text to the interfaces file?
Second, I can't find an enable USB tethering switch in settings of the Tab A. Does this mean that I can't use this device?
Set up RealVNC Server on my RPi running Raspbian Buster.
Enabled Wireless Hotspot on my Android Device, so my RPi could connect Wirelessly.
Ran RealVNC Viewer on my Android Device to log in to aforementioned RealVNC Server.
https://www.realvnc.com/en/raspberrypi/
Re: USB tether to Android tablet with Buster question
Posted: Thu Sep 26, 2019 10:21 pm
by neilgl
Ah yes and to find the ip address of the pi, I use “fing” app on Android or iPad.
Re: USB tether to Android tablet with Buster question
Posted: Thu Sep 26, 2019 11:20 pm
by sonettguy
Thanks for the quick replies! It is awesome to get some feedback so quickly. I appreciate it. Also, thanks, neilgl, for your first comment. That is exactly what I thought I would do. But, the enable/disable buttons on USB tethering are greyed-out on my Android tablet. I don't have a data plan for the tablet (nor do I want one), so the hot-spot is not good. I want a USB tethered cord. Seems like it should be possible, but if I simply try to connect (I'm using androidVNC) to 192.168.42.42, I get
Code: Select all
VNC connection failed! Non route to host
Re: USB tether to Android tablet with Buster question
Posted: Fri Sep 27, 2019 5:05 am
by fruitoftheloom
sonettguy wrote: ↑Thu Sep 26, 2019 11:20 pm
Thanks for the quick replies! It is awesome to get some feedback so quickly. I appreciate it. Also, thanks, neilgl, for your first comment. That is exactly what I thought I would do. But, the enable/disable buttons on USB tethering are greyed-out on my Android tablet. I don't have a data plan for the tablet (nor do I want one), so the hot-spot is not good. I want a USB tethered cord. Seems like it should be possible, but if I simply try to connect (I'm using androidVNC) to 192.168.42.42, I get
Code: Select all
VNC connection failed! Non route to host
Internet Access and Tethering / Hotspot are not mutually inclusive, you can have one without the other.
USB Tethering is supported on Android Devices, well it is on my SmartPhone, so it should not be greyed out option.
Maybe try a different USB cable ??
Re: USB tether to Android tablet with Buster question
Posted: Fri Sep 27, 2019 11:04 am
by neilgl
As an alternative to USB tethering, enable VNC on the pi4, then set your pi4 up as an access point (i.e. it provides the Wifi you connect to) e.g. ssid = "NameOfNetwork". Then connect your tablet to that Wifi, then use VNC on tablet to open the ip of the pi4, which will be 192.168.4.1 if we follow this guide:
https://www.raspberrypi.org/documentati ... s-point.md
That worked ok on my ipad & pi4
Re: USB tether to Android tablet with Buster question
Posted: Fri Sep 27, 2019 3:28 pm
by sonettguy
Thanks again. I am highly mobile with my pi 4. I want to use it in places where there is no WiFi signal. So, although I appreciate the link, I am still pursuing a tethered USB cable only. VNC enable/disable is greyed-out on my Pi 4, entering through the Raspberry Pi Configuration on the Desktop used by Buster under Preferences.
So, I am looking at the instructions in the original link that gives me settings to include in the interfaces file, but the interfaces file has a statement which might be directing me to dhcpcd.conf. I'm not really sure.
Should I add in this case "static ip_address=192.168.42.42" in dhcpcd.conf instead of adding text to the interfaces file?
Re: USB tether to Android tablet with Buster question
Posted: Fri Sep 27, 2019 3:35 pm
by neilgl
Yes setting the pi as an access point will be highly mobile, it provides the WiFi. You then connect to its WiFi and use VNC.
Re: USB tether to Android tablet with Buster question
Posted: Sun Sep 29, 2019 10:33 pm
by sonettguy
Well, that was a complete disaster. I followed the instructions in the link
https://www.raspberrypi.org/documentati ... et-sharing and could not get the network SSID to show up on my tablet. Trying a second time, I get the following error.
Then, I had to undo all the work to get the internet back on the pi just to send this. There are no instruction on undoing it. Very frustrating.
I really don't even want to be doing this. I want a USB tether to the tablet for the desktop and still be able to get on the internet if one is available, or go on without it if it is not.
Code: Select all
sudo systemctl start hostapd
~ $ journalctl -xe
Sep 29 16:30:48 pi08 hostapd[2030]: Failed to initialize interface
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Control process exited, code=e
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit hostapd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Failed with result 'exit-code'
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit hostapd.service has entered the 'failed' state with result 'exit-cod
Sep 29 16:30:48 pi08 systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEE
-- Subject: A start job for unit hostapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit hostapd.service has finished with a failure.
--
-- The job identifier is 5145 and the job result is failed.
lines 3836-3858/3858 (END)
Sep 29 16:30:48 pi08 hostapd[2030]: Failed to initialize interface
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit hostapd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit hostapd.service has entered the 'failed' state with result 'exit-code'.
Sep 29 16:30:48 pi08 systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
-- Subject: A start job for unit hostapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit hostapd.service has finished with a failure.
--
-- The job identifier is 5145 and the job result is failed.
I'm going to assume that using the tablet as a monitor is not possible with Buster and go on unless someone else has an idea.
Re: USB tether to Android tablet with Buster question
Posted: Mon Sep 30, 2019 6:35 am
by fruitoftheloom
sonettguy wrote: ↑Sun Sep 29, 2019 10:33 pm
Well, that was a complete disaster. I followed the instructions in the link
https://www.raspberrypi.org/documentati ... et-sharing and could not get the network SSID to show up on my tablet. Trying a second time, I get the following error.
Then, I had to undo all the work to get the internet back on the pi just to send this. There are no instruction on undoing it. Very frustrating.
I really don't even want to be doing this. I want a USB tether to the tablet for the desktop and still be able to get on the internet if one is available, or go on without it if it is not.
Code: Select all
sudo systemctl start hostapd
~ $ journalctl -xe
Sep 29 16:30:48 pi08 hostapd[2030]: Failed to initialize interface
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Control process exited, code=e
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit hostapd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Failed with result 'exit-code'
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit hostapd.service has entered the 'failed' state with result 'exit-cod
Sep 29 16:30:48 pi08 systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEE
-- Subject: A start job for unit hostapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit hostapd.service has finished with a failure.
--
-- The job identifier is 5145 and the job result is failed.
lines 3836-3858/3858 (END)
Sep 29 16:30:48 pi08 hostapd[2030]: Failed to initialize interface
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit hostapd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Sep 29 16:30:48 pi08 systemd[1]: hostapd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit hostapd.service has entered the 'failed' state with result 'exit-code'.
Sep 29 16:30:48 pi08 systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
-- Subject: A start job for unit hostapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit hostapd.service has finished with a failure.
--
-- The job identifier is 5145 and the job result is failed.
I'm going to assume that using the tablet as a monitor is not possible with Buster and go on unless someone else has an idea.
You issue is for some inexplicable reason your Tablet will not USB Tether, nothing to do with the Raspberry Pi SBC per se.....
....as I stated above my Android Smartphone does tether and I use RealVNC for remote login.
Please note I am not using my SmartPhone as a USB Monitor, that is an entirely differing scenario...........
Re: USB tether to Android tablet with Buster question
Posted: Mon Sep 30, 2019 8:41 am
by neilgl
That’s odd, because following the link I gave previously, and stopping before the section “Using the Raspberry Pi as an access point to share an internet connection (bridge)”, because we don’t want a bridge, it worked perfectly on a pi4 running Buster, with all recent updates. If you have time can you start from a fresh install of Buster?