thinman
Posts: 13
Joined: Fri Jul 25, 2014 12:56 pm

unable to connect to internet via wifi dongle

Thu Sep 17, 2015 6:32 pm

hello people!
i'm new to rasberry pi and i am operating my pi via ssh over ethernet using mobaXterm and acessing intenet through connectify-me software hotspot but the although the dongle gets connected to the hotspot and get an ip from the dhcp it does not connect to the internet.. i tried a lot of tips but proved no use..here are some details

this is the error i get

Code: Select all

sudo apt-get update
Err http://mirrordirector.raspbian.org wheezy Release.gpg
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://archive.raspberrypi.org wheezy Release.gpg
  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)
Err http://raspberrypi.collabora.com wheezy Release.gpg
  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy Release



this my connectify-me hotspot settings

Code: Select all

iwconfig
wlan0     IEEE 802.11bgn  ESSID:"Connectify-rj"
          Mode:Managed  Frequency:2.462 GHz  Access Point: A6:4B:F5:DB:81:E7
          Bit Rate=1 Mb/s   Tx-Power=20 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=39/70  Signal level=-71 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:3   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.
my ip settings

Code: Select all

 $ ifconfig -a
eth0      Link encap:Ethernet  HWaddr b8:27:eb:98:9c:38
          inet addr:169.254.78.30  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1422 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1023 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:124645 (121.7 KiB)  TX bytes:129130 (126.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:276 (276.0 B)  TX bytes:276 (276.0 B)

wlan0     Link encap:Ethernet  HWaddr e8:4e:06:19:17:20
          inet addr:192.168.168.104  Bcast:192.168.168.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6246 errors:0 dropped:0 overruns:0 frame:0
          TX packets:358 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:418261 (408.4 KiB)  TX bytes:29091 (28.4 KiB)
and finally the results i get when i restart the network system

Code: Select all

 sudo /etc/init.d/networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not r[warnble some interfaces ... (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/e8:4e:06:19:17:20
Sending on   LPF/wlan0/e8:4e:06:19:17:20
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 192.168.168.1 port 67
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/e8:4e:06:19:17:20
Sending on   LPF/wlan0/e8:4e:06:19:17:20
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.168.1
DHCPACK from 192.168.168.1
bound to 192.168.168.104 -- renewal in 17604 seconds.
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
ifup: interface eth0 already configured
ifup: interface wlan0 already configured
done.
please help nybody as its really urgent for me to get my raspberry pi working with internet again

P_Monty
Posts: 57
Joined: Sat Dec 27, 2014 2:45 pm
Location: Wiltshire, UK

Re: unable to connect to internet via wifi dongle

Thu Sep 17, 2015 7:53 pm

Some of those errors at the beginning look as though you've not got a DNS server configured. Can you access any web sites via a browser?

thinman
Posts: 13
Joined: Fri Jul 25, 2014 12:56 pm

Re: unable to connect to internet via wifi dongle

Fri Sep 18, 2015 3:43 am

@P_Monty no not even in the browswer in the desktop of pi...i cant access the sites in the browsers...If i need to configure a DNS how do i do it...FYI the ISP servers had assigned us static IP address and DNS servers on my other laptop which i turn it into a hotspot using connectify..Is that supposed to ring any bell

buteman
Posts: 133
Joined: Tue Jul 03, 2012 9:06 am
Location: Barrow upon Humber

Re: unable to connect to internet via wifi dongle

Fri Sep 18, 2015 7:00 pm

Try unplugging the ethernet cable as it is not getting an ip address in the correct range anyway.
Then run

Code: Select all

ifdown eth0
ifdown wlan0
ifup wlan0
Then try

Code: Select all

ping 192.168.168.1
If you can ping 192.168.168.1
then try

Code: Select all

route -n
which should give you something like
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
( except I can't get it formatted correctly!)
You might like to do the following as well

Code: Select all

ping 216.58.208.36
which is an ip address for http://www.google.com
if that works try

Code: Select all

ping www.google.com
There are few rewards greater than accomplishing a difficult task. Just because something doesn't cost money doesn't mean there is no cost. Every success makes the next one easier. Of course that takes determination and patience.

thinman
Posts: 13
Joined: Fri Jul 25, 2014 12:56 pm

Re: unable to connect to internet via wifi dongle

Sat Sep 19, 2015 12:00 pm

@buteman if i remove the ethernet cable i wont be able to ssh pi from my laptop..its how i'm operating my pi at the first place..an additional fact is that it wasn't showing any such problems 3months before which was the last time i had tried to acess internet in my pi the same way as i do now but now it just dosent connect to the internet..i even tried installing the whole OS again..still no luck!! what am i to do

buteman
Posts: 133
Joined: Tue Jul 03, 2012 9:06 am
Location: Barrow upon Humber

Re: unable to connect to internet via wifi dongle

Sat Sep 19, 2015 1:52 pm

How are you connecting your PC to the internet?
Do you have ethernet and wifi on it or 2 ethernet cards or something else.
Please describe the full network setup you have.
Please do:

Code: Select all

route -n
and let us know the result.
This will show how the Pi is trying to get to the internet.

The ethernet connection on the Pi's ethernet card is not a private ip address as it is 169.254.78.30.
If you look at the result of the following code as shown here you may find that it is the problem.

Code: Select all

whois 169.254.78.30

#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
showNonArinTopLevelNet=false&ext=netref2
#
NetRange:       169.254.0.0 - 169.254.255.255
CIDR:           169.254.0.0/16
NetName:        LINKLOCAL-RFC3927-IANA-RESERVED
NetHandle:      NET-169-254-0-0-1
Parent:         NET169 (NET-169-0-0-0-0)
NetType:        IANA Special Use
OriginAS:       
Organization:   Internet Assigned Numbers Authority (IANA)
RegDate:        1998-01-27
Updated:        2014-01-09
Comment:        Computers use addresses starting with "169.254." when they do not have a manually configured address or when they are not told which address to use by a service on the network.  They are commonly called the "link local" addresses.
Comment:        
Comment:        Routers are not allowed to forward packets sent from an IPv4 "link local" address, so they are always used by a directly connected device.
Comment:        
Comment:        These addresses were assigned by the IETF, the organization that develops Internet protocols, in the Standards Track document, RFC3927, which can be found at:
Comment:        http://datatracker.ietf.org/doc/rfc3927
Ref:            http://whois.arin.net/rest/net/NET-169-254-0-0-1


OrgName:        Internet Assigned Numbers Authority
OrgId:          IANA

Have a look here https://en.wikipedia.org/wiki/Private_network as well
It seems that whether you did something without realising or some software has changed things it is different to what worked before.
There are few rewards greater than accomplishing a difficult task. Just because something doesn't cost money doesn't mean there is no cost. Every success makes the next one easier. Of course that takes determination and patience.

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: unable to connect to internet via wifi dongle

Sun Sep 20, 2015 7:39 am

169.254.xxx.xxx is not an internet address it's the link-local address block that is used when your DHCP server is not contactable or refuses to send a DHCPOFFER packet.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

buteman
Posts: 133
Joined: Tue Jul 03, 2012 9:06 am
Location: Barrow upon Humber

Re: unable to connect to internet via wifi dongle

Sun Sep 20, 2015 1:14 pm

Yes, that's what the result of the whois cammand showed.
There are few rewards greater than accomplishing a difficult task. Just because something doesn't cost money doesn't mean there is no cost. Every success makes the next one easier. Of course that takes determination and patience.

thinman
Posts: 13
Joined: Fri Jul 25, 2014 12:56 pm

Re: unable to connect to internet via wifi dongle

Mon Sep 21, 2015 12:26 pm

@buteman here is the thing
I don't have a monitor or keyboard to connect to raspberry pi so i assigned a static ip address to my pi by edifitng the cmdline.txt file in the SD card and assigned the ip address to my pi as 169.254.78.30::169.254.78.226 after that to connect to the internet i used my friend's laptop which is connected to the internet..we have a systemof static ips assiged to each of the pcs in the college so to connect my pi to the internet i'm using a dongle which connects to laptops acting as a hot spot(i'm using connectify software to do it) the dongle is successfully connecting to the hotspot but upon connecting to the internet it fails and shows the following resuts

Code: Select all

sudo apt-get update
Err http://mirrordirector.raspbian.org wheezy Release.gpg
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://raspberrypi.collabora.com wheezy Release.gpg
  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)
Err http://archive.raspberrypi.org wheezy Release.gpg
  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)
Ign http://mirrordirector.raspbian.org wheezy Release
Ign http://raspberrypi.collabora.com wheezy Release
Ign http://archive.raspberrypi.org wheezy Release
Err http://raspberrypi.collabora.com wheezy/rpi armhf Packages
  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)
Err http://archive.raspberrypi.org wheezy/main armhf Packages
  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)
Err http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB
  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)
Err http://archive.raspberrypi.org wheezy/main Translation-en_GB
  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)
Err http://archive.raspberrypi.org wheezy/main Translation-en
  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)
Err http://raspberrypi.collabora.com wheezy/rpi Translation-en
  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/main armhf Packages
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/contrib Translation-en
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/main Translation-en
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/non-free Translation-en
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
Err http://mirrordirector.raspbian.org wheezy/rpi Translation-en
  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/Release.gpg  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/Release.gpg  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/wheezy/Release.gpg  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/contrib/binary-armhf/Packages  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/non-free/binary-armhf/Packages  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/rpi/binary-armhf/Packages  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/contrib/i18n/Translation-en_GB  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/contrib/i18n/Translation-en  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/main/i18n/Translation-en_GB  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/main/i18n/Translation-en  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/non-free/i18n/Translation-en_GB  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/non-free/i18n/Translation-en  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/rpi/i18n/Translation-en_GB  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/rpi/i18n/Translation-en  Something wicked happened resolving 'mirrordirector.raspbian.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/rpi/binary-armhf/Packages  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/rpi/i18n/Translation-en_GB  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/rpi/i18n/Translation-en  Something wicked happened resolving 'raspberrypi.collabora.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/wheezy/main/binary-armhf/Packages  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/wheezy/main/i18n/Translation-en_GB  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/wheezy/main/i18n/Translation-en  Something wicked happened resolving 'archive.raspberrypi.org:http' (-5 - No address associated with hostname)

i tried changing the DNS to 8.8.8.8 nd 8.8.4.4 but no luck
i'm not much of an expert ips but this was the range of IPs i was instructed to assign my pi when i wanted to operate it Via SSh using putty here are the two links i used

https://pihw.wordpress.com/guides/direc ... onnection/

http://www.dexterindustries.com/howto/c ... beginners/

so do tell me wherei'm going wrong

buteman
Posts: 133
Joined: Tue Jul 03, 2012 9:06 am
Location: Barrow upon Humber

Re: unable to connect to internet via wifi dongle

Mon Sep 21, 2015 2:06 pm

What did you get when you did

Code: Select all

Route -n
Please post the result of that and also

Code: Select all

ifconfig
Can you tell me what your WAN address is?
That's the internet facing ip address your ISP gives your modem.
You should be able to find it on your modem/router's web interface somewhere.
The 169.254.xxx.xxx address range is for Direct connection that is one computer to another not so you can get onto the internet.
There are few rewards greater than accomplishing a difficult task. Just because something doesn't cost money doesn't mean there is no cost. Every success makes the next one easier. Of course that takes determination and patience.

thinman
Posts: 13
Joined: Fri Jul 25, 2014 12:56 pm

Re: unable to connect to internet via wifi dongle

Fri Sep 25, 2015 5:12 am

Solved!! i changed my ip addres an put the last digit just next to what the dhcp assigned to my laptop which is 169.254.78.220 nd my laptop's was 169.254.78.221 seems assigning the last one as 3 created some issues i'm not sure if there is any explanation for it..but thanks to all of u for helping out..!!! would not have been able to do it without u guys.. thanks a lot!!

Return to “Networking and servers”