Motorola V525 UK Vodafone Internet Access Point
Hi guys
I have a Midlet that makes an HttpConnection to a servlet to get some String data. It works perfectly well through the emulators, but not on my phone. Having read the forums I can see that this is probably because I have a WAP access point for my GPRS connection on the mobile. I rang Vodafone to ask them about how to set up an Internet access point via TCP/IP, but they were next to useless. So anyone know how to set up an Internet APN for Vodafone on a Motorola V525 ?!?
Thanks
K
ps. If you know another way to get data from a server that doesn't involve an HttpConnection, that would be great also.
Hi Killuminati.
The settings you need are for the Vodafone Internet APN, as below:
Access Point (APN) address : internet
Username : web
Password: web
(note that these are all case sensitive)
You may also need to explicitly set the DNS server (I can't remember if you actually need to do this or not):
DNS Server: 212.183.137.012
Ok, now that may be enough for it to work. If you are still having problems however, then you need to phone Vodafone, as we've found that some people need to get access to the Internet access point explictly turned on for their account.
This can be tricky, and has taken us from between 5 mins, and 2 days to get sorted out, depending on whether the person on the end of the phone knows what they're talking about or not!
Explain to them (slowly!) that you need to have access to the Internet GPRS Access point turned on for your phone (explain if necessary that you already have access to the WAP Access point but that is different.
Once you find someone that actually understands what you're talking about, it should then be a 5 minute job for them to activate it for your account. You then turn your phone off & back on, and you should then be up & running (after ensuring your phone is set up to use the Internet Access Point instead of the WAP one of course).
Hope that's of help.
Cheers,
Neal.
Similar Messages
-
E6 - Internet Access point issue
OK... Here's my first portential bug identification from Nokia E6.
I use mFE for my office email. I have Home WLAN as Priority 1 and EGPRS as Priority 2 as Internet Access pointsand have the Connectivity settings option Switch to WLAN set for "Known WLANs only".
Now often I see the EGPRS is active despite I have strong WLAN signal at my home.
Grrr... my data charges will go high because of this....
Does any other Nokia E6 user face similar issue?@ Since_6110,
If so, the network packet data connection is being used by another application
So under Connectivity > Settings > Destinations you have a destination called "Internet" (the default name for the first destination), and it has your home WLAN as Priority: 1 and your network provider's packet data at Priority: 2 ? YES
And in MfE under Advance Settings, the Access point specified is "Internet" (or the same Destination mentioned above)? YES
==========
Being a technical person myself closely associated with Mobiles, I have checked everything before making this post here. -
How to detect a Wireless Internet access point (Legally)
When I am using my new Macbook Pro at a hotel that has an open and free wireless network, what do I do to note that it is there? What do I bring up to be able connect to it?
I was just at a hospital that friends (there) told me had open and free local wireless access but I could find nothing from the Airport icon/window.
Normally, at home, I am connecting through my Airport Extreme which, in turn, is connected to the DSL Router. Once I leave home, that icon, on the batr at the top of the screen, is greyed out.
MacBook Pro 2.16 dual-core Mac OS X (10.4.7) Airport ExtremeFrobozz,
You can control (somewhat) the behavior of wireless connectivity through the Network preference pane (in System Preferences), under Airport. In general, with the default settings, the computer will keep track of all of the networks that you connect to and will re-connect to these automatically. When an unknown open network is available, the computer should ask if you want to join it.
If you know that you are in the vicinity of an open wireless network, select the Airport (antenna) icon in the menu bar and the name of the network should be selectable. If there is nothing showing then perhaps the airport card is turned off or needs to be coaxed back to life by re-booting. If you want another method of checking for wireless networks you could download a widget such as Airport Radar from <http://www.apple.com/downloads/dashboard/>.
bd -
Can the iphone 5c be used as a router to connect my laptop to the internet???
Yes, but it depends on what plan you have.
What plan name do you have as stated on your bill. If it says More Everything, the hotspot functionality is already included. -
Can someone post s40 v6 access point wml?
Hi,
i use a nokia c3-01. I cant use email on my nokia as in the commercials suggested because my provider needs proxy settings. For the standardinstalled Internetbrowser i can configure a alternative account but the standard email prog just support wlan or access point. and in the nokia s40 v6 menu there seems to be no possibilty to configure access points with proxy.
Does someone have a wml example for nokia s40 v6 to get access point for the email prog in nokia c3-01 with proxy?
I found a WML-Example for Nokia s40 v5 but the c3-01 does not acceppt and does not show the access point after senden the generated .prov file to the c3-01. If someone needs help how to convert a wml to .prov i can help if needed.
heres the access point with proxy wml example for s40 v5:
<?xml version="1.0"?>
<!DOCTYPE wap-provisioningdoc PUBLIC "-//WAPFORUM//DTD PROV 1.0//EN"
"http://www.wapforum.org/DTD/prov.dtd">
<wap-provisioningdoc version="1.0">
<!-- This WML doc created by Ravi Mathur, January 12 2008 -->
<!-- HowardForums username: ravidavi -->
<characteristic type="BOOTSTRAP">
<!-- Name of the configuration -->
<parm name="NAME" value="Bild Postpaid JAVA"/>
</characteristic>
<!-- Defines how network access occurs -->
<characteristic type="ACCESS">
<parm name="RULE" value="Default Rule"/>
<!-- Connect through specified proxy -->
<parm name="TO-PROXY" value="BildProxy"/>
</characteristic>
<!-- Defines proxy parameters -->
<characteristic type="PXLOGICAL">
<parm name="PROXY-ID" value="BildProxy"/>
<parm name="NAME" value="Bild Proxy"/>
<characteristic type="PXPHYSICAL">
<parm name="PHYSICAL-PROXY-ID" value="Bild Proxy"/>
<parm name="PXADDR" value="139.7.29.1"/>
<parm name="PXADDRTYPE" value="IPV4"/>
<parm name="PUSHENABLED" value="0"/>
<characteristic type="PORT">
<parm name="PORTNBR" value="80"/>
</characteristic>
<!-- Connect through specified access point -->
<parm name="TO-NAPID" value="BildNAP"/>
</characteristic>
</characteristic>
<!-- Defines Network Access Point (NAP) parameters -->
<characteristic type="NAPDEF">
<parm name="NAPID" value="BildNAP"/>
<parm name="NAME" value="Bild NAP"/>
<parm name="BEARER" value="GSM-GPRS"/>
<parm name="NAP-ADDRESS" value="access.vodafone.de"/>
<parm name="NAP-ADDRTYPE" value="APN"/>
<characteristic type="NAPAUTHINFO">
<!-- PAP is "normal" authentication -->
<parm name="AUTHTYPE" value="PAP"/>
<parm name="AUTHNAME" value="Bild"/>
<parm name="AUTHSECRET" value="Bild123"/>
</characteristic>
</characteristic>
<characteristic type="APPLICATION">
<parm name="APPID" value="x-midlet"/>
<parm name="TO-PROXY" value="BildProxy"/>
<parm name="NAME" value="Bild Proxy"/>
</characteristic>
</wap-provisioningdoc>
thank you
MWI added one access point in settings and my email is working now.
I've done below steps, you could try to modify to your internet access point.
Menu->Settings->Configuration->Personal config. sett.->Options->Add new->Access point Account name: VFNZ internet Access point settings: Data bearer: Packet data Bearer settings: Packet data acc. pt.: www.vodafone.net.nz others keep the default values. Then back to the personal accounts and activate the VFNZ internet from Options.
Ovi Store can be accessed normally. -
How to get a HttpConnection by a WAP access point over GPRS
Generally,every phone's WAP browser can get to every wap site by a WAP access point,and every phone can get a connection by an internet access point in J2ME too.
But in J2ME,If APN configuration is a WAP access point,Nokia3100/6100/3650 can be successful to get a connection generally,and SonyEricsson's phone don't work.
I'm in Philippines and use Globe Telecom's SIM card.Globe's WAP APN is "www.globe.com.ph/ewap.globe.com.ph", and internet APN is "www.globe.com.ph".
If APN configuration is a WAP access point(www.globe.com.ph),My phone(SonyEricsson's P910C) don't work.
following code:
HttpConnection conn = (HttpConnection) Connector.open(url, Connector.READ_WRITE, true);
conn.setRequestProperty("Connection", "close");
conn.setRequestMethod(HttpConnection.GET);
conn.setRequestProperty("User-Agent","Profile/MIDP-2.0, Configuration/CLDC-1.0");
InputStream is = new DataInputStream(c.openInputStream());
How to do to be able to make every phone get a connection by a WAP access point(www.globe.com.ph) in Philippines.
For example, In China, I can set proxy property to make every phone work by a WAP access point(CMWAP).
following code:
//"10.0.0.172" is China Mobile's WAP gateway proxy
HttpConnection conn = (HttpConnection) Connector.open("http://10.0.0.172:80"+URI, Connector.READ_WRITE, true);
conn.setRequestProperty("X-Online-Host", host);
is = conn.openInputStream();
Reference:
http://www.reqwireless.com/apns.html
http://forum.java.sun.com/thread.jspa?forumID=76&threadID=509365
http://forum.java.sun.com/thread.jspa?forumID=76&threadID=538294i can load my jar file in my mobile through live IP.
it works properly when simple text,list, or any features of the MIDP
or j2me but when i call the servlet from midlet at that time
"java.io.exception' is fired on the mobile ...
so please help me for that.
why it gives us an error like this .?
we used live ip for the communication but it gives error like this.
i also run the application on emulator it works properly through
the live IP but when i access from jar file in the mobile it gives
me error.
plz help me.
if u have any contact no then tell me . i can call u later on.
my mobile no is 9879236686
my mail address is [email protected]
u can call me also any time. -
I have a 5800 with v3.0 firmware.
I am having trouble internet browsing
At times it will connect perfectly
and then other times it will not connect at all and gives messages like:
Service is not part of active profile
Gateway time out
and something about Data packet bearer.
I have downloaded settings from my carrier and tried connection wizard in settings.
It seems if I don`t use it for a while it will coinnect most times but if I try to browse again after 5-10 mins it won`t.
Any ideas.Hmm, playing around with my 5800, it seems a bit different for me. Opening the internet access point, I highlight the one I want to move up to the first priority, select options>organize>change priority, then tap on the top of the list (priority 1). This would would the highlighted item to the top of the list. The same method could be used to move a selection to second or third or whatever priority.
If you find my post helpful please click the green star on the left under the avatar. Thanks. -
I just found something quite weird when using Maps on my N82.
If I set the default access point to a configured WLAN and I set 'Go Online at Startup' to no, or if the WLAN is not available, then when I go and select 'Tools/Go Online' it automatically changes the default access point to the mobile providers on air internet access point.
So since I have downloaded all the maps for my area I was planning to leave the internet access off mostly, but should I come to turn it on, it will completely ignore the WLAN default setting and go straight to the mobile network therefore costing me money, and not only, it will change the default to this and leave it like that for next time.
Is there anyway to prevent this behaviour?
And ideally in general, is there any way to congure a set of access points to try in order e.g. try my home WLAN first, my work WLAN second and then the mobile network third? As far as I am concerned once it has asked me if it can go online I don't want to have to select the access point each time, I would rather it attempts a WLAN if possible and then if not goes mobile all without asking me.
Any thoughts appreciated.I'm kinda in the same situtation, anyway I think it just follows the access points priority on the phone. I was able to use wi-fi in the offline mode (of the mobile)!
-
[script] create_ap: Create a NATed or Bridged WiFi Access Point
This script use hostapd + dnsmasq + iptables to create a NATed Access Point OR hostapd + brctl + dhclient to create a bridged Access Point.
The default behavior is a NATed Access Point.
updated script will be here: https://github.com/oblique/create_ap and http://git.2f30.org/create_ap/
Examples
No passphrase (open network):
./create_ap wlan0 eth0 MyAccessPoint
OR
echo -e "MyAccessPoint" | ./create_ap wlan0 eth0
WPA + WPA2 passphrase:
./create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
OR
echo -e "MyAccessPoint\nMyPassPhrase" | ./create_ap wlan0 eth0
AP without Internet sharing:
./create_ap -n wlan0 MyAccessPoint MyPassPhrase
Bridged Internet sharing:
./create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
Internet sharing from the same WiFi interface:
./create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
Usage
Usage: create_ap [options] <wifi-interface> [<interface-with-internet>] [<access-point-name> [<passphrase>]]
Options:
-h, --help Show this help
-c <channel> Channel number (default: 1)
-w <WPA version> Use 1 for WPA, use 2 for WPA2, use 1+2 for both (default: 1+2)
-n Disable Internet sharing (if you use this, don't pass
the <interface-with-internet> argument)
-m <method> Method for Internet sharing.
Use: 'nat' for NAT (default)
'bridge' for bridging
'none' for no Internet sharing (equivalent to -n)
--hidden Make the Access Point hidden (do not broadcast the SSID)
--ieee80211n Enable IEEE 802.11n (HT)
--ht_capab <HT> HT capabilities (default: [HT40+])
--driver Choose your WiFi adapter driver (default: nl80211)
--no-virt Do not create virtual interface
Non-Bridging Options:
-g <gateway> IPv4 Gateway for the Access Point (default: 192.168.12.1)
-d DNS server will take into account /etc/hosts
Useful informations:
* If you're not using the --no-virt option, then you can create an AP with the same
interface you are getting your Internet connection.
* You can pass your SSID and password through pipe or through arguments (see examples).
Examples:
create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
echo -e 'MyAccessPoint\nMyPassPhrase' | create_ap wlan0 eth0
create_ap wlan0 eth0 MyAccessPoint
echo 'MyAccessPoint' | create_ap wlan0 eth0
create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
create_ap -n wlan0 MyAccessPoint MyPassPhrase
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
create_ap --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase
Code
#!/bin/bash
# general dependencies:
# bash (to run this script)
# util-linux (for getopt)
# hostapd
# iproute2
# iw
# iwconfig (you only need this if 'iw' can not recognize your adapter)
# haveged (optional)
# dependencies for 'nat' or 'none' Internet sharing method
# dnsmasq
# iptables
# dependencies for 'bridge' Internet sharing method
# bridge-utils
usage() {
echo "Usage: $(basename $0) [options] <wifi-interface> [<interface-with-internet>] [<access-point-name> [<passphrase>]]"
echo
echo "Options:"
echo " -h, --help Show this help"
echo " -c <channel> Channel number (default: 1)"
echo " -w <WPA version> Use 1 for WPA, use 2 for WPA2, use 1+2 for both (default: 1+2)"
echo " -n Disable Internet sharing (if you use this, don't pass"
echo " the <interface-with-internet> argument)"
echo " -m <method> Method for Internet sharing."
echo " Use: 'nat' for NAT (default)"
echo " 'bridge' for bridging"
echo " 'none' for no Internet sharing (equivalent to -n)"
echo " --hidden Make the Access Point hidden (do not broadcast the SSID)"
echo " --ieee80211n Enable IEEE 802.11n (HT)"
echo " --ht_capab <HT> HT capabilities (default: [HT40+])"
echo " --driver Choose your WiFi adapter driver (default: nl80211)"
echo " --no-virt Do not create virtual interface"
echo
echo "Non-Bridging Options:"
echo " -g <gateway> IPv4 Gateway for the Access Point (default: 192.168.12.1)"
echo " -d DNS server will take into account /etc/hosts"
echo
echo "Useful informations:"
echo " * If you're not using the --no-virt option, then you can create an AP with the same"
echo " interface you are getting your Internet connection."
echo " * You can pass your SSID and password through pipe or through arguments (see examples)."
echo
echo "Examples:"
echo " $(basename $0) wlan0 eth0 MyAccessPoint MyPassPhrase"
echo " echo -e 'MyAccessPoint\nMyPassPhrase' | $(basename $0) wlan0 eth0"
echo " $(basename $0) wlan0 eth0 MyAccessPoint"
echo " echo 'MyAccessPoint' | $(basename $0) wlan0 eth0"
echo " $(basename $0) wlan0 wlan0 MyAccessPoint MyPassPhrase"
echo " $(basename $0) -n wlan0 MyAccessPoint MyPassPhrase"
echo " $(basename $0) -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase"
echo " $(basename $0) --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase"
# it takes 2 arguments
# returns:
# 0 if v1 (1st argument) and v2 (2nd argument) are the same
# 1 if v1 is less than v2
# 2 if v1 is greater than v2
version_cmp() {
[[ ! $1 =~ ^[0-9]+(\.[0-9]+)*$ ]] && die "Wrong version format!"
[[ ! $2 =~ ^[0-9]+(\.[0-9]+)*$ ]] && die "Wrong version format!"
V1=( $(echo $1 | tr '.' ' ') )
V2=( $(echo $2 | tr '.' ' ') )
VN=${#V1[@]}
[[ $VN -lt ${#V2[@]} ]] && VN=${#V2[@]}
for ((x = 0; x < $VN; x++)); do
[[ ${V1[x]} -lt ${V2[x]} ]] && return 1
[[ ${V1[x]} -gt ${V2[x]} ]] && return 2
done
return 0
USE_IWCONFIG=0
is_wifi_interface() {
which iw > /dev/null 2>&1 && iw dev $1 info > /dev/null 2>&1 && return 0
if which iwconfig > /dev/null 2>&1 && iwconfig $1 > /dev/null 2>&1; then
USE_IWCONFIG=1
return 0
fi
return 1
get_phy_device() {
for x in /sys/class/ieee80211/*; do
[[ ! -d "$x" ]] && continue
if [[ "${x##*/}" = "$1" ]]; then
echo $1
return 0
elif [[ -e "$x/device/net/$1" ]]; then
echo ${x##*/}
return 0
elif [[ -e "$x/device/net:$1" ]]; then
echo ${x##*/}
return 0
fi
done
echo "Failed to get phy interface" >&2
return 1
get_adapter_info() {
PHY=$(get_phy_device "$1")
[[ $? -ne 0 ]] && return 1
iw phy $PHY info
can_have_sta_and_ap() {
# iwconfig does not provide this information, assume false
[[ $USE_IWCONFIG -eq 1 ]] && return 1
get_adapter_info "$1" | grep -E '{.* managed.* AP.*}' > /dev/null 2>&1 && return 0
get_adapter_info "$1" | grep -E '{.* AP.* managed.*}' > /dev/null 2>&1 && return 0
return 1
can_have_ap() {
# iwconfig does not provide this information, assume true
[[ $USE_IWCONFIG -eq 1 ]] && return 0
get_adapter_info "$1" | grep -E '\* AP$' > /dev/null 2>&1 && return 0
return 1
can_transmit_to_channel() {
IFACE=$1
CHANNEL=$2
if [[ $USE_IWCONFIG -eq 0 ]]; then
CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep "MHz \[${CHANNEL}\]")
[[ -z "${CHANNEL_INFO}" ]] && return 1
[[ "${CHANNEL_INFO}" == *no\ IR* ]] && return 1
[[ "${CHANNEL_INFO}" == *disabled* ]] && return 1
return 0
else
CHANNEL=$(printf '%02d' ${CHANNEL})
CHANNEL_INFO=$(iwlist ${IFACE} channel | grep "Channel ${CHANNEL} :")
[[ -z "${CHANNEL_INFO}" ]] && return 1
return 0
fi
is_wifi_connected() {
if [[ $USE_IWCONFIG -eq 0 ]]; then
iw dev "$1" link 2>&1 | grep -E '^Connected to' > /dev/null 2>&1 && return 0
else
iwconfig "$1" 2>&1 | grep -E 'Access Point: [0-9a-fA-F]{2}:' > /dev/null 2>&1 && return 0
fi
return 1
get_macaddr() {
ip link show "$1" | grep ether | grep -Eo '([0-9a-f]{2}:){5}[0-9a-f]{2}[[:space:]]' | tr -d '[[:space:]]'
get_avail_bridge() {
for i in {0..100}; do
curr_bridge=$(brctl show | grep "br$i" | cut -s -f1)
if [[ -z $curr_bridge ]]; then
echo "br$i"
return
fi
done
get_new_macaddr() {
OLDMAC=$(get_macaddr "$1")
for i in {20..255}; do
NEWMAC="${OLDMAC%:*}:$(printf %02x $i)"
(ip link | grep "ether ${NEWMAC}" > /dev/null 2>&1) || break
done
echo $NEWMAC
ADDED_UNMANAGED=0
NETWORKMANAGER_CONF=/etc/NetworkManager/NetworkManager.conf
NM_OLDER_VERSION=1
networkmanager_exists() {
which nmcli > /dev/null 2>&1 || return 1
NM_VER=$(nmcli -v | grep -m1 -oE '[0-9]+(\.[0-9]+)*\.[0-9]+')
version_cmp $NM_VER 0.9.10
if [[ $? -eq 1 ]]; then
NM_OLDER_VERSION=1
else
NM_OLDER_VERSION=0
fi
return 0
networkmanager_is_running() {
networkmanager_exists || return 1
if [[ $NM_OLDER_VERSION -eq 1 ]]; then
NMCLI_OUT=$(nmcli -t -f RUNNING nm)
else
NMCLI_OUT=$(nmcli -t -f RUNNING g)
fi
[[ "$NMCLI_OUT" == "running" ]]
networkmanager_iface_is_unmanaged() {
nmcli -t -f DEVICE,STATE d | grep -E "^$1:unmanaged$" > /dev/null 2>&1
ADDED_UNMANAGED=
networkmanager_add_unmanaged() {
networkmanager_exists || return 1
[[ -d ${NETWORKMANAGER_CONF%/*} ]] || mkdir -p ${NETWORKMANAGER_CONF%/*}
[[ -f ${NETWORKMANAGER_CONF} ]] || touch ${NETWORKMANAGER_CONF}
if [[ $NM_OLDER_VERSION -eq 1 ]]; then
if [[ -z "$2" ]]; then
MAC=$(get_macaddr "$1")
else
MAC="$2"
fi
[[ -z "$MAC" ]] && return 1
fi
UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf | sed 's/unmanaged-devices=//' | tr ';,' ' ')
WAS_EMPTY=0
[[ -z "$UNMANAGED" ]] && WAS_EMPTY=1
for x in $UNMANAGED; do
[[ $x == "mac:${MAC}" ]] && return 2
[[ $NM_OLDER_VERSION -eq 0 && $x == "interface-name:${1}" ]] && return 2
done
if [[ $NM_OLDER_VERSION -eq 1 ]]; then
UNMANAGED="${UNMANAGED} mac:${MAC}"
else
UNMANAGED="${UNMANAGED} interface-name:${1}"
fi
UNMANAGED=$(echo $UNMANAGED | sed -e 's/^ //')
UNMANAGED="${UNMANAGED// /;}"
UNMANAGED="unmanaged-devices=${UNMANAGED}"
if ! grep -E '^\[keyfile\]' ${NETWORKMANAGER_CONF} > /dev/null 2>&1; then
echo -e "\n\n[keyfile]\n${UNMANAGED}" >> ${NETWORKMANAGER_CONF}
elif [[ $WAS_EMPTY -eq 1 ]]; then
sed -e "s/^\(\[keyfile\].*\)$/\1\n${UNMANAGED}/" -i ${NETWORKMANAGER_CONF}
else
sed -e "s/^unmanaged-devices=.*/${UNMANAGED}/" -i ${NETWORKMANAGER_CONF}
fi
ADDED_UNMANAGED="${ADDED_UNMANAGED} ${1} "
return 0
networkmanager_rm_unmanaged() {
networkmanager_exists || return 1
[[ ! -f ${NETWORKMANAGER_CONF} ]] && return 1
if [[ $NM_OLDER_VERSION -eq 1 ]]; then
if [[ -z "$2" ]]; then
MAC=$(get_macaddr "$1")
else
MAC="$2"
fi
[[ -z "$MAC" ]] && return 1
fi
UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf | sed 's/unmanaged-devices=//' | tr ';,' ' ')
[[ -z "$UNMANAGED" ]] && return 1
[[ -n "$MAC" ]] && UNMANAGED=$(echo $UNMANAGED | sed -e "s/mac:${MAC}\( \|$\)//g")
UNMANAGED=$(echo $UNMANAGED | sed -e "s/interface-name:${1}\( \|$\)//g")
UNMANAGED=$(echo $UNMANAGED | sed -e 's/ $//')
if [[ -z "$UNMANAGED" ]]; then
sed -e "/^unmanaged-devices=.*/d" -i ${NETWORKMANAGER_CONF}
else
UNMANAGED="${UNMANAGED// /;}"
UNMANAGED="unmanaged-devices=${UNMANAGED}"
sed -e "s/^unmanaged-devices=.*/${UNMANAGED}/" -i ${NETWORKMANAGER_CONF}
fi
ADDED_UNMANAGED="${ADDED_UNMANAGED/ ${1} /}"
return 0
networkmanager_rm_unmanaged_if_needed() {
[[ $ADDED_UNMANAGED =~ .*\ ${1}\ .* ]] && networkmanager_rm_unmanaged ${1}
networkmanager_wait_until_unmanaged() {
networkmanager_is_running || return 1
while ! networkmanager_iface_is_unmanaged "$1"; do
sleep 1
done
sleep 2
return 0
CHANNEL=1
GATEWAY=192.168.12.1
WPA_VERSION=1+2
ETC_HOSTS=0
HIDDEN=0
SHARE_METHOD=nat
IEEE80211N=0
HT_CAPAB='[HT40+]'
DRIVER=nl80211
NO_VIRT=0
CONFDIR=
WIFI_IFACE=
VWIFI_IFACE=
INTERNET_IFACE=
BRIDGE_IFACE=
OLD_IP_FORWARD=
OLD_BRIDGE_IPTABLES=
OLD_MACADDR=
cleanup() {
trap "" SIGINT
echo
echo "Doing cleanup..."
# exiting
for x in $CONFDIR/*.pid; do
# even if the $CONFDIR is empty, the for loop will assign
# a value in $x. so we need to check if the value is a file
[[ -f $x ]] && kill -9 $(cat $x)
done
rm -rf $CONFDIR
if [[ "$SHARE_METHOD" != "none" ]]; then
if [[ "$SHARE_METHOD" == "nat" ]]; then
iptables -t nat -D POSTROUTING -o ${INTERNET_IFACE} -j MASQUERADE > /dev/null 2>&1
iptables -D FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT > /dev/null 2>&1
iptables -D FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT > /dev/null 2>&1
[[ -n $OLD_IP_FORWARD ]] && echo $OLD_IP_FORWARD > /proc/sys/net/ipv4/ip_forward
elif [[ "$SHARE_METHOD" == "bridge" ]]; then
ip link set down $BRIDGE_IFACE
brctl delbr $BRIDGE_IFACE
[[ -n $OLD_BRIDGE_IPTABLES ]] && echo $OLD_BRIDGE_IPTABLES > /proc/sys/net/bridge/bridge-nf-call-iptables
fi
fi
if [[ "$SHARE_METHOD" != "bridge" ]]; then
iptables -D INPUT -p tcp -m tcp --dport 53 -j ACCEPT > /dev/null 2>&1
iptables -D INPUT -p udp -m udp --dport 53 -j ACCEPT > /dev/null 2>&1
iptables -D INPUT -p udp -m udp --dport 67 -j ACCEPT > /dev/null 2>&1
fi
if [[ $NO_VIRT -eq 0 ]]; then
if [[ -n $VWIFI_IFACE ]]; then
ip link set down dev ${VWIFI_IFACE}
ip addr flush ${VWIFI_IFACE}
networkmanager_rm_unmanaged_if_needed ${VWIFI_IFACE} ${OLD_MACADDR}
iw dev ${VWIFI_IFACE} del
fi
else
ip link set down dev ${WIFI_IFACE}
ip addr flush ${WIFI_IFACE}
networkmanager_rm_unmanaged_if_needed ${WIFI_IFACE}
fi
die() {
[[ -n "$1" ]] && echo -e "\nERROR: $1\n" >&2
cleanup
exit 1
clean_exit() {
cleanup
exit 0
# if the user press ctrl+c then execute die()
trap "die" SIGINT
ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt" -n $(basename $0) -- "$@")
[[ $? -ne 0 ]] && exit 1
eval set -- "$ARGS"
while :; do
case "$1" in
-h|--help)
usage >&2
exit 1
--hidden)
shift
HIDDEN=1
-c)
shift
CHANNEL="$1"
shift
-w)
shift
WPA_VERSION="$1"
shift
-g)
shift
GATEWAY="$1"
shift
-d)
shift
ETC_HOSTS=1
-n)
shift
SHARE_METHOD=none
-m)
shift
SHARE_METHOD="$1"
shift
--ieee80211n)
shift
IEEE80211N=1
--ht_capab)
shift
HT_CAPAB="$1"
shift
--driver)
shift
DRIVER="$1"
shift
--no-virt)
shift
NO_VIRT=1
shift
break
esac
done
if [[ $# -lt 1 ]]; then
usage >&2
exit 1
fi
if [[ $(id -u) -ne 0 ]]; then
echo "You must run it as root." >&2
exit 1
fi
WIFI_IFACE=$1
if ! is_wifi_interface ${WIFI_IFACE}; then
echo "ERROR: '${WIFI_IFACE}' is not a WiFi interface" >&2
exit 1
fi
if ! can_have_ap ${WIFI_IFACE}; then
echo "ERROR: Your adapter does not support AP (master) mode" >&2
exit 1
fi
if ! can_have_sta_and_ap ${WIFI_IFACE}; then
if is_wifi_connected ${WIFI_IFACE}; then
echo "ERROR: Your adapter can not be connected to an AP and at the same time transmit as an AP" >&2
exit 1
elif [[ $NO_VIRT -eq 0 ]]; then
echo "WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt" >&2
NO_VIRT=1
fi
fi
if [[ "$SHARE_METHOD" != "nat" && "$SHARE_METHOD" != "bridge" && "$SHARE_METHOD" != "none" ]]; then
echo "ERROR: Wrong Internet sharing method" >&2
echo
usage >&2
exit 1
fi
if [[ "$SHARE_METHOD" == "bridge" ]]; then
OLD_BRIDGE_IPTABLES=$(cat /proc/sys/net/bridge/bridge-nf-call-iptables)
BRIDGE_IFACE=$(get_avail_bridge)
if [[ -z $BRIDGE_IFACE ]]; then
echo "ERROR: No availabe bridges < br100" >&2
exit 1
fi
elif [[ "$SHARE_METHOD" == "nat" ]]; then
OLD_IP_FORWARD=$(cat /proc/sys/net/ipv4/ip_forward)
fi
if [[ "$SHARE_METHOD" != "none" ]]; then
MIN_REQUIRED_ARGS=2
else
MIN_REQUIRED_ARGS=1
fi
if [[ $# -gt $MIN_REQUIRED_ARGS ]]; then
if [[ "$SHARE_METHOD" != "none" ]]; then
if [[ $# -ne 3 && $# -ne 4 ]]; then
usage >&2
exit 1
fi
INTERNET_IFACE=$2
SSID=$3
PASSPHRASE=$4
else
if [[ $# -ne 2 && $# -ne 3 ]]; then
usage >&2
exit 1
fi
SSID=$2
PASSPHRASE=$3
fi
else
if [[ "$SHARE_METHOD" != "none" ]]; then
if [[ $# -ne 2 ]]; then
usage >&2
exit 1
fi
INTERNET_IFACE=$2
fi
if tty -s; then
read -p "SSID: " SSID
while :; do
read -p "Passphrase: " -s PASSPHRASE
echo
read -p "Retype passphrase: " -s PASSPHRASE2
echo
if [[ "$PASSPHRASE" != "$PASSPHRASE2" ]]; then
echo "Passphrases do not match."
else
break
fi
done
else
read SSID
read PASSPHRASE
fi
fi
if [[ $NO_VIRT -eq 1 && "$WIFI_IFACE" == "$INTERNET_IFACE" ]]; then
echo -n "ERROR: You can not share your connection from the same" >&2
echo " interface if you are using --no-virt option." >&2
exit 1
fi
CONFDIR=$(mktemp -d /tmp/create_ap.${WIFI_IFACE}.conf.XXXXXXXX)
echo "Config dir: $CONFDIR"
if [[ $NO_VIRT -eq 0 ]]; then
VWIFI_IFACE=${WIFI_IFACE}ap
# in NetworkManager 0.9.10 and above we can set the interface as unmanaged without
# the need of MAC address, so we set it before we create the virtual interface.
if networkmanager_is_running && [[ $NM_OLDER_VERSION -eq 0 ]]; then
echo -n "Network Manager found, set $1 as unmanaged device... "
networkmanager_add_unmanaged ${VWIFI_IFACE}
# do not call networkmanager_wait_until_unmanaged because interface does not
# exist yet
echo "DONE"
fi
WIFI_IFACE_CHANNEL=$(iw dev ${WIFI_IFACE} info | grep channel | awk '{print $2}')
if [[ -n $WIFI_IFACE_CHANNEL && $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then
echo "hostapd will fail to use channel $CHANNEL because $WIFI_IFACE is already set to channel $WIFI_IFACE_CHANNEL, fallback to channel $WIFI_IFACE_CHANNEL."
CHANNEL=$WIFI_IFACE_CHANNEL
fi
VIRTDIEMSG="Maybe your WiFi adapter does not fully support virtual interfaces.
Try again with --no-virt."
echo -n "Creating a virtual WiFi interface... "
iw dev ${VWIFI_IFACE} del > /dev/null 2>&1
if iw dev ${WIFI_IFACE} interface add ${VWIFI_IFACE} type __ap; then
# now we can call networkmanager_wait_until_unmanaged
networkmanager_is_running && [[ $NM_OLDER_VERSION -eq 0 ]] && networkmanager_wait_until_unmanaged ${VWIFI_IFACE}
echo "${VWIFI_IFACE} created."
else
VWIFI_IFACE=
die "$VIRTDIEMSG"
fi
OLD_MACADDR=$(get_macaddr ${VWIFI_IFACE})
[[ ${OLD_MACADDR} == $(get_macaddr ${WIFI_IFACE}) ]] && NEW_MACADDR=$(get_new_macaddr ${VWIFI_IFACE})
WIFI_IFACE=${VWIFI_IFACE}
fi
can_transmit_to_channel ${WIFI_IFACE} ${CHANNEL} || die "Your adapter can not transmit to channel ${CHANNEL}."
if networkmanager_is_running && ! networkmanager_iface_is_unmanaged ${WIFI_IFACE}; then
echo -n "Network Manager found, set $1 as unmanaged device... "
networkmanager_add_unmanaged ${WIFI_IFACE}
networkmanager_wait_until_unmanaged ${WIFI_IFACE}
echo "DONE"
fi
[[ $HIDDEN -eq 1 ]] && echo "Access Point's SSID is hidden!"
# hostapd config
cat << EOF > $CONFDIR/hostapd.conf
ssid=${SSID}
interface=${WIFI_IFACE}
driver=${DRIVER}
hw_mode=g
channel=${CHANNEL}
ctrl_interface=$CONFDIR/hostapd_ctrl
ctrl_interface_group=0
ignore_broadcast_ssid=$HIDDEN
EOF
if [[ $IEEE80211N -eq 1 ]]; then
cat << EOF >> $CONFDIR/hostapd.conf
ieee80211n=1
wmm_enabled=1
ht_capab=${HT_CAPAB}
EOF
fi
if [[ -n "$PASSPHRASE" ]]; then
[[ "$WPA_VERSION" == "1+2" || "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=3
cat << EOF >> $CONFDIR/hostapd.conf
wpa=${WPA_VERSION}
wpa_passphrase=$PASSPHRASE
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
EOF
fi
if [[ "$SHARE_METHOD" == "bridge" ]]; then
echo "bridge=${BRIDGE_IFACE}" >> $CONFDIR/hostapd.conf
else
# dnsmasq config (dhcp + dns)
DNSMASQ_VER=$(dnsmasq -v | grep -m1 -oE '[0-9]+(\.[0-9]+)*\.[0-9]+')
version_cmp $DNSMASQ_VER 2.63
if [[ $? -eq 1 ]]; then
DNSMASQ_BIND=bind-interfaces
else
DNSMASQ_BIND=bind-dynamic
fi
cat << EOF > $CONFDIR/dnsmasq.conf
interface=${WIFI_IFACE}
${DNSMASQ_BIND}
dhcp-range=${GATEWAY%.*}.1,${GATEWAY%.*}.254,255.255.255.0,24h
dhcp-option=option:router,${GATEWAY}
EOF
[[ $ETC_HOSTS -eq 0 ]] && echo no-hosts >> $CONFDIR/dnsmasq.conf
fi
# initialize WiFi interface
if [[ $NO_VIRT -eq 0 && -n "$NEW_MACADDR" ]]; then
ip link set dev ${WIFI_IFACE} address ${NEW_MACADDR} || die "$VIRTDIEMSG"
fi
ip link set down dev ${WIFI_IFACE} || die "$VIRTDIEMSG"
ip addr flush ${WIFI_IFACE} || die "$VIRTDIEMSG"
if [[ "$SHARE_METHOD" != "bridge" ]]; then
ip link set up dev ${WIFI_IFACE} || die "$VIRTDIEMSG"
ip addr add ${GATEWAY}/24 broadcast ${GATEWAY%.*}.255 dev ${WIFI_IFACE} || die "$VIRTDIEMSG"
fi
# enable Internet sharing
if [[ "$SHARE_METHOD" != "none" ]]; then
echo "Sharing Internet using method: $SHARE_METHOD"
if [[ "$SHARE_METHOD" == "nat" ]]; then
iptables -t nat -I POSTROUTING -o ${INTERNET_IFACE} -j MASQUERADE || die
iptables -I FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT || die
iptables -I FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT || die
echo 1 > /proc/sys/net/ipv4/ip_forward || die
elif [[ "$SHARE_METHOD" == "bridge" ]]; then
# disable iptables rules for bridged interfaces
echo 0 > /proc/sys/net/bridge/bridge-nf-call-iptables || die
# create and initialize bridged interface
brctl addbr ${BRIDGE_IFACE} || die
brctl addif ${BRIDGE_IFACE} ${INTERNET_IFACE} || die
ip link set dev ${BRIDGE_IFACE} up || die
fi
else
echo "No Internet sharing"
fi
# boost low-entropy
if [[ $(cat /proc/sys/kernel/random/entropy_avail) -lt 1000 ]]; then
which haveged > /dev/null 2>&1 && {
haveged -w 1024 -p $CONFDIR/haveged.pid
fi
# start dns + dhcp server
if [[ "$SHARE_METHOD" != "bridge" ]]; then
iptables -I INPUT -p tcp -m tcp --dport 53 -j ACCEPT || die
iptables -I INPUT -p udp -m udp --dport 53 -j ACCEPT || die
iptables -I INPUT -p udp -m udp --dport 67 -j ACCEPT || die
dnsmasq -C $CONFDIR/dnsmasq.conf -x $CONFDIR/dnsmasq.pid || die
fi
# start access point
echo "hostapd command-line interface: hostapd_cli -p $CONFDIR/hostapd_ctrl"
# from now on we exit with 0 on SIGINT
trap "clean_exit" SIGINT
if ! hostapd $CONFDIR/hostapd.conf; then
echo -e "\nError: Failed to run hostapd, maybe a program is interfering." >&2
if networkmanager_is_running; then
echo "If an error like 'n80211: Could not configure driver mode' was thrown" >&2
echo "try running the following before starting create_ap:" >&2
if [[ $NM_OLDER_VERSION -eq 1 ]]; then
echo " nmcli nm wifi off" >&2
else
echo " nmcli r wifi off" >&2
fi
echo " rfkill unblock wlan" >&2
fi
die
fi
clean_exit
Last edited by OBLiQUE (2014-09-02 20:26:22)adam777 wrote:
Thank, just what I was looking for.
Unfortunately, it seems that currently my Intel 5300 card (using the iwlwifi driver), does not support AP mode.
From what I understand, hostapd can be used in bridge mode as well, which should have no compatibility problems.
Can some one point me in the right direction?
* EDIT *
After more attempts, I think I got it wrong and AP mode is indeed required.
Sorry for the late reply, I didn't noticed your message.. Did you got any errors? I have Intel 6205 and it works.
Also if you use NetworkManager, then you have to say to NetworkManager to stop using your interface.
You can do it by editing the /etc/NetworkManager/NetworkManager.conf file and put the following (without the <>):
[keyfile]
unmanaged-devices=mac:<interface's mac address here>
and restart your NetworkManager. Ofcourse after you finish, you have to remove it in order to get your wifi back to working with NetworkManager. -
N96 Video Ringtones and Access points
2 months on and my video ringtones still dont work, they try to start and then go to nokias horrible ringtone, also under email and realplayer the phone refuses to change the default access point entered which in my case with realplayer is none, this means my realplayer wont streaming anything!
Has anyone else had this issue.You might have to categorise your access points manually, for example, move (or copy) your wireless lan network called 'Hello' to the internet access point group.
Also you should be able to select the access point real player uses within the settings menu, are you saying that only 'None.' is available? If so, thats weird!
Are your video ring tones on the memory card? (not mass memory) as this could slow down the opining of the videos, try using the default ones that came with the phone and see if they work.
If you can update your phone's firmware, like el_loco said, do it!
Tony -
"No access point defined. Define one in Connection...
Hello, I have my Nokia N* for about two years now. I would always send MMS , but now I can't. This is the first time I am trying to send an MMS on Symbian Anna despite the fact of updating it months ago.
This is what happens:
1. I try to send a picture via SMS... which of course then becomes an MMS.
2. "No valid access point defined. Define one now?
3. I click YES
4."No access point defined. Define one in Connection settings." and the message dissapears. I then go to-->
5. TOOLS>SETTINGS>CONNECTIVITY>SETTINGS>NETWORK DESTINATIONS
6. There are 6 Internet Access Points and 4 WAP Access Points ( I added 5 Internet ones trying to figure this out and 3 wap ones trying to figure this out)
MY SETTINGS:
TOOLS>SETTINGS>CONNECTIVITY>SETTINGS
1. MOBILE DATA: On
2. ALLOW MOBILE DATA USAGE: Worldwide
MESSAGES>SETTINGS
1. MMS creation Mode: FREE
2.ACCESS POINT IN USE (WITH A GREEN STAR): MMS send
3.MULTIMEDIA RETREIVAL: Always automatic
Please help me! =]I called my provider "TIM" and they have no idea what I am talking about when I asked them to please send me a new Access Point setting for MMS. Why was this working perfectly before Anna>? and now not? My provider is the same.
-
I'm trying to set my internet access point for emails to automatic. But it only gives me an option to pick one. I want it to connect to my few preffered access points only so how do I fix this.
Appreciate your helpI found the solution...I think.
If you set it on default connection then it should just connect to the network your on, or the next priority. -
I have a Cablecom Modem Wireless Router. Connection to the Internet, WAN
I want to istall Time Capsule as Backup system for iMac
and configure the Time Capsule as a Internet Access Point only, connected to a LAN (Switch -netgear) on one of the ports of the Cablecom Modem.That is fine.
Put the TC in bridge mode.
And setup wireless how ever you like, but you must be creating a wireless network. -
Repair Internet Access without Hard Reset (E72)
I just came back from a trip. I used many different Wifi-hotspots during my journey, which kept accumulating in the internet settings. So I deleted all the new hotspots from my Nokia E72 phone. Unfortunately, this action messed up the internet access completely.
I already did a reset of the settings with +#7780#, but to no avail. I have SmartConnect 1.3.6 installed. Deleting and reinstalling did not change anything.
In detail:
I cannot change the access point for the built-in browser any more. When I select it, nothing happens. Before the reset it had now connection at all, now it is fixed to my mobile network providers internet access point (GPRS/3G).
In internet settings (Menu -> Ctrl. Panel-> Settings-> Connection -> Destinations) there is now an empty destination group without a name, and it can not be deleted.
Certain functions in internet settings do not work any more, like copying an access point to another group. The destination settings often will hang and cannot be closed any more. A restart is needed.
Some applications (e.g. Podcasting) still show some of the deleted access points.
Almost all other applications which do not have their own access point management (like. fring) will not connect anymore.
My question:
Is there any other way of accessing and/or deleting these settings (maybe directly in the system) besides doing a hard reset (*#7370#) requiring a (PC-based) backup?
If I ever want to travel only with my E72 I would need a solution to these problems on the phone itself.
Thanks.
E72-1, product code 0586718, firmware 022.007@hadimassa: as I wrote in my post, SC has nothing to do with my problem. Installing SC doesn't improve stability in general and maybe one of the causes in the first place, but this was not the point here. Too late, so to say
The internet access parameters must be stored somewhere on the C: drive. I am interested in the exact location.
E72-1, product code 0586718, firmware 022.007 -
Accidentally deleted 3G access point
Phone: Nokia 5800XM Latest Firmware
I was trying to find a way to stop myself being charged by every application automatically using my 3G. So I tried deleting it in the hope I could easily put it back later.
Now that I try, I don't know at all how to re-set-up my Vodafone 3G Access Point so I can once again use the 3g feature of my phone.
Could anyone help me please? Thanks.Anyone?
Maybe you are looking for
-
Hi, I've managed to configure my farm so that Microsoft Online Directory Services (Office 365 etc.) can be used for STS authentication, but what I'm actually trying to do is allow user authentication - that is, I'm hoping to be able to use the user'
-
There are several advantages to the newly redesigned Crop tool in Photoshop CS6. In this video tutorial, Julieanne demonstrates the refined interface, new features, customizable presets, enhanced tools and essential shortcuts that will make cropping
-
Problem deleting Original Pictures in ApertureDatabase
Since installation of OS-X Leopard I can no longer delete any picture inside may projects in my Aperure database. Neither in my old library nor in a completely new one. Has anybody made the same experience? Can anybody give me a useful hint what I ca
-
Safari 5 blocks unused ports by default, like most browsers. However Firefox and Chrome allow for configurations to open these ports if they need to be used. My new employer uses multiple ports on a single domain for development purposes. Does anyone
-
I work on a servlet that connects to Access using JDBC -ODBC bridge but it doesn't retrieve anything.So cud u plz help me? import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; import java.sql.*; public class firs