pavlobu / deskreen

Deskreen turns any device with a web browser into a secondary screen for your computer. ⭐️ Star to support our work!
https://deskreen.com
GNU Affero General Public License v3.0
15.46k stars 832 forks source link

USB support (without tethering) #173

Open rayman3003 opened 2 years ago

rayman3003 commented 2 years ago

I heard that using Wifi for a long time, could gives u a headache, So I prefer using USB over Wifi.

So I'm asking to support USB connection between deskreen (Windows version) & and an android device. (& I don't have an-always-on internet on my windows to share with my android device (tethering)), so tethering is out of my options.

I tried some other paid apps (similar to deskreen) that can do this USB connection without tethering & smoothly. So it means that it is possible for USB to work without tethering; But they r not free & also they are not as powerful as deskreen.

So please add support for USB (without tethering) in Deskreen. Please.

docop commented 2 years ago

Hum that can indeed be quite a great addition to have this ability !

mingchoi commented 2 years ago

Non-sense requirement can also give developers headache. If you think your Android device hurt your brain, you should buy a USB to ethernet adapter to keep your device non-wireless.

chris18191 commented 2 years ago

I am running linux, but this should work on windows just fine. When I am on the go and I don't have some networks available, I connect my tablet via USB and use ADB (android debug bridge) to redirect some local port of my tablet to my laptop. But I guess you would need USB debugging enabled to be able to do that.

In my case after connecting the device and running adb devices I see my tablet listed and then I can set the redirect via the following command:

adb reverse tcp:3131 tcp:3131

Afterwards I am able to find deskreen via localhost:3131 on my tablet. Hope that fits your needs.

rayman3003 commented 2 years ago

you should buy a USB to ethernet adapter to keep your device non-wireless.

I'm already using a USB to ethernet adapter.

The problem is that deskreen doesn't support USB.

rayman3003 commented 2 years ago

but this should work on windows just fine.

Thank u for this solution. But for a reason, this solution doesn't work for me:

I'm using other windows app(s) that installed some drivers on windows & it seems those drivers are already using that 3131 localhost, so when I use "adb reverse tcp:3131" command, it gives me an error & won't allows deskreen to function correctly through USB.

chris18191 commented 2 years ago

so when I use "adb reverse tcp:3131" command, it gives me an error

Do you run the exact command from above, i.e. adb reverse tcp:3131 tcp:3131 (with the second tcp:3131)?

But the port problem could be solved by a proposed enhancement I guess (see #167), which yet has to be implemented.

lijunhaoabroad commented 1 year ago

HI, I use this "adb reverse tcp:3131 tcp:3131" command, it does show the connection window. After being connected, the default video player is off and my tablet has a black screen (it didn't display the content), and each time 10 seconds after, it displays a deskcreen error dialog: webRTC error occurred and asked me connect again.

ElectroGehirn commented 6 months ago

Hi, would be nice if there would be a option usb conntection, because i have the same issue, the "adb reverse tcp:3131 tcp:3131" trick does not work for me, and to fix this in the future, and also it would improve the connection, and may remove some of the latency

and another request from me would be an option to make a virtual screen in the programm, and if it gets closed, the virtual screen is also gone, that it makes no possible problems

info: i am also on linux, so i am using the linux version

ksraylan commented 2 weeks ago

spacedesk can do via USB, without tethering, but it is for Windows only. I wonder what Android API they used to accomplish that (maybe they used this?)