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

  • Connected to the same network/subnet? like in bond? – Havnar Jan 27 '16 at 11:36
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.

0

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.