1

I set my RPi to have a fixed IP.

First Scenario: After connecting my RPi to my WiFi I opened Terminal on my mac, type ssh pi@192.168.0.38 and I log in with password raspberry. It workes.

Second Scenario: I create a Personal Hotspot using my iPhone. I connect my RPi to that Personal Hotspot. I connect my Mac to that Personal Hotspot. I opened Terminal on my mac, type ssh pi@192.168.0.38 and

After a while, the terminal shows

ssh: connect to host 192.168.0.38 port 22: Operation timed out

closed as off-topic by Milliways, Ingo, Ghanima Mar 9 at 18:37

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – Milliways, Ingo, Ghanima
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    This is not a Pi question but an iPhone issue. – Milliways Feb 26 at 22:51
  • I really need help, and maybe other people will have the same issue. Apple doesn't care about Raspberry Pi trying to use their iPhone hotspot. – Thiago Farias Feb 27 at 16:00
1

It is possible that the IP address of the Raspberry Pi is not 192.168.0.38. What does running 'hostname -I' show on the Raspberry Pi?

Edit to add: The local subnet created by the personal hotspot likely is not 192.168.0.0/24. Let the Raspberry Pi get its address via DHCP from the hotspot instead of a fixed address.

  • The static ip address is 192.168.0.38 without any doubt. It works on the WiFi (whatever WiFi is meant). – Ingo Feb 27 at 0:50
  • | . pi@raspberrypi:~ $ hostname -I" . | | . "192.168.0.38" . | . My Raspberry Pi definitely has the IP 192.168.0.38 that I fixed to be. I cannot let the DHCP give a ramdom IP to my Raspberry pi. I have some ESP8266 that talks to my RPi via MQTT, so my Raspberry Pi needs to have a static IP address. – Thiago Farias Feb 27 at 15:54
  • One possible way is if your router has the capability to act as a wireless bridge. It connects to the iphone hotspot and the RPi and Mac remain connected to the routers WLAN. Another option is if the iPhone hotspot internal network can be changed to the 192.168.0.0/24 but AFAIK, there is no such option in the settings. A third option is to get a wireless USB adapter for your RPi. This connects to the iPhone hotspot while the on board RPi wifi connects to your home router. – rprr Feb 27 at 18:11

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