Nell17 / openeve

Automatically exported from code.google.com/p/openeve
0 stars 0 forks source link

No tethering via usb, wi-fi works ok. #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set USB tethering on.
2. U can see tethering icon in notification area
3. No connection on PC

What is the expected output? What do you see instead?
Expect for new connection in NetworkManager.

What version of the product are you using? On what operating system?
latest openeve.

Do you have logcat or dmesg ?
 logcat attached, no new lines in dmesg then tethered

What version of the Official Firmware before use Custom firmware ?
 openetna6.3

Additional info
 I'm using Fedora 14 x64,
in openetna USB tethering works fine for me.

Original issue reported on code.google.com by Fedo...@gmail.com on 12 Apr 2011 at 8:49

Attachments:

GoogleCodeExporter commented 8 years ago
I'm on Ubuntu 10.10, but I don't have this problem.
Check "Settings\Apllications\Development\USB debugging" it must be checked.

Original comment by 2gel...@gmail.com on 12 Apr 2011 at 10:28

GoogleCodeExporter commented 8 years ago
USB debugging is on. I can see tether icon in notify area, probably this linked 
to Fedora 14.

Original comment by Fedo...@gmail.com on 12 Apr 2011 at 2:03

GoogleCodeExporter commented 8 years ago
What version of official firmware do U use before openeve-gb?

Original comment by Fedo...@gmail.com on 12 Apr 2011 at 5:58

GoogleCodeExporter commented 8 years ago
2.2 Korean

Original comment by 2gel...@gmail.com on 12 Apr 2011 at 6:01

GoogleCodeExporter commented 8 years ago
Fuuu... tryed to flash openeve-gb after official 2.2, but no usb-tethering..
My dmesg shows nothing(see log)

Original comment by Fedo...@gmail.com on 12 Apr 2011 at 7:10

Attachments:

GoogleCodeExporter commented 8 years ago
same as my:
http://forum.cyanogenmod.com/topic/16433-usb-tethering-not-working/

Original comment by Fedo...@gmail.com on 12 Apr 2011 at 8:09

GoogleCodeExporter commented 8 years ago
the same here, was fine with openetna...
fedo, did you try the synce modules?

Original comment by skun...@gmail.com on 21 Apr 2011 at 3:45

GoogleCodeExporter commented 8 years ago
currently. RNDIS is not correctly working.

but you can use usb tethering with Pdanet.

Original comment by wkp...@gmail.com on 7 May 2011 at 10:28

GoogleCodeExporter commented 8 years ago
Pdanet not able to open secure web page, only  pay version can do that, and 
only work in windows. Please make it work on OpenEve as I always use my 
Internet on Ubuntu..thanks wkp..

Original comment by SamSamb...@gmail.com on 7 May 2011 at 11:14

GoogleCodeExporter commented 8 years ago
https://www.codeaurora.org/gitweb/quic/la/?p=platform/system/netd.git;a=commitdi
ff;h=a41a719a60a8744e3df94e6d868b719599f3b92d

http://dev.naver.com/scm/viewvc.php/?root=openeve&view=rev&revision=171
----
the OpenEve kernel is somewhat older then original android-msm-2.6.32.

but I have found some related patch at the CodeAurora project.

this fix will be included in the next kernel/boot image.

Original comment by wkp...@gmail.com on 7 May 2011 at 1:37

GoogleCodeExporter commented 8 years ago
--- a/Android.mk
+++ b/Android.mk
@@ -98,6 +98,8 @@ endif

 ifeq ($(BOARD_USE_HTC_USB_FUNCTION_SWITCH),true)
   LOCAL_CFLAGS += -DUSE_HTC_USB_FUNCTION_SWITCH
+else ifeq ($(BOARD_USE_NO_USB_COMPOSITE),true)
+  LOCAL_CFLAGS += -DUSE_NO_USB_COMPOSITE
 endif

 include $(BUILD_EXECUTABLE)
diff --git a/UsbController.cpp b/UsbController.cpp
index 2fafb58..90ff5e6 100644
--- a/UsbController.cpp
+++ b/UsbController.cpp
@@ -49,6 +49,14 @@ int UsbController::enableRNDIS(bool enable) {
 #ifdef USE_HTC_USB_FUNCTION_SWITCH
     int fd = open("/sys/devices/platform/msm_hsusb/usb_function_switch", O_RDWR);
     int count = snprintf(value, sizeof(value), "%d\n", (enable ? 4 : 3));
+#elif USE_NO_USB_COMPOSITE
+    int fd = open("/sys/module/g_android/parameters/product_id", O_RDWR);
+
+    /* Switch to RNDIS composition (Product id = F00E) When RNDIS is enabled.
+     * Switch back to default composition (Product id = 9017) after RNDIS
+     * is disabled.
+     */
+    int count = snprintf(value, sizeof(value), (enable ? "F00E\n" : "6000\n"));
 #else
     int fd = open("/sys/class/usb_composite/rndis/enable", O_RDWR);
     int count = snprintf(value, sizeof(value), "%d\n", (enable ? 1 : 0));
@@ -62,6 +70,8 @@ bool UsbController::isRNDISStarted() {
     char value=0;
 #ifdef USE_HTC_USB_FUNCTION_SWITCH
     int fd = open("/sys/devices/platform/msm_hsusb/usb_function_switch", O_RDWR);
+#elif USE_NO_USB_COMPOSITE
+    int fd = open("/sys/devices/platform/android_usb/functions/rndis", 
O_RDONLY);
 #else
     int fd = open("/sys/class/usb_composite/rndis/enable", O_RDWR);
 #endif

Original comment by wkp...@gmail.com on 7 May 2011 at 1:41

GoogleCodeExporter commented 8 years ago
ok thank you so much waiting now until next boot image release...

Original comment by SamSamb...@gmail.com on 7 May 2011 at 2:59

GoogleCodeExporter commented 8 years ago
USB tethering still not work on boot-gb234-110509-rndis-224mb.zip & 
update-gb-sensor-110509.zip. I did try on my Ubuntu & windows 7. Are there 
another tips how to do that? But I notice another icon of tethering will appear 
on status bar if check both the usb tethering & Portable Wifi Hotspot (circle 
blue icon). .

Original comment by SamSamb...@gmail.com on 9 May 2011 at 3:53

GoogleCodeExporter commented 8 years ago
wow..USB tether  work great on system-gb-20110514-snapshot.zip...thanks wkp..

Original comment by SamSamb...@gmail.com on 14 May 2011 at 3:52

GoogleCodeExporter commented 8 years ago
thankyou for your information :)

Original comment by wkp...@gmail.com on 14 May 2011 at 10:57

GoogleCodeExporter commented 8 years ago
still not working for me...
i've downgraded to openetna to make sure i didn't have a problem with my pc and 
i can see that the right kernel modules are loaded:

rndis_host              4816  0 
cdc_ether               3472  1 rndis_host
usbnet                 13240  2 rndis_host,cdc_ether

with the following kernel messages:

usb 2-1: new high speed USB device using ehci_hcd and address 26
usb 2-1: New USB device found, idVendor=1004, idProduct=0ffc
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: GW620
usb 2-1: Manufacturer: LG
usb 2-1: SerialNumber: 42
usbcore: registered new interface driver cdc_ether
rndis_host 2-1:1.0: usb0: register 'rndis_host' at usb-0000:00:1d.7-1, RNDIS 
device, 02:ec:91:c0:7d:6a
usbcore: registered new interface driver rndis_host

and ifconfig -a tells me i have a new usb0 network device...

on the other hand with openeve (latest boot/system images) no modules are 
autoloaded apart from cdc_acm and even unregistering it and loading manually 
the right modules above i still can't see any usb0 device...

attached the logcat after enabling usb tethering, thank you.

Original comment by skun...@gmail.com on 16 May 2011 at 4:31

Attachments:

GoogleCodeExporter commented 8 years ago
@skun // OpenEVE kernel is different from OpenEtna's
kernel version of OpenEVE is 2.6.32 but OpenEtna's is 2.6.35.

so rndis behavior also different.

you don't have load any other modules for rndis with OpenEVE.
----
to activate USB tethering you have to use boot-gb234-xxxxx-rndis-xxx.zip
like as boot-gb234-110509-rndis-224mb.zip

Original comment by wkp...@gmail.com on 17 May 2011 at 12:47

GoogleCodeExporter commented 8 years ago
still no usb tether. i'm using system-gb-20110506-snapshot.zip & 
    boot-gb234-110509-rndis-224mb.zip. OS is Fedora 14 x86_64. After activating 
usb tether in phone menu nothing happens in computer dmesg

Original comment by Fedo...@gmail.com on 17 May 2011 at 4:27

GoogleCodeExporter commented 8 years ago
@Fedo // Read this comment carefully.
http://code.google.com/p/openeve/issues/detail?id=15#c14

Original comment by wkp...@gmail.com on 17 May 2011 at 4:38

GoogleCodeExporter commented 8 years ago
thx, try this

Original comment by Fedo...@gmail.com on 17 May 2011 at 4:53

GoogleCodeExporter commented 8 years ago
flash experimental system.img, but still no usb-tether(

Original comment by Fedo...@gmail.com on 17 May 2011 at 5:39

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
with "latest boot/system images" i was referring to 
boot-gb234-110509-rndis-224mb.zip and system-gb-20110514a-snapshot.zip. and no, 
still no usb0 interface...
i know the kernel are different with the two roms but how do i suppose to use 
usb tethering under openeve with my linux box when it was plug&play under 
openetna?

Original comment by skun...@gmail.com on 17 May 2011 at 8:16

GoogleCodeExporter commented 8 years ago
I use system-gb-20110514-snapshot with boot-gb234-110509-rndis-236mb.zip. I did 
not do fastboot -w when flashing from system-gb-20110506-snapshot system, and 
usb tethering work fine on my windows & ubuntu. When I was on 
system-gb-20110506-snapshot system I used boot-gb234-110509-rndis-236mb.zip, at 
that moment I think usb tethering work, but it didn't work. After I flash the 
new system, usb tether work.

Original comment by SamSamb...@gmail.com on 17 May 2011 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by wkp...@gmail.com on 29 May 2011 at 10:52

GoogleCodeExporter commented 8 years ago

Original comment by wkp...@gmail.com on 29 May 2011 at 12:56

GoogleCodeExporter commented 8 years ago
sorry to ask, but how did the usb tethering works on windows 7?
i use system-gb-20110514a-snapshot and boot-gb234-110509-rndis-236mb, but i 
don't think the usb tethering works.
The notification under USB tethering always shows USB connected, even it's not 
plugged into. when i tick the USB tethering, it shows tethered but i dont see 
any notification in my desktop.
so far i only use portable wifi hotspot and it does work fine for me. but i 
think its better by usb since battery wont drain faster i suppose?

Original comment by Vic.Eas...@gmail.com on 8 Jun 2011 at 4:18

GoogleCodeExporter commented 8 years ago
I try new snapshot system and found USB tether still not work, so I back to 
system-gb-20110514-snapshot.zip which I've been backup before. And it's stange 
while other people still have no usb tether work on their device which use same 
system with me. Would you help me how to compare the system in my device with 
other?  

Original comment by SamSamb...@gmail.com on 3 Sep 2011 at 1:50

GoogleCodeExporter commented 8 years ago
yes. Some patch to enable the RNDIS device (for USB tethering) is missing.
and I have already checkout the missing patch but... RNDIS device does not work 
correctly.
there are also something wrong with the latest GB 2.3.5

I guess the behavior to enable RNDIS driver is changed so I have to check the 
difference between GB 2.3.4 BETA with the latest GB 2.3.5

Original comment by wkp...@gmail.com on 3 Sep 2011 at 8:02

GoogleCodeExporter commented 8 years ago
https://github.com/OpenEtna/android_frameworks_base/commit/1cb3cb1a94342e03b54fa
bfaf361c9e2e26f23fe

this is USB state related thing.

the RNDIS enabled correctly but USB state is not correctly determined
that's why tethering state is immediately turned off.

above patch is just a guide. I diffed OpenEtna-froyo with the latest GB 2.3.5 
trunk and I got the following simplified patch.
It will be applied to the next snapshot.

Original comment by wkp...@gmail.com on 5 Sep 2011 at 11:41

Attachments:

GoogleCodeExporter commented 8 years ago
https://github.com/wkpark/android_device_lg_eve/commit/05bf219762fe46a4bbf689f1a
f678e850441e621

UsbController.cpp is almost same as local patch (see comment #11)

Original comment by wkp...@gmail.com on 6 Sep 2011 at 12:13

GoogleCodeExporter commented 8 years ago
USB tether work on system-GB-20110902-snapshot, Thanks Wkp for your hardwork..

Original comment by SamSamb...@gmail.com on 6 Sep 2011 at 5:30

GoogleCodeExporter commented 8 years ago

Original comment by wkp...@gmail.com on 6 Sep 2011 at 10:59

GoogleCodeExporter commented 8 years ago
On gb 2.3.7 cannot do usb tether, Linux Kernel Panic

Original comment by SamSamb...@gmail.com on 14 Oct 2011 at 2:03

GoogleCodeExporter commented 8 years ago
this problem still remains.

Original comment by DavidGF....@gmail.com on 14 Oct 2011 at 4:25

GoogleCodeExporter commented 8 years ago
attached /proc/last_kmsg content after the crash.

Original comment by skun...@gmail.com on 14 Oct 2011 at 6:00

Attachments:

GoogleCodeExporter commented 8 years ago
thankyou for your report.
this issue introduced recently by 
http://dev.naver.com/scm/viewvc.php/?root=openeve&view=rev&revision=180

so I revert some patch from it.
http://dev.naver.com/scm/viewvc.php/?root=openeve&view=rev&revision=188

Original comment by wkp...@gmail.com on 14 Oct 2011 at 7:34

Attachments:

GoogleCodeExporter commented 8 years ago
works, thank you!

Original comment by skun...@gmail.com on 14 Oct 2011 at 7:53

GoogleCodeExporter commented 8 years ago
Wifi tehter (portable hotspot) have a problem too, its work but when the screen 
turn off we cannot turn on the screen again by press power or home button again

Original comment by SamSamb...@gmail.com on 15 Oct 2011 at 1:45

GoogleCodeExporter commented 8 years ago
The change in the  boot-gb237-111015-224mb-r188 is not very good. Disconnects a 
lot. With the boot-gb237-111011a-224mb if the connection.

Original comment by DavidGF....@gmail.com on 19 Oct 2011 at 7:08