I have only Internet connection on my smart phone. I am using Wi-Fi hotspot for my laptop from my phone to connect to Internet. I have no wired connection for accessing Internet. I am using Raspberry Pi2 model B which has no in-built Wi-Fi. But I set-up a USB Wi-Fi dongle from my friend's house who is using Desktop computer by connecting Raspberry Pi instead his CPU. Inorder make this I edited the network interfaces by using following command sudo nano /etc/network/interfaces as follows:

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface  eth0 inet manual
allow-hotplug wlan0

auto wlan0

iface wlan inet dhcp
           wpa-ssid "arun"
           wpa-psk "ar3k57u4"

Then I returned to home and installed virtual Wi-Fi router on my laptop to make laptop as a hotspot with same ssid given above. Then I installed an application named Fing on my Android smart phone. Then I turn on my Wi-Fi and connected to hotspot on my laptop. Then virtual Wi-Fi router said two devices connected to the hotspot: one is my Raspberry Pi and other is my phone. To know the IP address of Raspberry Pi turn on Fing Network tools of my phone. And the IP address is typed on PuTTY SSH telnet client and login to my Raspberry Pi. Then I turned on my phone's hotspot and data which has same SSID and password as on my network interfaces file of RasPi. Then I checked for Internet connection of Raspberry Pi using ping google.com and also I checked for new connection using iwconfig and sudo ifconfig eth0 up etc..But it doesn't show internet connection. And I also find that the Fing Network tools showing each time a new IP address for Raspberry Pi. How can I make IP address of Raspberry Pi static? Also I want to know how can I connect to Raspberry Pi and PuTTY without making my laptop as a virtual router of hotspot? Advanced Thanks...

  • to clarify your question. You use your android phone as tethering AP. You want that your raspberry connects the android AP and you want to access your raspberry with your windows laptop? Guess the easiest way is also to connect your Laptop to the Android AP. You should be able to resolve the hostname of your RPi from Windows and connect on PuTTY with the hostname instead the IP. – Joe Platano Mar 16 '17 at 4:13
  • Yes, Joe Platano your assumption is correct. I want to know which you are saying. Since I am an Indian guy I can't write English with more clarity and brevity. Could you please help me? – Arun Mar 16 '17 at 5:04
  • @JoePlatano You are correct. I want to know exactly what you are commented. I can't write English with more clarity and brevity since I am an Indian. I need your help... – Arun Mar 16 '17 at 5:09
  • I am neither a native English speaker. Can you connect both, the RPi and your laptop to the android AP? Can you resolve the Hostname of the RPi? I guess the changing IP addresses are a security feature of Android. But if the host name can be resolved the IP doesn't matter. – Joe Platano Mar 16 '17 at 5:47

Your Answer

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

Browse other questions tagged or ask your own question.