[Q] adhoc network problem - Nexus 4 Q&A, Help & Troubleshooting

I have android 4.2.2 ,Nexus 4 I would like to setup adhoc network . Firstly I rooted the device, secondly I tried to create adhoc network in android phone : I create ad hoc network in an android smartphone like below:
[email protected]:/ # ip link set dev wlan0 down
[email protected]:/ # iwconfig wlan0 mode ad-hoc
[email protected]:/ # iwconfig wlan0 channel 6
[email protected]:/ # iwconfig wlan0 essid 'Test1'
[email protected]:/ # ip link set dev wlan0 up
[email protected]:/ # ifconfig wlan0 192.168.65.129
when I typed iwconfig wlan0: the result is:
Qcom:802.11n ESSID:"Test1"
Mode:Ad-Hoc Frequency:2.437 GHz Cell: 02:82:5F:C1:4B:C1
Bit Rate=0 kb/s Tx-Power=0 dBm
RTS thr=2347 B Fragment thr=8000 B
Encryption keyff
Secondly, in my laptop ,I could see "Test1",so I did connect to "Test1" and I configure static ip address 192.168.65.128. in this case ,the smartphone create the ad hoc network and my laptop join it,then I can ping from my laptop to mobile and vice-versa.
However,in other case when : my laptop create ad hoc network
and later in an android mobile ,I tried to join it :
[email protected]:/ # iwconfig wlan0 mode ad-hoc
[email protected]:/ # iwconfig wlan0 channel 6
[email protected]:/ # iwconfig wlan0 essid 'Test1'
But,when I type iwconfig wlan0 ,essid still off/any
Qcom:802.11n ESSIDff/any
Mode:Ad-Hoc Frequency:2.437 GHz Cell: Not-Associated
Bit Rate:0 kb/s Tx-Power=0 dBm
RTS thr=2347 B Fragment thr=8000 B
Encryption keyff
it seems that android mobile can create ad hoc network but can not join existing one.so the same result I found when I try to setup adhoc network between two android mobiles. can anybody tell me what it's wrong here,and if there is any possible solution.
I tried many methods to setup ad hoc network in android ,and only this method that it seems work,but it still something wrong that prevent android phone to join existing ad hoc network.

fadwa.ww said:
[email protected]:/ # iwconfig wlan0 mode ad-hoc
[email protected]:/ # iwconfig wlan0 channel 6
[email protected]:/ # iwconfig wlan0 essid 'Test1'
Click to expand...
Click to collapse
Did you forgot to execute "ip link set dev wlan0 up"?

Related

isdn > linux-pbx > SIP > BT-Bridge > XDA2

Hi,
today i received my first ISDN call on my MDA2
- get you ISDN-Card working under Linux
- install asterisk
- install bluez
- install brctr
- BluetoothGPS.cab
- install X-Lite on the XDA2
Code:
/etc/asterisk/modem.conf
[interfaces]
context=remote
driver=i4l
stripmsd=1
dialtype=tone
mode=immediate
msn=YourMSN
device => /dev/ttyI5
/etc/asterisk/sip.conf
[general]
[olli]
type=friend
username=olli
host=dynamic
canreinvite=no
add somthing like:
exten => 500,2,Dial(SIP/olli)
[from-sip]
exten => olli,1,Dial(SIP/olli)
exten => olli,2,Hangup
in the /etc/asterisk/extensions.conf
Give the XDA a static IP and connect to the
Bluez(0) Network Accesspoint.
Than configure the BT-Bridge:
Code:
modprobe usb-uhci
modprobe uhci
modprobe usbcore
mount /proc/bus/usb/
modprobe bluez
modprobe l2cap
modprobe bnep
modprobe sco
modprobe rfcomm
modprobe hci_usb
hcid
sdpd
pand -s -r NAP -M
ifconfig eth0 down
ifconfig eth0 0.0.0.0
ifconfig bnep0 0.0.0.0
brctl addbr pan0
ifconfig pan0 192.168.1.19
brctl addif pan0 eth0
brctl addif pan0 bnep0
route del default
route add default gw 192.168.1.1 dev pan0
brctl showmacs pan0
ping the XDA.
Install X-lite
configure:
user: olli (see sip.conf)
sip-proxy: IP of the astrisk server
mark sent internal IP
Now your can receive IP and PSTN calls.
PSTN by dialing your MSN+500 from any phone.
Has anybody an idea how to configure asterisk
to forward SIP-Calls from the xda to PSTN ?
bye Olli
The XDA a static IP and connect to the
Bluez Network Accesspoint. how is the other?
_________________
Ip pbx

[Guide] Mac Spoofing / Changing

After reading several posts on mac spoofing and having failed to find a working thread.I decided to fill in the gaps with my linux knowledge (however little of that I may have).
So this method seems to solve some issues I've seen (MAC not changing because device wasn't downed) in these threads:
http://forum.xda-developers.com/showthread.php?t=1385577
http://forum.xda-developers.com/showthread.php?t=902354
without editing the nvram.txt
I've tested the ip link method on my recently rooted Samsung Tab 2 7.0"
Changing your mac address:
Prerequisites:
*A rooted device
*Busybox
*Terminal emulator
*Turn wifi on from your device's menu, do not connect to any network.
*Open your terminal emulator, now type:
$su
#ip link
*This should list all networking interfaces, identify your wifi device, take note of the name. now:
#ip link set NAME down
#ip link set NAME address 00:11:22:33:44:55
#ip link set NAME up
I believe that when using ifconfig the procedure is as follows:
$su
#ifconfig
*Take note of the device name
#ifconfig NAME down
#ifconfig NAME hw ether 00:11:22:33:44:55
#ifconfig NAME up
After doing the above you can connect to the desired network normally, using the default / other user interfaces.
NOTE: The mac address will be reset when WIFI is switched off.
I have confirmed the ip link method to be working. i.e. transmitted mac address is the new / changed one!
Actually in my case (SGS) i had to restart wifi first and then (while it's starting) quickly change the MAC using:
Code:
busybox ifconfig wlan0 hw ether 00:11:22:33:44:55
Important: It must be done about 500ms after enabling wifi, otherwise it won't work.
If I change MAC when wifi is off it simply returns to the original during next start.
Worked on i9000 with CM9 / 10
pawci0 said:
Actually in my case (SGS) i had to restart wifi first and then (while it's starting) quickly change the MAC using:
Code:
busybox ifconfig wlan0 hw ether 00:11:22:33:44:55
Important: It must be done about 500ms after enabling wifi, otherwise it won't work.
If I change MAC when wifi is off it simply returns to the original during next start.
Worked on i9000 with CM9 / 10
Click to expand...
Click to collapse
So downing the interface before changing and uping afterwards doesn't work?
i want to learn well the mac spoofing
setoPul Wilcox
this is actually incredibly useful, I got MACblocked off a network near college. thanks!
Doesn't work for me
Code:
# su
# ifconfig tiwlan0 down
# ip link set tiwlan0 address 00:11:22:33:44:55
ip: SIOCSIFHWADDR: Operation not supported on transport endpoint
# ifconfig tiwlan0 hw ether 00:11:22:33:44:55
error: SIOCSIFADDR (Invalid argument)
I guess its a kernel/driver problem... at least I know it works on normal Linux systems.
Itcouldbeyou said:
Doesn't work for me
Code:
# su
# ifconfig tiwlan0 down
# ip link set tiwlan0 address 00:11:22:33:44:55
ip: SIOCSIFHWADDR: Operation not supported on transport endpoint
# ifconfig tiwlan0 hw ether 00:11:22:33:44:55
error: SIOCSIFADDR (Invalid argument)
I guess its a kernel/driver problem... at least I know it works on normal Linux systems.
Click to expand...
Click to collapse
Funny that only some manufacturers disable such features. You could always try editing the nvram file? I haven't tried it though.
Isnt it dangerous ?
Script to apply random mac
I've made a script to create a random ghost mac every time I run it on the terminal emulator with su.
Code:
macaddr="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"
ip link set wlan0 down
ip link set wlan0 address $macaddr
ip link set wlan0 up
I've named it as gmac.sh and saved it on /sdcard/, thus by running:
Code:
$ su
# sh /sdcard/gmac.sh
the mac is changed.
Regards :cyclops:
Works differently on HTC Desire
Hello,
This is just to "set in stone" somewhere in the Internet that on some devices, you need *not* to down and up the network interface. Otherwise, the network driver will restore its MAC address from hardware/driver settings.
On a HTC Desire, MAC spoofing works this way:
* turn on the wifi interface using the standard Android interface
* run this script :
Code:
macaddr="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"
ip link set wlan0 address $macaddr
Best regards,
On some devices (e.g. HTC Desire among others), the wifi GUI still resets the mac address even with the method described in this thread.
worstenbrood has modified the wifi driver so that the mac address can be configured from a text file. It is described here:
http://forum.xda-developers.com/showthread.php?t=1525230
This is compatible with the wifi GUI and solves the problem of the wifi interface reloading its original mac address.
Anyone interested, I have backported his modifications to the latest state of the kernel developement in CM7.
thanks!
I get a 'operation not supported on transport endpoint' error when running the 'ip link set wlan0 address 00:11:22:33:44:55' and a about the same error with busy box.
Thanks for this! Gonna try this later.
damien.courousse said:
Hello,
This is just to "set in stone" somewhere in the Internet that on some devices, you need *not* to down and up the network interface. Otherwise, the network driver will restore its MAC address from hardware/driver settings.
On a HTC Desire, MAC spoofing works this way:
* turn on the wifi interface using the standard Android interface
* run this script :
Code:
macaddr="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"
ip link set wlan0 address $macaddr
Best regards,
Click to expand...
Click to collapse
anyone help me mine Hcl me 2G 2.0 i can't change mac please help me....

[Q][GT-I9500][DNS] Set DNS on Samsung Galaxy S4 GT-I9500

Hi,
I have a problem on Android phone Samsung GT-I9500.
Samsumg GT-I9500 sends DNS requests to DNS server address obtained via DHCP. But it ignores setup changes in setprorp 1 and setprorp 2.
do it:
Code:
adb shell
# setprop net.dns1 <ip1>
# setprop net.dns2 <ip2>
How to change DNS server?
How to add DNS server?
Info:
Code:
[email protected]:/ # getprop |grep dns
getprop |grep dns
[dhcp.wlan0.dns1]: [192.168.1.1]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[net.change]: [net.dns1]
[net.dns.search]: []
[net.dns1]: [192.168.1.1]
[email protected]:/ # setprop net.dns1 8.8.8.8
setprop net.dns1 8.8.8.8
[email protected]:/ # setprop net.dns2 4.4.4.4
setprop net.dns2 4.4.4.4
[email protected]:/ # setprop dhcp.wlan0.dns1 8.8.8.8
setprop dhcp.wlan0.dns1 8.8.8.8
[email protected]:/ # getprop |grep dns
getprop |grep dns
[dhcp.wlan0.dns1]: [8.8.8.8]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[net.change]: [net.dns2]
[net.dns.search]: []
[net.dns1]: [8.8.8.8]
[net.dns2]: [4.4.4.4]
[email protected]ja3g:/ # ping google.com
[email protected]:/ # tcpdump -ns0 -i wlan0 'port 53'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:37:40.246226 IP 192.168.1.177.3551 > 192.168.1.1.53: 52272+ A? google.com. (28)
Baseband version
I9509XXUEMK8
Kernel version
3.4.5-2092849
[email protected] #1
Thu Nov 21 12:59:52 KST 2013
Build number
JSS15J.I9509XXUEMK8
--
Alexander
There is an option to set dbs in advanced settings of the wifi networks
Sent from my GT-I9500 using XDA Premium 4 mobile app
maxsam4 said:
There is an option to set dbs in advanced settings of the wifi networks
Click to expand...
Click to collapse
I have not found DNS.
In advanced options only:
- Proxy settings
- IP setings
KASRU said:
I have not found DNS.
In advanced options only:
- Proxy settings
- IP setings
Click to expand...
Click to collapse
Choose static ip settings and you will see the option to change dns.
I am attaching a screenshot for you
Feel free to hit the thanks button
Sent from my GT-I9500 using XDA Premium 4 mobile app
[Resolved]
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
With root privileges and a terminal app or (adb shell):
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device

[Q] USB Ethernet problem with Lollipop (GT-I9506)

Hi,
I'm trying to run my USB Ethernet dongle with my S4 LTE+ Lollipop D6, but aplications in the phone and other computers on the network didn't see that connection.
My tryings:
[email protected]:/ # netcfg eth0 up
[email protected]:/ # netcfg eth0 dhcp
[email protected]:/ # netcfg|grep eth0
eth0 UP 10.0.0.12/24 0x00001043 f0:25:b7:20:af:75
[email protected]:/ # ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.96 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=2.05 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=1.87 ms
[email protected]:/ # ping www.google.com
ping: unknown host www.google.com
2|[email protected]:/ # nslookup www.google.com
Server: 8.8.4.4
Address 1: 8.8.4.4 google-public-dns-b.google.com
Name: www.google.com
Address 1: 2a00:1450:4013:c01::93 ea-in-x93.1e100.net
Address 2: 74.125.136.104 ea-in-f104.1e100.net
Address 3: 74.125.136.103 ea-in-f103.1e100.net
Address 4: 74.125.136.99 ea-in-f99.1e100.net
Address 5: 74.125.136.105 ea-in-f105.1e100.net
Address 6: 74.125.136.147 ea-in-f147.
I've found this but it doesn't work also:
ndc network create 100
ndc network interface add 100 eth0
ndc network route add 100 eth0 <GATEWAY>/24
ndc network route add 100 eth0 0.0.0.0/0 <DNS1> <DNS2>
ndc resolver setnetdns 100 localdomain <DNS1> <DNS2>
ndc network default set 100
Any suggestions?
Thx
No body knows?
Hi
Have you tried this:
For Lollipop:
ndc resolver setnetdns eth0 "" 8.8.8.8 8.8.4.4​For Kitkat:
ndc resolver setifdns eth0 "" 8.8.8.8 8.8.4.4
ndc resolver setdefaultif eth0​Works for me on 5.1.1 (was able to ping 8.8.8.8 and 8.8.4.4 but not google.com. after typing this in the terminal, the ping worked !)

Porting Debian Buster to Samsung Galaxy S8+ (SM-G955F) Exynos

Hi there, I'm new to XDA so please bear with me.
I'm trying to port Debian Buster to the SM-G955F Exynos8955 model of the S8+ and I am currently testing in a chroot environment within TWRP terminal, but I can't get the WiFi working. My current configuration is:
/etc/network/interfaces
> auto wlan0
> iface wlan0 inet dhcp
> wpa-driver wext
> wpa-ssid [SSID]
> wpa-scan 1 # visible network
> wpa-proto RSN # WPA2
> wpa-pairwise CCMP # WPA2
> wpa-group CCMP # WPA2
> wpa-key-mgmt WPA-PSK
> wpa-psk $( wpa_passphrase [SSID] [KEY] | cut -d '=' -f2 | tr '\n' ';' | cut -d ';' -f4 ) # to get HEX value, not in actual config
EOF
# ifup wlan0
or
# ip link set wlan0 up
# dhclient
Neither commands are connecting the WiFi like it should, but I know that the drivers are loaded and that the interface is up.
Any ideas on what to check?
Cheers in advance.
HezuKame

Categories

Resources