1

Found this which might solve my WiFi problem - I'll try it out in the next few days.

How do I set up networking/WiFi/static IP address?

My question is will I be able to set up both a WiFi and an Ethernet connection and have them running at the same time with this method? It worked OK with the old version of Raspbian.

SteveW - Wellington - New Zealand

Steve W
  • 19
  • 3

3 Answers3

1

I'm currently using Ethernet (static IP) plus WiFi (IP assigned by my router) and it works without any issues. For a default installation of Raspbian the only things you need to touch are:

  • /etc/network/interfaces - the default content provided with the current installation of Raspbian Jessie already has a manual eth0 profile plus two wlan interfaces (wlan0 and wlan1) both of which refer to the wpa_supplicant.conf

  • /etc/wpa_supplicant/wpa_supplicant.conf - here you define your WiFi networks. I have two interfaces (one for home and one for work). Don't forget to use the wpa_passphrase to generate a secret token for the passwords you enter in these profiles. Many tutorials go for the plain text storage which is a very poor decision especially if you access other WiFi networks other than the one you own. Using this command not only increases your security but also outputs a ready-to-use profile for wpa_supplicant (you only need to remove the line where the original password that you used as input for the command is written in the form of a comment). You can even pipe the output of that command directly to your configuration file and attach it at its end. The name of the WiFi profile has to be the same that you use in your interfaces file!

  • /etc/dhcpcd.conf - here you define the Ethernet interface and its static IP. Again name has to be the same as the one you have used in your interfaces file just like in the previous bullet point. If you want to connect your Pi directly to your notebook/PC and don't need a router or anything a

    interface eth0
    static ip_address=X.X.X.X/X
    

    will do (for example: 192.168.1.101/24 is on my notebook's side, 192.168.1.102/24 and respectively 192.168.1.103/24 are for my first and second Pis; you can use a simple cheap network switch to connect all three in the same tiny local network without any access to the outside beside the WiFi your devices have)

Hope this helps.

rbaleksandar
  • 257
  • 1
  • 3
  • 11
0

please note the difference of wpa-conf and wpa-roam

koyeung
  • 41
  • 2
0

You can use RPi with both connections at same time. And it all depends what you would like to acheive with those connections. To use dhcp assigned addresses you don't need to change almost anything, only wpa-supplicant configuration to connect to WiFi (SSID/network password).

With static addresses I was changing settings in /etc/network/interfaces for now and I didn't have issues or problems.

So if you describe your wish a bit more in detail I can write more detailed answer.

Bungee75
  • 121
  • 4