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
Related
Domain Name System / Server is the one which takes care of translating the human readable domain names into machine understandable IP addresses. If you are not able to access a particular set of websites either from your laptop /phone, DNS server could be a reason for it. To fix the problem, one has to change the network configurations to use some of the popular DNS servers like Open DNS or Google’s public DNS. On Android phones, changing the DNS server is easy if you are using the static IP. You can do it from Settings > Wireless & network settings > Wi-Fi settings > Advanced (from menu) > check the ‘Use static IP’ option. After that, you will be able to change the DNS servers. However, when you are using dynamic IP (which will be the case most likely), the process is not straight forward. DNS server details will be taken from the DHCP server which assigns the IP.
Here are the steps to be followed to change the (WIFI Connection) DNS servers:
- Android system chooses the DNS servers using the script located at “/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf”
- By default, /system partition is mounted as read-only. Need to re-mount the same in re-write mode.
- Take a backup of the script. Download the modified version of the script from here (http://varun-scratchpad.googlecode.com/svn/trunk/static/20-dns.conf). The modified script has two additional lines which will override the DNS server changes. The modified script uses the Google’s public DNS.
- Changes will be applied after restarting the connection /device.
3G Connection:
- Download the wrapper script from here (http://varun-scratchpad.googlecode.com/svn/trunk/static/change-dns.sh) This wraps all the commands needed for changing the DNS server in a shell script.
- Download and install an interpreter for executing your shell script from your phone (e.s. scripter from Rom Toolbox)
- Launch the script. Grant the Super permission when asked.
- You just have to run this script whenever you are connecting to your mobile network.
Done. You settings are proper by visiting http://welcome.opendns.com. Remember, the settings will be applicable only for the current session.
By: http://blog.varunkumar.me/2010/09/how-to-change-dns-server-on-android.html?m=1
Or use Set DNS from Market
lol.. I cover my head with ashes!!!
I didn't know about these apps... I apologize!!!
uffapple said:
lol.. I cover my head with ashes!!!
I didn't know about these apps... I apologize!!!
Click to expand...
Click to collapse
your work isn't useless.. it tell me how it work.. thanks
Help
Help, after i did this i can't connect to Wi-Fi anymore. I copied the old 20-dns file and nothing u_u. Pls help
Override DNS for KitKat
uffapple said:
Domain Name System / Server is the one which takes care of translating the human readable domain names into machine understandable IP addresses. If you are not able to access a particular set of websites either from your laptop /phone, DNS server could be a reason for it. To fix the problem, one has to change the network configurations to use some of the popular DNS servers like Open DNS or Google’s public DNS. On Android phones, changing the DNS server is easy if you are using the static IP. You can do it from Settings > Wireless & network settings > Wi-Fi settings > Advanced (from menu) > check the ‘Use static IP’ option. After that, you will be able to change the DNS servers. However, when you are using dynamic IP (which will be the case most likely), the process is not straight forward. DNS server details will be taken from the DHCP server which assigns the IP.
Here are the steps to be followed to change the (WIFI Connection) DNS servers:
- Android system chooses the DNS servers using the script located at “/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf”
- By default, /system partition is mounted as read-only. Need to re-mount the same in re-write mode.
- Take a backup of the script. Download the modified version of the script from here (http://varun-scratchpad.googlecode.com/svn/trunk/static/20-dns.conf). The modified script has two additional lines which will override the DNS server changes. The modified script uses the Google’s public DNS.
- Changes will be applied after restarting the connection /device.
3G Connection:
- Download the wrapper script from here (http://varun-scratchpad.googlecode.com/svn/trunk/static/change-dns.sh) This wraps all the commands needed for changing the DNS server in a shell script.
- Download and install an interpreter for executing your shell script from your phone (e.s. scripter from Rom Toolbox)
- Launch the script. Grant the Super permission when asked.
- You just have to run this script whenever you are connecting to your mobile network.
Done. You settings are proper by visiting http://welcome.opendns.com. Remember, the settings will be applicable only for the current session.
By: http://blog.varunkumar.me/2010/09/how-to-change-dns-server-on-android.html?m=1
Click to expand...
Click to collapse
Thank you for sharing, but I have to say that the "setprop" method does not work on KitKat (I'm talking about mobile connections).
I wrote an app called "Override DNS for KitKat" to solve this issue. It's on the Play Store.
There's a much more reliable and easier method. Just use this as AFWall custom script or use manually in init.d (replace '$IPTABLES' with 'iptables' and just use the last 2 lines).
Code:
$IPTABLES -t nat -D OUTPUT -p tcp --dport 53 -j DNAT --to-destination 208.67.222.222:53 || true
$IPTABLES -t nat -D OUTPUT -p udp --dport 53 -j DNAT --to-destination 208.67.222.222:53 || true
$IPTABLES -t nat -I OUTPUT -p tcp --dport 53 -j DNAT --to-destination 208.67.222.222:53
$IPTABLES -t nat -I OUTPUT -p udp --dport 53 -j DNAT --to-destination 208.67.222.222:53
DualJoe said:
There's a much more reliable and easier method. Just use this as AFWall custom script or use manually in init.d (replace '$IPTABLES' with 'iptables' and just use the last 2 lines).
Code:
$IPTABLES -t nat -D OUTPUT -p tcp --dport 53 -j DNAT --to-destination 208.67.222.222:53 || true
$IPTABLES -t nat -D OUTPUT -p udp --dport 53 -j DNAT --to-destination 208.67.222.222:53 || true
$IPTABLES -t nat -I OUTPUT -p tcp --dport 53 -j DNAT --to-destination 208.67.222.222:53
$IPTABLES -t nat -I OUTPUT -p udp --dport 53 -j DNAT --to-destination 208.67.222.222:53
Click to expand...
Click to collapse
The "iptables" commands also works good on my Nexus 4 and Slimkat, thank you!
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....
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"?
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
I am using Android 10 on a custom device (Variscite imx8). The Android image has been generated by AOSP.
I need to forward the traffico from the eth0 to the ppp0 (Quectel LTE module) interface.
I've managed to enable the ppp0 interface by using the pppd script (i.e.: pppd call my-connection-info) and I can see that I receive the two DNS server addresses and my public IPv4 successfully.
Now the first weird thing: If I ping to 8.8.8.8 I receive "connect: Network is unreachable" meanwhile if I specify the ppp0 interface with ping -I ppp0 8.8.8.8 I can successfully ping the target. I've added the following routing table with priority 25000 so that I'm able to ping 8.8.8.8 without specifying the interface:
Code:
ip rule add prio 250000 from all lookup 25000
ip rule add table 25000 default via <my-public-ip> dev ppp0
Now I want to forward the eth0 traffic to the ppp0, to do so I've tried the following commands:
Code:
$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
But the PC on the other end of the eth0 interfce still prompts "From 192.168.10.1 icmp_seq=xxx Destination Net Unreachable" where 192.168.10.1 address is the Android device (which acts like a gateway).
This is the content of netstat -rn command:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.64.64.64 0.0.0.0 UG 0 0 0 ppp0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
This is the output of netstat -rn:
Code:
default via 10.64.64.64 dev ppp0
10.64.64.64 dev ppp0 proto kernel scope link src <my-public-ip>
192.168.10.0/24 dev eth0 proto kernel scope link src 192.168.10.1
This is the output of iptables -L (which I've flushed with iptables -F, iptables -X and iptables -t nat -F):
Code:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Which is the issue here? Thank you.