USB tethering on froyo works if you need to use the phone's internet on PC. Sometimes, we just need to do it the other way around (lets say the PC doesn't have a wireless card, or we only have ad-hoc networks that are not discoverable without patching) and use our PC's net on android through USB.
Few people have done it using bridges. I did it using squid proxy server on ubuntu.
1.) Install squid and allow http access to all required clients.
2.) Connect the phone with usb tethering on.
3.) Ubuntu detects it as usb0. Now change the ip of usb0 from 'Automatic DHCP' to 'Shared to other computers'.
4.) Fire up the terminal emulator and enter the following.
#su
#netcfg usb0 dhcp
If all went well, you should now be able to connect to the internet.
Tried it and it's not working for me...
Or maybe i didn't setup squid right.
I'm not so good on ubuntu OS
I tried making a bridge connection on windows...the networks
The network seems to be connected but no internet connection...
Is it necessary to have Ubuntu OS?
Maybe some another how-to will help:
http://forum.xda-developers.com/showthread.php?t=793102
To setup squid to work:
type in:
sudo gedit /etc/squid/squid.conf
In that file find the section called
# ACCESS CONTROLS
Under the section find the line
#Recommended minimum configuration:
and add this line next to it
acl all src all
then find the section
# TAG: http_access
Under this section find the line
#Default:
and add the following line to look like
#Default:
http_access allow all
Close the file and restart squid as:
sudo start squid
That should setup squid to share your internet on all clients.
If required, reboot.
You can try out a similar approach on any other distro other than ubuntu.
i tried several searches about this topic, but none of them succeeded,
any update on this?
can i install ubuntu in my Win7?
syruz said:
can i install ubuntu in my Win7?
Click to expand...
Click to collapse
Well, you can virtualize it in Virtual box. It's free for personal use.
by the way what is the squid your talking about?
@ TS
maybe you can provide us with the link for ubuntu and squid?
Come on.. if you don't already know what ubuntu and squid are there's no point in trying this.
Ubuntu = Linux, that's another operating system. Squid is a proxy.
You ashould at least have the decency of Googling those for yourself..
Sent from my LG-P500 using XDA App
harshaxdadevelopers said:
USB tethering on froyo works if you need to use the phone's internet on PC. Sometimes, we just need to do it the other way around (lets say the PC doesn't have a wireless card, or we only have ad-hoc networks that are not discoverable without patching) and use our PC's net on android through USB.
Few people have done it using bridges. I did it using squid proxy server on ubuntu.
1.) Install squid and allow http access to all required clients.
2.) Connect the phone with usb tethering on.
3.) Ubuntu detects it as usb0. Now change the ip of usb0 from 'Automatic DHCP' to 'Shared to other computers'.
4.) Fire up the terminal emulator and enter the following.
#su
#netcfg usb0 dhcp
If all went well, you should now be able to connect to the internet.
Click to expand...
Click to collapse
Hi guys,
Do you know why I wouldn't be able to see "USB tethering" option? No matter what I did so far, all I can see is the "Portable Wi-Fi hotspot" option and that works fine. But I need to use the USB Tethering!!!
Thanks for the help!
If someone is having the same problem as me (ie usb tethering mode not visible) just use a program called togglesettings lite. It can turn on the usb tethering for you. Now the reverse usb tethering works for me like a charm. Peace!
Sent from my LG-P500 using XDA App
harshaxdadevelopers said:
USB tethering on froyo works if you need to use the phone's internet on PC. Sometimes, we just need to do it the other way around (lets say the PC doesn't have a wireless card, or we only have ad-hoc networks that are not discoverable without patching) and use our PC's net on android through USB.
Few people have done it using bridges. I did it using squid proxy server on ubuntu.
1.) Install squid and allow http access to all required clients.
2.) Connect the phone with usb tethering on.
3.) Ubuntu detects it as usb0. Now change the ip of usb0 from 'Automatic DHCP' to 'Shared to other computers'.
4.) Fire up the terminal emulator and enter the following.
#su
#netcfg usb0 dhcp
If all went well, you should now be able to connect to the internet.
Click to expand...
Click to collapse
Thank you for sharing this trick. But i dont have netcfg utility, since i use ubuntu maverick 10.10, it is not in source list. is ther any other way to do "netcfg usb0 dhcp"?
This is by far the easiest solution I've found to reverse tether. Thanks!
jadeiceman said:
This is by far the easiest solution I've found to reverse tether. Thanks!
Click to expand...
Click to collapse
Sorry and wich is the solution ????
syruz said:
@ TS
maybe you can provide us with the link for ubuntu and squid?
Click to expand...
Click to collapse
sudo apt-get install squid
This should install squid.
netcfg is not there on recent ubuntu versions not even software list but you can configure via app indicator at right but still i can't use reverse tethering although i followed you pretty well.
netcfg is a utlility on the phone... u need to run that command at the terminal of the phone not on your computer. (get a terminal emulator from the market)
Wow I'm feeling stupid.Will give it a go now.
Dear all
I want to connect a usb printer to an android device like android tv box to share it through LAN. Does anybody know an application can make android device to be a print server, or how can i make andoid device to be a print server
Thanks
Have you managed to do anything. ?
+1
I guess there is still no solution to this. I have same setup with a TV-Box, but can't figure out how to share over the network. I tried Servers Ultimate and the LPD print server it has, but had no luck getting it to work. I think we would need CUPS built in to the kernel of our device ROM.
I hope someone comes up with a solution. Doesn't seem like a big challenge.
If only google Cloud Print could see the attached USB printer and make it accessible.
You can set up Linux chroot (I used Linux Deploy) to install a cups server and share printer over the network. I am using this solution for a long time and it does the job.
krzysiek.karolak1 said:
You can set up Linux chroot (I used Linux Deploy) to install a cups server and share printer over the network. I am using this solution for a long time and it does the job.
Click to expand...
Click to collapse
Do u have tutorial for this? thanks
I am also interested in this.
ket_92 said:
Do u have tutorial for this? thanks
Click to expand...
Click to collapse
It will take some time for you if you haven't used linux and if you do not have idea about how to execute any of the steps I mention below.
Follow these steps:
* Root your phone
* Install Linux Deploy from play store
* Select distribution as Ubuntu in Linux Deploy and install it (this will take time as it will download the linux image and install it)
* In the config options, select VNC or SSH (this is only to install the cups package)
* Login to the linux machine (running on your android phone) using SSH or VNC
* Install cups, cups-daemon packages (run command "sudo apt-get install cups cups-daemon")
* Start cups daemon: run command "sudo /etc/init.d/cups start"
* Install system-config-printer-gnome if using VNC (run command "sudo apt-get install system-config-printer-gnome")
* If using VNC, connect to the machine using a VNC client and run "sudo /usr/share/system-config-printer/system-config-printer.py". In the screen, add your printer and share it to be used over network
* If using SSH, connect to the machine and add your printer using lpadmin (this is a bit advanced, use VNC to avoid and set the printer easily)
Ok, if I set it like this, do I need to start that Linux after every reboot or it will work automatically? I would also like to use my Android TV box as a scanner server, cause I have HP MFP printer.
Thank you @krischat1001 for the steps.
I'm trying to make my printer working with this method (Brother DCP-165C connected to Khadas VIM2)
The Linux Deploy is running well with CUPS installed. The printer USB port was correctly identified (I think), I installed the cupswrapper official driver and selected it while adding the printer.
The problem is the printer never was triggered by CUPS, even while all the jobs are listed as done. I tried print a test page using CUPS and also print from another computer where the CUPS server was added.
What I can see in the printer screen is a fast message "Receiving data", for 100ms or so, on the exact moment I start a print job (this is the normal message shown while printing). But nothing is printed.
Is there any idea on whats going on?
fearbrain said:
Thank you @krischat1001 for the steps.
I'm trying to make my printer working with this method (Brother DCP-165C connected to Khadas VIM2)
The Linux Deploy is running well with CUPS installed. The printer USB port was correctly identified (I think), I installed the cupswrapper official driver and selected it while adding the printer.
The problem is the printer never was triggered by CUPS, even while all the jobs are listed as done. I tried print a test page using CUPS and also print from another computer where the CUPS server was added.
What I can see in the printer screen is a fast message "Receiving data", for 100ms or so, on the exact moment I start a print job (this is the normal message shown while printing). But nothing is printed.
Is there any idea on whats going on?
Click to expand...
Click to collapse
Hi,
Im planning to repurpose one of our old MXQ Pro Android TV Box into a C.U.P.S. print server soon.
I'm really interested whether you've managed to identify the root cause or fix for this issue.
I would first check whether firewall and whether port 631 is allowed in the local network; I would then also check whether C.U.P.S. listener is configured to any print service request in cupsd.conf.
Dshah79 said:
Hi,
Im planning to repurpose one of our old MXQ Pro Android TV Box into a C.U.P.S. print server soon.
I'm really interested whether you've managed to identify the root cause or fix for this issue.
I would first check whether firewall and whether port 631 is allowed in the local network; I would then also check whether C.U.P.S. listener is configured to any print service request in cupsd.conf.
Click to expand...
Click to collapse
It was a driver problem. I found the specific driver for my printer, and everything is working well now.
Good luck!
I am trying to do the same for an old android phone. Have installed Ubuntu using Linux deploy, installed Cups, Printer Config Gnome, as discussed in this forum.
Printer is Epson L130. Gutenprint supports it, a user post in their forum confirms it.
But nothing happens when I connect my phone to the printer using USB. Neither CUPS nor Printer GNOME detects a new printer.
I have tried 3 different rooted phones: Moto Atrix 2, Xiaomi Mi 3, Moto X Play with same result. I am using the stock kernel and Rom.
lsusb does not show my printer.
lsusb -t however shows the printer in one of the nodes.
Are you guys on a custom kernel/rom?
Any suggestion would be appreciated.
avisekjena said:
I am trying to do the same for an old android phone. Have installed Ubuntu using Linux deploy, installed Cups, Printer Config Gnome, as discussed in this forum.
Printer is Epson L130. Gutenprint supports it, a user post in their forum confirms it.
But nothing happens when I connect my phone to the printer using USB. Neither CUPS nor Printer GNOME detects a new printer.
I have tried 3 different rooted phones: Moto Atrix 2, Xiaomi Mi 3, Moto X Play with same result. I am using the stock kernel and Rom.
lsusb does not show my printer.
lsusb -t however shows the printer in one of the nodes.
Are you guys on a custom kernel/rom?
Any suggestion would be appreciated.
Click to expand...
Click to collapse
Hi,
are you able to connect Epson L130 with the android device as a print server. Please let me know, as I have also the same printer.
krischat1001 said:
It will take some time for you if you haven't used linux and if you do not have idea about how to execute any of the steps I mention below.
Follow these steps:
* Root your phone
* Install Linux Deploy from play store
* Select distribution as Ubuntu in Linux Deploy and install it (this will take time as it will download the linux image and install it)
* In the config options, select VNC or SSH (this is only to install the cups package)
* Login to the linux machine (running on your android phone) using SSH or VNC
* Install cups, cups-daemon packages (run command "sudo apt-get install cups cups-daemon")
* Start cups daemon: run command "sudo /etc/init.d/cups start"
* Install system-config-printer-gnome if using VNC (run command "sudo apt-get install system-config-printer-gnome")
* If using VNC, connect to the machine using a VNC client and run "sudo /usr/share/system-config-printer/system-config-printer.py". In the screen, add your printer and share it to be used over network
* If using SSH, connect to the machine and add your printer using lpadmin (this is a bit advanced, use VNC to avoid and set the printer easily)
Click to expand...
Click to collapse
How do I connect VNC viewer from a laptop? I'm of course in the same wifi network.
whats-in-a-name said:
How do I connect VNC viewer from a laptop? I'm of course in the same wifi network.
Click to expand...
Click to collapse
(I was trying from my browser, which didn't work) Now installed a vncviewer and was asked for credentails, so YES it works.
This is a confusing thread, but I just want to state that I can print from my Android phone to my old-but-networked HP Laserjet 2100tn printer without using an Internet print server and without installing or using Linux.
Newer Mopria-certified printers are even easier to set up to print from Android.
1. On Android, I installed an "lpd" print server which outputs PDF level 1.3
2. But my printer doesn't accept PDF - my printer wants PCL-5 instead
3. So I added a muPDF "faux printer driver" to "render" the PDF to a bitmap
This converts the PDF to a bitmap and then to PCL-5, which is then sent to the old networked printer via the Android "print server".
I gave up on CUPS though as nothing seemed to work with my Android-12/Windows-10 setup.
I have found a very simple solution.
1. Make a USB server using your android mobile connected to printer with the app "
VirtualHere USB Server"2. Install the " VirtualHere client" in your windows/mac etc.
3. Connect the printer to your android mobile.
4. Run the server
5. In the windows , the client will detect the usb hub.
Now you are good to go.
Make sure that both server and client are connected over same network.
Any recommendations for a good ssh server to run on the phone? It's easier to me to run a shell, vi, scp via something like putty that works well as a real terminal than 'adb shell' via the command prompt where vi is all messed up, etc. I tried Android Commander as an alternative but it's too buggy at least against our phone.
So what is *the* ssh server to run on the phone with the option to keep it disabled most of the time, except when I need to use it?
Lately i got ssh running on my tablet and was not able to use commands that worked over adb.
The commands included "am boradcast" and "input tap"
Is this somehow planned or a bug.
I am using Cyanogenmod Nightly with OpenSSH
Tyrado said:
Lately i got ssh running on my tablet and was not able to use commands that worked over adb.
The commands included "am boradcast" and "input tap"
Is this somehow planned or a bug.
I am using Cyanogenmod Nightly with OpenSSH
Click to expand...
Click to collapse
Not sure and i'm not expirienced with SSH, but isn't there something else needed for ssh commands?
Did some research for you and thei're talking about an opensshd daemon, maybe this could help you further... (Trust me )
http://linux.about.com/od/commands/l/blcmdl8_sshd.htm
The ssh daemon is the peace of code running on my device, listening for connections. This is all working so far. I am able to connect but issuing the commands doesn't produce any output or effect
Hi. Im using Ubuntu Touch 13.10 pre-installed version on GNex
I don't know when is but ubuntu touch img file included openssh-server
after that ssh server doesn't automatically start
so I always have to type 'service ssh start' manually ( /etc/init.d/ssh start doesn't work )
I have tried update-rc.d ssh defaults, checked /etc/init/ssh.conf, and installed sysv-rc-conf and set run level for ssh
what's wrong? And is there anyway without adding my own script?
Try to put the command in /etc/rc.local. I can't test it because I don't have the device with me.