7 Replies Latest reply on Dec 13, 2013 8:29 AM by John Beetem

    I need help connecting to internet

    zombiepigman96

      First off, I'll introduce myself. My name is Dan, and I am a pc tech/repair guy during my free time. I am young, so I don't have a lot of knowledge yet, but I am learning. I currently have next to no knowledge of how to navigate any Linux distro.

       

      My issue is in internet connections. I have connected my pi (type b with pimame/raspbian os) to my router via a normal cat5 ethernet cable, and expected the network lights to blink. The result was disappointing, the lights did not blink, neither did I have access to the web through midori. The router is configured to use DHCP (I cannot access that part of my router, however my dad can, and he is a CTO for a school district). I have looked all over the internet for why this would happen, and have found no documentation for what to do in this situation. I am not sure what to do, I really only want to install ndiswrapper, that way I can install win2k drivers for my USB Wi-Fi dongle (D-link DWA-130 version E1), that way I can have wireless connection. I have also tried connecting to my pc. I connected the two with a standard ethernet cable, and installed PuTTY in order to connect the two. I get an error that the connection timed out. I have also gone the route of modifying the cmdline.txt and adding my pc's ipv4 address (which is not static I believe). I have also gone into the terminal on my pi in order to set an ip address, but that doesn't seem to assist me at all in my connection with my pc, or router.

       

      If there is any way to fix my ethernet port or board (if broken), or install ndiswrapper via and offline installer or download, I would be grateful. This "malfunction" is starting to get on my nerves. If you need any more information, I would be glad to provide it.

       

      Thanks.

        • Re: I need help connecting to internet
          marka

          Can you find your Pi's MAC address?  (The hardware address for your Ethernet port.)

          In a terminal window us ifconfig to see what it is.

           

          When I got my  Pi last weekend I couldn't connect to the Ethernet either. I was using a 5V 1 Amp phone charger and got a null (00:00:00:00:00:00) MAC address which is clearly invalid.

           

          After I purchased and used a 5V 2A universal (usb) charger the Raspberry Pi would connect to the internet (with a valid MAC address).

           

          My conclusion is that my original power supply wasn't really 1 amp and  simply didn't deliver enough power.

            • Re: I need help connecting to internet
              zombiepigman96

              Here are the MAC addresses you requested:

               

              etho: b8:27:eb:26:a9:b4

               

              lo: addr:127.0.0.1

              EDIT:

              I bought the pi in a starter kit with a power supply included

                • Re: I need help connecting to internet
                  iagorubio

                  Hello dan.

                   

                  If the lights are not turning on that's not a configuration issue, but a hardware issue most likely as the lights indicate activity that's at the hardware level - data link.

                   

                  That shows a faulty cable or faulty network interface on any end. If there is no link between the hardware devices no configuration will ever fix it.

                   

                  Try with another cable or plugin it on a working port in your router.

                   

                  About the ndiswrapper, I fear it won't work in the Raspberry Pi.

                   

                  ndiswrapper is a device driver wrapper to make windows device drivers to work on Linux. It does that interfacing the NDIS Windows API - Network Driver Interface Specification, with the Linux Kernel. The problem here is the device driver code it will interface - windows driver - is written for another architecture - x86 - so It can't really work in an ARM system as the Raspberry Pi.

                   

                  For it to work it would have to translate x86 instructions to ARM ones, but such an interpreter would be too slow to work for a device driver.

                   

                  It only works with x86 and x86-64. It can interface with other architectures as PowerPC but is pointless because there are no Windows drivers for the PowerPC.

                   

                  My advice is to go for a dongle for your Raspberry instead of trying to savage an unsupported one.

                   

                  There are lots of them quite cheap, and you can go for a good dongle with good support that can do more things for you in the long run: http://elinux.org/RPi_USB_Wi-Fi_Adapters

                   

                  As example dongles with the Realtek RTL8188CUS chipset are know to work well in your Pi even as a wireless Access Point so you can get your Pi with you and make a private Wireless network for your friends to play games, share files or to learn a bit about network security checking out what goes through the Raspberry in a wifi session.

                   

                  If you change the cable and the link works but you still have problems for connection I will be happy to help with that, just post it here.

                   

                  Happy hacking.

              • Re: I need help connecting to internet
                a.pergola

                Hello Dan,

                have you try using a cross-over cable?

                When you directly connect two client with an ethernet cable you must use a cross cable.

                You have to use a cross cable also if you connect a client directly to a router port if it has not an integrated switch.

                A straight cable is fine to connect router, server or client to a switch.

                 

                Ethernet port use two pairs of the rj45 connector: pins 1-2 and 3-6.

                A standard cable (straight cable) connect pins 1, 2, 3 and 6 of one connector to the same pins of the other connector.

                A cross cable connect pair 1-2 of one end to pair 3-6 on the other end, and pair 3-6 to pair 1-2.


                Enjoy your raspy....

                  • Re: I need help connecting to internet
                    budmaddock

                    If the on board led's don't flash when the Pi is first plugged in then the problem is the Pi hardware.  If the lights flash and then go out leaving just the red led lit it means no connection was found so the cable is suspect.  If you are plugging into a Gigahertz port on the router or Windows PC the crossover/straight cable mentioned above isn't an issue but it does matter with the 10/100 ports.

                     

                    My first need is to get the Pi onto a wireless connection.  Plug in a Linux compatable dongle (Edimax used here) before applying power to the Pi.  Now power it up and in a terminal on your remote pc type:

                    ssh pi@raspberrypi

                    If it asks for a password everything network is working.  The default password is raspberry.

                     

                    Unfortunately most wireless hosts will be password protected so this will fail and a cable connection must be used to enter the  required information into /etc/network/interfaces. 

                    Try adding these two lines at the bottom of that file

                    wpa-ssid "FRITZ!Box 3272"

                    wpa-psk  "xxxxxxxxxxxxxxxxxxx"

                    replacing the above with your box and WPA-2 number from the label on the router.

                    Reboot everything and DHCP should find everybody and make the connections automatically.

                     

                    Detailed debugging:

                    On windows, a knoppix live-cd is booted to get the GNU tools or gnuwin32 on sourceforge might be preferable in some cases but I have never used it.  

                     

                    Here are the tools used, there are lots of others.  'WireShark' is good for packet content examination.

                    lsusb

                    lsmod

                    traceroute raspberrypi

                    The following are available in raspbian OS but are not on a default Debian install. 

                    iwconfig

                    ifplugstatus

                    iwlist scanning

                    Grep is a great help. It locates a word or phrase and then returns the line of text in which it was found.  A pipe "|" takes the output of the command to its left and uses it as input for the command on its right.

                    lsusb | grep Wireless

                    The Realtek RTL8187 is found on my PC and RTL8188 on the Pi.  Your Pi should be the same.

                    iwconfig returns Wireless Device parameters like ESSID: Access Point: and their related MAC address.

                    traceroute raspberrypi

                    can be typed on the pc command line and a return gives the IP number assigned by DHCP to the Pi.

                    nmap is used to find what is connected where to my router.

                    nmap -v -sn 192.168.188.*

                    The 188 could be 178, 202, or near anything so look in your router manual to get that information.

                     

                    Ifconfig is depricated, "ip" has replaced it. Either can be used to read or modify your internet configuration.

                    ifconfig

                    Returns the configuration of each ethernet connection available on your PC.  The MAC, and IP are given for each available interface.  When ifconfig is used to change nework parameters they are again lost on reboot.

                    ifup eth0

                    could bring your LAN to life if it is not set to start during the boot process.   

                    Finally, to add wlan security info, sudo nano /etc/network/interfaces and modify it.

                    This file must retain the lines

                        auto lo  

                        iface lo inet loopback

                    Everything else can be changed. 

                    My /etc/network/interfaces follows: 

                       auto lo

                       iface lo inet loopback

                     

                       iface eth0 inet dhcp

                     

                       auto wlan0

                       allow-hotplug wlan0

                       iface wlan0 inet dhcp

                       wpa-ssid "Probably your router name"

                       wpa-psk  "A very long number from the label on the router"

                     

                    Defaults handle everything else.  The eth0 line is only needed for a wired LAN connection

                    while the wlan0 block and wpa security information are only needed for wireless. 

                    A minimal wired configuration would be:

                    auto lo

                    iface lo inet loopback

                    iface eth0 inet dhcp

                    Inline comments are not allowed.  Lines beginning with a # are comments and not read.

                    Putting a # in front of each line not shown above should get your system up using defaults.

                     

                    The howto:

                    sudo nano /etc/network/interfaces and comment it to the minimal content given above with wlan0

                    chmod 600 /etc/network/interfaces if it doesn't work but this should already be the default security.

                    sudo ifup wlan0

                    shutdown -h now

                    unplug the Pi, unplug the LAN cable and plug in the USB wireless dongle (Edimax EW-7811Un in my case).

                    plug in the Pi again and switch on the power.

                    Open a terminal on the remote PC and type

                    ssh -X pi@raspberrypi

                    enter you password (raspberry)

                    startx

                    If you only use the internet for downloads then forget "startx" and simply test for internet connectivity with

                    ping 2.2.2.2

                    Check reverse name lookup with:

                    ping google.com

                    It may also be necessary to unplug your router for 30 seconds to get it to recognize wireless connections.

                    • Re: I need help connecting to internet
                      John Beetem

                      Andrea Pergola wrote:

                       

                      Hello Dan,

                      have you try using a cross-over cable?

                      When you directly connect two client with an ethernet cable you must use a cross cable.

                      You have to use a cross cable also if you connect a client directly to a router port if it has not an integrated switch.

                      A straight cable is fine to connect router, server or client to a switch.

                       

                      Ethernet port use two pairs of the rj45 connector: pins 1-2 and 3-6.

                      A standard cable (straight cable) connect pins 1, 2, 3 and 6 of one connector to the same pins of the other connector.

                      A cross cable connect pair 1-2 of one end to pair 3-6 on the other end, and pair 3-6 to pair 1-2.

                       

                      Enjoy your raspy....

                      You shouldn't need a cross-over cable with RasPi.  The LAN9512 chip supports Auto-MDIX and I think it's enabled by default.

                    • Re: I need help connecting to internet
                      krajaking1

                      hello dan,you can check raspberry operating system rasbian or go to linux..