alex1491163117 / android-wifi-tether

Automatically exported from code.google.com/p/android-wifi-tether
0 stars 0 forks source link

No communication in infrastructure mode on Samsung Intercept (SPH-M910) after proper SOFTAP enable #661

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which device (manufacturer, type)?
Samsung Intercept

Which firmware is installed?
2.1-update1 DI06

What version of wireless tether are you using?
2.0.5-pre11

What steps will reproduce the problem?

1. compile dhd.ko linked with -DSOFTAP to enable SOFTAP functions
2. Run wireless tether with generic device modified as such in tether.edify:

    getcfg("device.type") == "generic" && (
      #            
      # Generic device                                                                                                                                                           
      #                  
      #log(load_wifi(), "Loading WiFi driver");                                                                                                                                                                                                            

    #                                                                                                     
      # Nexus One.
      #                                
                  #
                  # Loading firmware                                                                                                                                    
                  #                                                                                                                                
              module_loaded("dhd") || log(insmod("/lib/modules/dhd.ko", "firmware_path=/etc/wifi/bcm4329_aps.bin nvram_path=/system/etc/wifi/nvram_net.txt dhd_watchdog_ms=200 dhd_poll=1"), "Loading dhd.ko module<br>(bcm4329_aps.bin from /etc/wifi)");                                   
              sleep("3");
                log(run_program("/data/data/android.tether/bin/ultra_bcm_config "+getcfg("wifi.interface")+" softap_gog "+ getcfg("wifi.essid")+" "+getcfg("wifi.encryption")+" "+getcfg("wifi.encryption.key")+" "+getcfg("wifi.channel")), "Starting access-point");
              #                          
              # Bring up wifi interface
              #                         
              log(run_program("/data/data/android.tether/bin/ifconfig " + getcfg("wifi.interface") + " " + getcfg("ip.gateway") + " netmask " + getcfg("ip.netmask")) &&
              run_program("/data/data/android.tether/bin/ifconfig " + getcfg("wifi.interface") + " up"),  "Activating WiFi interface");

        ); 

3. See following results indicating all is A-OK:

# ./tether start 1
about to run: [/data/data/android.tether/bin/ultra_bcm_config eth0 softap_gog 
AndroidTether open none 7]
ASCII_CMD=                      
ASCII_CMD=AP_CFG,SSID=AndroidTether,SEC=open,KEY=85ce956c3421ab4103da8aa6d186ac5
a391320e7e377ca9ddd6cdde8dc0a5573,CHANNEL=7,PREAMBLE=0,MAX_SCB=8,ENDASCII_CMD=  

ASCII_CMD=AP_BSS_START,SSID=AndroidTether,SEC=open,KEY=85ce956c3421ab4103da8aa6d
186ac5a391320e7e377ca9ddd6cdde8dc0a5573,CHANNEL=7,PREAMBLE=0,MAX_SCB=8,ENDabout 
to run: [/data/data/android.tether/bin/ifconfig eth0 192.168.2.254 netmask 
255.255.255.0]
about to run: [/data/data/android.tether/bin/ifconfig eth0 up]
about to run: [/data/data/android.tether/bin/iptables -N wireless-tether]
about to run: [/data/data/android.tether/bin/iptables -F wireless-tether]
about to run: [/data/data/android.tether/bin/iptables -t nat -F PREROUTING]
about to run: [/data/data/android.tether/bin/iptables -t nat -F POSTROUTING]
about to run: [/data/data/android.tether/bin/iptables -t nat -F]
about to run: [/data/data/android.tether/bin/iptables -A wireless-tether -m 
state --state ESTABLISHED,RELATED -j ACCEPT]
about to run: [/data/data/android.tether/bin/iptables -A wireless-tether -s 
192.168.2.0/24 -j ACCEPT]
about to run: [/data/data/android.tether/bin/iptables -A wireless-tether -p 47 
-j ACCEPT]
about to run: [/data/data/android.tether/bin/iptables -A wireless-tether -j 
DROP]
about to run: [/data/data/android.tether/bin/iptables -A FORWARD -j 
wireless-tether]
about to run: [/data/data/android.tether/bin/iptables -t nat -I POSTROUTING -s 
192.168.2.0/24 -j MASQUERADE]
about to run: [/data/data/android.tether/bin/dnsmasq -i eth0 
--resolv-file=/data/data/android.tether/conf/resolv.conf 
--conf-file=/data/data/android.tether/conf/dnsmasq.conf]
script result was []

What is the expected output? What do you see instead?

The expected output is I can see my device as an infrastructure device (master 
mode) and connect to it as such. What happens is device is visible as 
infrastructure device, but does not allow me to connect. Never replies to any 
packets, even if I manually set my IP and join with encryption off and access 
control off.

Please provide any additional information below.
Just recently ported over the SOFTAP stuff to our device, but the code compiles 
cleanly and works fine otherwise. (Client WLAN is OK and ad-hoc tether is OK)

I have attached the source I modified.

Original issue reported on code.google.com by necro...@gmail.com on 23 Oct 2010 at 6:29

Attachments:

GoogleCodeExporter commented 9 years ago
Here is iwconfig/ifconfig & dmesg

# ./iwconfig  
lo        no wireless extensions.

sit0      no wireless extensions.

ppp0      no wireless extensions.

eth0      IEEE 802.11-DS  ESSID:""  Nickname:""
          Mode:Master  Frequency:2.442 GHz  Access Point: Not-Associated   
          Bit Rate:54 Mb/s   Tx-Power:32 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=5/5  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wl0.1     IEEE 802.11-DS  ESSID:"AndroidTether"  Nickname:""
          Mode:Master  Frequency:2.442 GHz  Access Point: 00:90:4C:C5:00:34   
          Bit Rate=54 Mb/s   Tx-Power:32 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:90:4C:C5:00:34  
          inet addr:192.168.2.254  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7834 (7.6 KiB)  TX bytes:984 (984.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:853 errors:0 dropped:0 overruns:0 frame:0
          TX packets:853 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:52016 (50.7 KiB)  TX bytes:52016 (50.7 KiB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:28.213.250.218  P-t-P:68.28.145.69  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:198 errors:0 dropped:0 overruns:0 frame:0
          TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:63574 (62.0 KiB)  TX bytes:24519 (23.9 KiB)

wl0.1     Link encap:Ethernet  HWaddr 02:90:4C:C5:00:34  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7834 (7.6 KiB)  TX bytes:984 (984.0 B)

# route list
BusyBox v1.17.2 (2010-09-30 16:12:19 EDT) multi-call binary.

Usage: route [{add|del|delete}]

Edit kernel routing tables

Options:
    -n  Don't resolve names
    -e  Display other/more information
    -A inet Select address family

# route -e
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
68.28.145.69    *               255.255.255.255 UH        0 0          0 ppp0
68.28.145.69    *               255.255.255.255 UH        0 0          0 ppp0
192.168.2.0     *               255.255.255.0   U         0 0          0 eth0
default         68.28.145.69    0.0.0.0         UG        0 0          0 ppp0

#############

[  900.682396] [WIFI] Device powering ON
[  900.682448] [WIFI] GPIO_BT_WLAN_REG_ON = 1
[  900.685150] [BT] GPIO_BT_HOST_WAKE = 1
[  900.685179] [BT] wake_lock timeout = 5 sec
[  900.790723] [WIFI] GPIO_WLAN_RST_N = 1
[  900.902597] sdhci_s3c_force_presence_change : 
sdhci_s3c_force_presence_change called
[  900.906669] 
[  900.906696] Dongle Host Driver, version 4.218.223.0
[  900.906735] Compiled in /home/necrosan/root/src/modules/bcm4329/src on Oct 
24 2010 at 03:09:05
[  901.100244] kimhyuns mmc_rescan hostindex=1
[  901.100357] kimhyuns mmc_rescan host->bus_ops == NULL 
[  901.130480] mmc_attach_sdio: [mmc1] Set MMC Clock to 24MHz
[  901.150957] mmc1: new SDIO card at address 0001
[  901.181305] dhd_customer_oob_irq_map: customer specific Host GPIO number is 
(102)
[  901.184073] F1 signature read @0x18000000=0x9934329
[  901.198060] DHD: dongle ram size is set to 294912(orig 294912)
[  901.324833] dhdsdio_write_vars: Download, Upload and compare of NVRAM 
succeeded.
[  901.547027] eth0 (): not using net_device_ops yet
[  901.559403] eth0: Broadcom Dongle Host Driver mac=00:90:4c:c5:00:34
[  901.562521] eth0: set promisc 0 failed
[  901.569297] eth0: set promisc 0 failed
[  904.958694] 
[  904.958711]  wl_iw_process_private_ascii_cmd: ASCII_CMD: offs_0:ASCII_CMD=   

ASCII_CMD=AP_CFG,SSID=AndroidTether,SEC=open,KEY=85ce956c3421ab4103da8aa6d186ac5
a391320e7e377ca9ddd6cdde8dc0a5573,CHANNEL=7,PREAMBLE=0,MAX_SCB=8,END, offset_32:
[  904.958761] 
'ASCII_CMD=AP_CFG,SSID=AndroidTether,SEC=open,KEY=85ce956c3421ab4103da8aa6d186ac
5a391320e7e377ca9ddd6cdde8dc0a5573,CHANNEL=7,PREAMBLE=0,MAX_SCB=8,END'
[  904.958835]  AP_CFG 
[  904.958884] wl_iw: set ap profile:
[  904.958904]  ssid = 'AndroidTether'
[  904.958920]  security = 'open'
[  904.958937]  key = 
'85ce956c3421ab4103da8aa6d186ac5a391320e7e377ca9ddd6cdde8dc0a5573'
[  904.958962]  channel = 7
[  904.959011]  max scb = 8
[  904.961698] wl_iw_event: dev is null
[  905.092818] set_ap_cfg exit with 0
[  905.092903] wl0.1 (): not using net_device_ops yet
[  905.106783] wl0.1: Broadcom Dongle Host Driver mac=00:90:4c:c5:00:34
[  905.756873] 
[  905.756888]  wl_iw_process_private_ascii_cmd: ASCII_CMD: offs_0:ASCII_CMD=   

ASCII_CMD=AP_BSS_START,SSID=AndroidTether,SEC=open,KEY=85ce956c3421ab4103da8aa6d
186ac5a391320e7e377ca9ddd6cdde8dc0a5573,CHANNEL=7,PREAMBLE=0,MAX_SCB=8,END, 
offset_32:
[  905.756915] 
'ASCII_CMD=AP_BSS_START,SSID=AndroidTether,SEC=open,KEY=85ce956c3421ab4103da8aa6
d186ac5a391320e7e377ca9ddd6cdde8dc0a5573,CHANNEL=7,PREAMBLE=0,MAX_SCB=8,END'
[  905.756947] 
[  905.756952]  SOFTAP - ENABLE BSS 
[  905.756961] 
[  905.756965] !!! got 'WL_AP_EN_BSS' from WPA supplicant, dev:eth0
[  905.756980] 
[  905.756986] setting SOFTAP security mode:
[  905.756995] wl_iw: set ap profile:
[  905.757004]  ssid = 'AndroidTether'
[  905.757012]  security = 'open'
[  905.757020]  key = 
'85ce956c3421ab4103da8aa6d186ac5a391320e7e377ca9ddd6cdde8dc0a5573'
[  905.757034]  channel = 7
[  905.757041]  max scb = 8
[  905.759048] =====================
[  905.759076]  wsec & wpa_auth set 'OPEN', result:&d 0
[  905.759087] =====================
[  905.760325] AP UP 16
[  905.861005] iwpriv_en_ap_bss done with res 0 
[  906.195597] init: untracked pid 3021 exited
[  911.725087] eth0: no IPv6 routers present
[  913.069168] wl_iw_ioctl: error in cmd=8b03 : not supported
[  913.119525] wl_iw_ioctl: error in cmd=8b09 : not supported
[  913.131740] wl_iw_ioctl: error in cmd=8b03 : not supported
[  913.155041] wl_iw_ioctl: error in cmd=8b09 : not supported
[  915.995112] wl0.1: no IPv6 routers present

Original comment by necro...@gmail.com on 24 Oct 2010 at 8:56

GoogleCodeExporter commented 9 years ago
To be honest ... I don't know what's going on here - I haven't had time to 
check your bcm4329-sources.

If you like we can share the source-code of our "ultra_bcm_config"-tool. 

Original comment by harald....@gmail.com on 6 Dec 2010 at 7:43

GoogleCodeExporter commented 9 years ago
Mmmh. Are you still interesting in getting that to work?
If yes, please let me know ... I don't have a samsung-device available for 
testing

Original comment by harald....@gmail.com on 10 Jan 2011 at 7:56

GoogleCodeExporter commented 9 years ago
I also have an intercept and would love to get this working. I don't know how 
to compile stuff,but my intercept is rooted and running a custom rom,and I have 
ubuntu 64bit on my laptop,so with instructions,I can do testing if still needed.

Original comment by Raymonddull on 19 Jan 2011 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by harald....@gmail.com on 30 Jan 2011 at 9:27

GoogleCodeExporter commented 9 years ago
i got this phone working using the samsung galaxy endulge profile no issues 
except crash at turning off tether.

Original comment by danil1...@gmail.com on 24 Sep 2011 at 10:59

GoogleCodeExporter commented 9 years ago
btw it was 3.1 beta 1 i got it working under no other 3.1 beta worked

Original comment by danil1...@gmail.com on 26 Sep 2011 at 1:05