I have spent a lot of time trying to configure the wifi on the GPE linux, I have very little experience with linux and I really don't know how to setup the adapter. My network is a B/G with DHCP and 128 bit WEP. I have set the data on a configuration tool but it doesn't seem to work. Can someone help me?
linux and wifi
I installed openmoko. For surfing the web i do:
- Open terminal
Code:
ifconfig wlan0 up
iwlist wlan0 scan
iwconfig wlan0 essid "my-essid"
ifup wlan0
Note: i don't use encryption, you can try: "iwconfig wlan0 key open (WEP-KEY)" after setting the essid, don't know if wep or wpa is supported.
Now i open the webbrowser and surf the web.
The resolution 640x480 is a pleasure but because of starting from sdcard the browser is slow.
Related
I have set up openvpn on my HTC Desire running Froyo. It seems to connect fine, but if I attempt to use the tunnel or ping my server it fails.
If I run the following in terminal:
su
ip ru del table wifi
It works!
Is there a way I can set up my config file so I don't have to do this every time?
runboy said:
I have set up openvpn on my HTC Desire running Froyo. It seems to connect fine, but if I attempt to use the tunnel or ping my server it fails.
If I run the following in terminal:
su
ip ru del table wifi
It works!
Is there a way I can set up my config file so I don't have to do this every time?
Click to expand...
Click to collapse
man, you saved my life
I was totally destroyed having all the OpenVPN set up and still not working
my phone did get IP address from OpenVPN server
route was added to the routing table
and still could not even ping my default gateway
after applying this command, it WORKS!!!
could someone explain what it does and why it does not work out of box?
Solved. See here...
OpenVPN for Dummies
http://forum.xda-developers.com/showthread.php?p=10000743#post10000743
Thanks to Thor2002ro's kernel, I am able to connect to the internet via ethernet (purchased a USB to network adapter from amazon chipset AX88772A). However,
I am not able to do the following:
1) Download apps from the Market app. The page hangs while the app tries to installs forever.
2) Connect to Pandora
3) Connect to GTalk
4) When I connect using the stock browser, I get the "No Network Connection" popup but the webpage successfully loads in the background. Same for problem occurs when using the Dolphin HD browserl. (No trouble with Firefox and Opera).
5) Cannot download files (ie PDFs, XLS, DOC) using the stock browser. The task bar says downloading...but it never finishes.
I've read that ethernet is a non-standard means of connecting to the net. As a result the ethernet interface does not get registered with the ConnectivityManager. Many built-in apps will query the ConnectivityManager to see if the network connection is active. If not, it won't proceed with the related activity. (ie downloading).
Does anyone have the same problem? Does anyone have any solution? Thanks in advance.
[EDIT]: It appears that someone has done the work of including the ethernet classes in Eclair, but somehow the code never made it to HC. Please see the link http://git.android-x86.org/?p=platform/frameworks/base.git;a=commit;h=73c8442658704e5749c5fc6fd6f93c15fcf1d7c6
If possible, can one of the brilliant devs incorporate this feature into a new rom? Thanks again!
not possible... HC has no source...
alternative buy a mobile hotspot... for stuff like this I use a Fon2200 + battery pack
Solved using a trick
I figured a way to trick the apps that require connectivity via wireless.
Simply write a script that executes at boot time. The script will set the wireless interface to a fake IP address.
#!/system/bin/sh
netcfg wlan0 down
netcfg wlan0 up
busybox ifconfig wlan0 169.254.1.50 netmask 255.255.255.0 broadcast 169.254.2.255
netcfg eth0 up
dhcpcd eth0
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
All the apps now work including market place, pandora, gtalk, downloading normal files from the web. The stock browser doesn't complain anymore!
but doesn't this keep the wifi awake?
do a lsmod....
Thread Closed.
Q&A subforum is the place for Q
original source
To do this, you will need a server or vps with ssh enabled and a public ip address,
what we are going to do is to use the server as a tunnel to your Raspberry Pi like this:
Code:
Raspberry Pi ----> SERVER <---- A computer outside your home network
To make everything easier, configure your server to use public key authentication, so you
are not going to be asked for a password everytime you connect.
First of all, put your ssh key inside ~/.ssh/ BOTH of your raspberry and the computer you
want to use to access the RPI, then we we'll configure the server to tunnel connections
to the bind address we specify, so edit your server /etc/ssh/sshd_config and add at the end:
Code:
GatewayPorts clientspecified
Now we are ready, open a screen session on your raspberry and type:
Code:
ssh -R your-server-interface-ip:2222:localhost:22 [email protected]
So, if you want the SSH port to be tunneled only on the server localhost, you shall type:
Code:
ssh -R localhost:2222:localhost:22 [email protected]
Otherwise, if you want it to be tunneled on the public ip address:
Code:
ssh -R your-server-address:2222:localhost:22 [email protected]
Now you are ready, if you used the localhost bind interface, you can reach your RPI connecting
to your server and then, from the inside of the ssh session type:
Code:
ssh -p2222 [email protected]
Else, if you choose the public ip, you will simply connect with:
Code:
ssh -p2222 [email protected]
Enjoy ^_^
Dynamic DNS
Your home connection may not have a static IP address, so most home routers now give the option of filling in dynamic DNS account information that will assign a hostname to your IP address automatically. This means you don't have to keep track of your IP address manually.
Google for "how to set up dynamic dns" -- Wired.com has a nice step-by-step tutorial. (Can't post links yet. :-/) I use DynDNS as my provider, they allow you to set up a hostname using their domains for free.
=RV=
redvelociraptor said:
Your home connection may not have a static IP address, so most home routers now give the option of filling in dynamic DNS account information that will assign a hostname to your IP address automatically. This means you don't have to keep track of your IP address manually.
Google for "how to set up dynamic dns" -- Wired.com has a nice step-by-step tutorial. (Can't post links yet. :-/) I use DynDNS as my provider, they allow you to set up a hostname using their domains for free.
=RV=
Click to expand...
Click to collapse
Considering in this tutorial i've suggested a dedicated server as tunnel, i don't get why static/dynamic ip address of your home network is important ....
control rpi over nat by http
The hopmsg.com allows you the make a free message channel by creating a random key for free (no registration,login,etc) which can be used to get status / send command to your rpi:
1, Simplest way to Send/Receive message from any kind of OS/browser/platform just by clicking on a link, only need to know the ID of your msg!
Example: set your message by opening a link : hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=message
get your message from any device by opening: hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY
or use the Android App to get/set it.
2, Control your device inside Nat/Lan
Example: set your command by opening a link : hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=command
get your command from any device by opening: hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY
or use the Android App to get/set it.
3, Basic monitoring system
Bash script checking uptime:
UP=`uptime | sed -e 's/ /_/g'`; curl "hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=`echo ${UP}`"
and use the Android App or a browser to check the status of the device.
4, Get your IP address, the message source, poor man's dyndns
If you set some values, with src=1 parameter your IP and the UTC time also added to your message
Example:
hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=VALUE&src=1
wget -qO- hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY > result.txt
to use with some script.
Hi,
another option is dataplicity , very easy installation , 0 configuration and really good features
Hi guys!
I've been using OpenVPN for connecting my phones to my home network.
When I replaced my old phone with Note 4, I noticed that when VPN connectivity is established, DNS is leaking. If you use VPN you can test it here to see if you're also affected by this: https://dnsleaktest.com.
I tried to fix this, but despite all my efforts, DNS traffic just refused to go through the VPN tunnel or DNS not working at all.
Eventually I figured out the series of steps needed and I'd like to share this with you in case someone is having the same problem.
Many thanks to users MaxChinni and Transfusion from this Stack Exchange thread for providing useful information.
Here is how my connection sequence looks like. Needless to say, you need root for this:
1. openvpn --config client.ovpn --daemon
2. iptables -t nat -F OUTPUT
3. iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 192.168.1.1
(192.168.1.1 is the internal IP address of my router that has DNS server running and intercepting all packets sent to UDP port 53)
4. pkill netd
5. Set DNS:
ndc resolver flushif tun0
ndc resolver flushdefaultif
ndc resolver setifdns tun0 208.67.222.222 208.67.220.220
ndc resolver setdefaultif tun0
Here is the disconnection sequence:
1. pkill openvpn
2. iptables -t nat -F OUTPUT
3. pkill netd
5. Set DNS:
ndc resolver flushif wlan0
ndc resolver flushdefaultif
ndc resolver setifdns wlan0 208.67.222.222 208.67.220.220
ndc resolver setdefaultif wlan0
Note: wlan0 interface is my Wi-Fi. If I'm on 4G, then I use "rmnet_data0" instead.
Attached are the exported Tasker tasks. I'm using some icons from these icon packs, so unless you want to change these tasks to use your own icons, you might want to install them first:
Ipack / Kyo-Tux Aeon HD
Ipack / Crystal Project HD
IMPORTANT:
* OpenVPN profiles are expected to be in "/storage/extSdCard/OpenVPN". Replace this path with your own if you want to use a different location.
* Before running "VPN Toggle" task you will need to set %VPN_PROFILE variable to the file name of OpenVPN profile you woudl like to use, e.g. "client.ovpn".
* I have a check for my home Wi-Fi to prevent starting VPN accidentally in this case, so you might want to change the reg-exp in "VPN Toggle" task that checks %SSID variable. It's currently checking for SSIDs to start with "FBIVan".
* You might also want to add a task that runs on boot to set the widget name to the one you want.
After you import these tasks, just create a widget on your desktop to run "VPN Toggle" task.
Nice, any chance of posting that tasked profile? I would appreciate it
Amd4life said:
Nice, any chance of posting that tasked profile? I would appreciate it
Click to expand...
Click to collapse
Updated the first post with exported tasks.
Hello everyone,
I'm making a IP Scanner app in Android Studio. I have successfully checked if a PC in my LAN is Alive or Dead. But I also want to show the PC name against the IP Address.
I searched on Internet and all the solutions I found just return me the IP Address but the hostname like.
Code:
InetAddress inetAddr;
inetAddr = InetAddress.getByName(host.hostname);
String hostname = inetAddr.getHostName();
String canonicalHostname = inetAddr.getCanonicalHostName();
I also tried to execute ping -a [IP Address] in Android Terminal that also returns me IP Address not Host Name.
But If I do ping -a [My Local IP] than it returns local-host but for all other IP's it doesn't work.
This is also not a DNS issue as someone suggested on Stackoverflow, because on my windows 7 machine I'm able to resolve the hostname using ping -a [IP Address]
Both my windows machine and Android phone getting their IP from DHCP and all other settings like DNS, Gateway are same for both devices.
This was fairly easy in .Net as I have created a IP Scanner in .Net, but in Java I haven't found a solution for this yet.
Hope someone will provide a solution
Thanks