Page 1 of 1

Set up as WiFi client and AP with SSH?

Posted: Wed May 13, 2015 4:22 pm
by ghuntington
Hi everyone, long time lurker, first time poster. I have a question that my googling hasn't been able to answer, so here goes.

I have two Pi's, Pi#1 (v2) and Pi#2 (B model), as well as 2 WiFi dongles, Edimax and Mercury with RTL8188CUS/RTL8188EU chip.

I currently have Pi#1 set up as a WiFi client (not ethernet) on my home network, and can SSH into it, works great.

However, I would also like to be able to set up Pi#1 as an access point to use in the field (no ethernet/internet), and be able to SSH into it, and ideally use the 3G internet access from my phone, via bridging I assume.

Could I assign that task to the Pi#1, or can a Pi only have the role of either WiFi client or AP, meaning that I would need to set up Pi#2 with a dedicated AP? I realize the type of WiFi adapter comes into play, which is why I mentioned them.

Ideally, I would like to use Pi#1 for both roles as I would prefer to utilize Pi#2 as a VPN router plugged into my router via ethernet.

Can anyone come up with some suggestions on what I should do? Thanks very much

Re: Set up as WiFi client and AP with SSH?

Posted: Wed May 13, 2015 5:25 pm
by ghuntington
Looking into this further, it seems like the best idea would be to use a separate SD card set up for AP mode. Swithing to that card would allow me to use Pi#1 if I'm going to be away from my home network. I welcome any suggestions however, thanks!

Re: Set up as WiFi client and AP with SSH?

Posted: Thu May 14, 2015 4:12 am
by LinuxCircle
You would need 2 Wifi dongles and assign each one with different IP addresses.

Full tutorial can be found here:
http://www.linuxcircle.com/2015/04/21/b ... erry-pi-2/

Re: Set up as WiFi client and AP with SSH?

Posted: Thu May 14, 2015 4:42 am
by bobstro
Please clarify what you're doing with Pi2 and when. I'm understanding it will be plugged into a router at the remote location via wired Ethernet. If so, assuming you'll have both RPis with you on the road, it sounds like you could configure Pi2 as an AP and connect to it with both Pi1 and your laptop. You will be able to ssh from your laptop into either RPi (assuming you've set them up correctly) and you can configure Pi2 as a router with NAT over the wired interface or route over your VPN connection.

If that's not what you're after, with 2 USB adapters, you can certainly configure Pi1 as both AP (with hostapd) and wifi client. You can choose to bridge, route or NAT traffic between the AP interface and either the other (client) wifi or wired Ethernet adapter.