problem with wifi connection

Started by ellecieffe, February 10, 2013, 01:31:33 PM

Previous topic - Next topic

JohnS

Lots of ISPs provide wifi routers free but otherwise they're very cheap on ebay.

ellecieffe

Hello, guys.
I ordered this router, hoping that it was a good investment: D http://cgi.ebay.it/ws/eBayISAPI.dll?ViewItem&item=230928674888
While waiting for his arrival, I would still insist a little bit and try to connect my olinuxino with my laptop with an ad hoc connection.
I followed this guide and everything seems ok.http://wiki.debian.org/WiFi/AdHoc
However, when try to ping I get an error (host unreachable)
Also, if I understand it, to use VNC both devices must be connected to the internet, right?
So you can not connect to the olinuxino desktop from the laptop , only with a USB ti ttl serial cable F? You can only connect to the terminal via Putty?
I'm a hard head,be lenient:D

jwischka

Do you get an IP address on the board when you are connected in adhoc? You can connect to VNC if both computers are connected and on the same subnet - they don't have to be both connected to the internet per-se, but do need to be on the same network. If you can't ping one from the other, though, there is likely a problem.

The first thing I would try to check is if you can ping the A13 from the laptop. You can find the ip address of the board in ifconfig. If that doesn't work, then you likely aren't connected.

Quote from: ellecieffe on February 15, 2013, 02:38:30 PM
Hello, guys.
I ordered this router, hoping that it was a good investment: D http://cgi.ebay.it/ws/eBayISAPI.dll?ViewItem&item=230928674888
While waiting for his arrival, I would still insist a little bit and try to connect my olinuxino with my laptop with an ad hoc connection.
I followed this guide and everything seems ok.http://wiki.debian.org/WiFi/AdHoc
However, when try to ping I get an error (host unreachable)
Also, if I understand it, to use VNC both devices must be connected to the internet, right?
So you can not connect to the olinuxino desktop from the laptop , only with a USB ti ttl serial cable F? You can only connect to the terminal via Putty?
I'm a hard head,be lenient:D

ellecieffe

On my lapotop I created with Network Manager the follow network:




On my olinuxino (jwischka's image R17) I've typed
sudo iconfig -a
and..
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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tunl0     Link encap:IPIP Tunnel  HWaddr
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1     Link encap:Ethernet  HWaddr 48:02:2a:c5:f2:58
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


then

sudo vim /etc/network/interfaces


I've edited
     

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback


auto wlan1
iface wlan1 inet static
    address 10.42.0.2
    netmask 255.255.255.0
    wireless-channel 1
    wireless-essid olinuxino
    wireless-mode ad-hoc


then...


olinuxino@ubuntu:~$ sudo ifup wlan1
[sudo] password for olinuxino:
ssh stop/waiting
ssh start/running, process 1004


olinuxino@ubuntu:~$ sudo ifconfig
[sudo] password for olinuxino:
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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1     Link encap:Ethernet  HWaddr 48:02:2a:c5:f2:58
          inet addr:10.42.0.2  Bcast:10.42.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:2627 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



if I type:

olinuxino@ubuntu:~$ iwlist wlan1  scan


I get


wlan1     Scan completed :
          Cell 01 - Address: 5A:18:66:5A:5E:88
                    ESSID:"olinuxino"
                    Protocol:IEEE 802.11bg
                    Mode:Ad-Hoc
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:off
                    Bit Rates:54 Mb/s
                    Quality=100/100  Signal level=100/100




I ping by my laptop and..

luighi@luighi:~$ ping 10.42.0.2
PING 10.42.0.2 (10.42.0.2) 56(84) bytes of data.
64 bytes from 10.42.0.2: icmp_req=1 ttl=64 time=4.33 ms
64 bytes from 10.42.0.2: icmp_req=2 ttl=64 time=2.33 ms
64 bytes from 10.42.0.2: icmp_req=3 ttl=64 time=1.93 ms
64 bytes from 10.42.0.2: icmp_req=4 ttl=64 time=2.40 ms
64 bytes from 10.42.0.2: icmp_req=5 ttl=64 time=1.98 ms
64 bytes from 10.42.0.2: icmp_req=6 ttl=64 time=2.00 ms
64 bytes from 10.42.0.2: icmp_req=7 ttl=64 time=1.87 ms
                     ...
                     ...
                     ...
64 bytes from 10.42.0.2: icmp_req=350 ttl=64 time=1.03 ms
64 bytes from 10.42.0.2: icmp_req=351 ttl=64 time=1.07 ms
64 bytes from 10.42.0.2: icmp_req=352 ttl=64 time=0.878 ms
64 bytes from 10.42.0.2: icmp_req=353 ttl=64 time=0.746 ms
64 bytes from 10.42.0.2: icmp_req=354 ttl=64 time=1.03 ms
64 bytes from 10.42.0.2: icmp_req=355 ttl=64 time=1.32 ms
64 bytes from 10.42.0.2: icmp_req=356 ttl=64 time=1.45 ms
64 bytes from 10.42.0.2: icmp_req=357 ttl=64 time=1.61 ms
64 bytes from 10.42.0.2: icmp_req=358 ttl=64 time=1.12 ms
64 bytes from 10.42.0.2: icmp_req=359 ttl=64 time=1.15 ms
64 bytes from 10.42.0.2: icmp_req=360 ttl=64 time=1.38 ms
64 bytes from 10.42.0.2: icmp_req=361 ttl=64 time=1.14 ms
64 bytes from 10.42.0.2: icmp_req=362 ttl=64 time=1.30 ms
64 bytes from 10.42.0.2: icmp_req=363 ttl=64 time=1.81 ms
64 bytes from 10.42.0.2: icmp_req=364 ttl=64 time=1.14 ms
64 bytes from 10.42.0.2: icmp_req=365 ttl=64 time=1.32 ms
64 bytes from 10.42.0.2: icmp_req=366 ttl=64 time=0.782 ms
^C
--- 10.42.0.2 ping statistics ---
366 packets transmitted, 365 received, 0% packet loss, time 365386ms
rtt min/avg/max/mdev = 0.725/1.187/9.224/0.582 ms


Is it ok?
[it is normal that the wireless chip is so hot?]

ellecieffe

even the ping from olinuxino the laptop is ok .. (I find that with ctrl + C stop the ping  ::))


What do I do now?

ellecieffe

#20
 ;D ;D ;D ;D

Heeey guys...I was able to connect to the olinuxino desktop via VNC!
I've downloaded TightVNC, I 've unzipped and, following the readme, I've typed
sudo java-jar / blablalba/tvnjviewer-2.6.2-bin/tightvnc-jviewer.jar

I've pressed on connect and...

I've entered the password "password" (as it is written in the post jwischka)
and voila:


Now remains the problem of the internet connection ...
What am I left to do?

jwischka

Quote from: ellecieffe on February 15, 2013, 08:25:08 PM
;D ;D ;D ;D

Heeey guys...I was able to connect to the olinuxino desktop via VNC!
I've downloaded TightVNC, I 've unzipped and, following the readme, I've typed
sudo java-jar / blablalba/tvnjviewer-2.6.2-bin/tightvnc-jviewer.jar

Now remains the problem of the internet connection ...
What am I left to do?

You have to manually your route table to add a gateway on your board to route traffic through the 10.42.0.1 gateway. Then you need to configure your computer to both a) forward IP traffic, if it isn't already, and b) bridge the wireless and wired interfaces, and then set up appropriate routes, metrics, etc. It can all be done, but frankly you're going to need a short course in routing to get it set up properly - which is why I suggested you buy a router which has things more or less pre-configured. You'll also likely run into firewall issues on the computer potentially not allowing traffic through.

In short, if you don't have a fairly good understanding of how to use route and iptables, it's going to be really, really not trivial to do what you're wanting.

ellecieffe

I get it. many thanks jwischka .. Waiting for the arrival of router I will have fun with VNC ... Best regards and thanks for the advices :)

ellecieffe

Hi guys..here we are again  :P

I m now in a place where is enabled a  wifi network,so I've decided to try the AP mode connection..

So:
-I've changed /etc/network/interfaces with SSID and key of WIFi network
-I've bring up the wlan and now I have a inet address like 131.144.etc.etc
-to access the web I need to login (user/PW) , so I need something like w3m,right?
Is there something like that in Jwischka's image?

jwischka

Quote from: ellecieffe on February 16, 2013, 01:29:24 AM
Hi guys..here we are again  :P

I m now in a place where is enabled a  wifi network,so I've decided to try the AP mode connection..

So:
-I've changed /etc/network/interfaces with SSID and key of WIFi network
-I've bring up the wlan and now I have a inet address like 131.144.etc.etc
-to access the web I need to login (user/PW) , so I need something like w3m,right?
Is there something like that in Jwischka's image?

Depends on how the local network is set up. A lot of public hotspots won't let you ping other hosts (in other words, you couldn't ping the A13 from your laptop, even if you were both connected to the same AP, for security reasons). If that's the case, things might be rough.

If you can connect, VNC in and open a web-browser. If not, yes, something like lynx would probably be your next try. Unfortunately, it's not installed on my image, so you'll have to get it on there doing a chroot, probably.

ellecieffe

Dear jwischka
I'm writing to you from olinuxino!! ;D
I was able to connect via ethernet (with adapter) the board and and via VNC,in ad hoc wifi,with my laptop. So I was able to log in with firefox
Now I will have to install lynx ,right?

jwischka

Quote from: ellecieffe on February 16, 2013, 12:49:35 PM
Dear jwischka
I'm writing to you from olinuxino!! ;D
I was able to connect via ethernet (with adapter) the board and and via VNC,in ad hoc wifi,with my laptop. So I was able to log in with firefox
Now I will have to install lynx ,right?

You can, yeah. At a console:

sudo apt-get install lynx


ellecieffe

#27
Hi jwischka,good sunday
I have installed Lynx but when I launch it by terminal I get
Looking up lynx.isc.org and then


Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://lynx.isc.org/


Maybe I could try with w3m or other?

Another question: my /etc/network/interfaces is
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

#auto eth0
iface eth0 inet dhcp

#codice per la connessione ad hoc all'Acer TravelMate
#auto wlan1
#iface wlan1 inet static
#    address 10.42.0.2
#    netmask 255.255.255.0
#    wireless-channel 1
#    wireless-essid olinuxino
#    wireless-mode ad-hoc



#codice per la connessione ad un AccessPoint,in questo caso SerraUnipi
auto wlan1
iface wlan1 inet dhcp
wireless-essid SerraUnipi
wireless-mode managed
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf



Can I put both blocks relating to wlan1 without #, so as to be able to connect with the network SerraUnipi or olinuxino only when there are?
Do I need to create an "if" structure, perhaps?
Thanks

ellecieffe

#28
Ok the first question is solved... I've rebooted again and it works. I can surf the web via Lynx but, how you said, I can't connect with VNC because of the set up of the local network (I think). So, I will have to wait the arrival of router,or connect with ethernet to the olinuxino and with ad hoc wifi with my laptop.
QuoteDepends on how the local network is set up. A lot of public hotspots won't let you ping other hosts (in other words, you couldn't ping the A13 from your laptop, even if you were both connected to the same AP, for security reasons). If that's the case, things might be rough.

Remains the second, how can I make more "automatic" the connection?  (if I can)

jwischka

Quote from: ellecieffe on February 17, 2013, 08:00:39 PM
Ok the first question is solved... I've rebooted again and it works. I can surf the web via Lynx but, how you said, I can't connect with VNC because of the set up of the local network (I think). So, I will have to wait the arrival of router,or connect with ethernet to the olinuxino and with ad hoc wifi with my laptop.
QuoteDepends on how the local network is set up. A lot of public hotspots won't let you ping other hosts (in other words, you couldn't ping the A13 from your laptop, even if you were both connected to the same AP, for security reasons). If that's the case, things might be rough.

Remains the second, how can I make more "automatic" the connection?  (if I can)

No - you can't have them both in the file. If you want to do something like that, you should remove them entirely from the file and use wicd (installed in VNC, or you could do it using x tunneling over SSH) to set up the connections. It offers quite a bit more in the way of automatically connecting when various connections are present.