1

I've followed an article (https://www.raspberryconnect.com/projects/65-raspberrypi-hotspot-accesspoints/158-raspberry-pi-auto-wifi-hotspot-switch-direct-connection) to be able to access Raspberry Pi hotspot when it's offline, it works perfectly, and I can SSH my android phone to it.

Here comes the problem,

I can SSH to the Raspberry Pi BUT with my phone data off.

I need to have it on because I'm hitting different endpoints accessible just with internet obviously, and apparently it's an Android issue and with iOS should work (Can't try because I don't have Iphone).

More info: The SSH client I'm using is JuiceSSH, but my goal is to use a React Native mobile app with this library https://github.com/shaqian/react-native-ssh-sftp

To connect to the wifi I'm using https://github.com/JuanSeBestia/react-native-wifi-reborn

I've opened an issue too in their project - https://github.com/JuanSeBestia/react-native-wifi-reborn/issues/41

It's there anybody facing the same issue?

Is it possible that Wifi-Direct will help to fix this issue?

Note: I don't think it has anything to do but I'm using Raspberry Pi Zero

Thanks in advance.

1 Answers1

0

I think I have faced this problem a while ago. I noticed that the Terminal App which I was using (Terminus) wasn't able to resolve a local client's hostName when mobile data is on, it is probably switching to google DNS service and fails to resolve hostName locally; when mobile data is off, is resolves it normally.

Try to use the IP address when you establish the connection rather than using the hostName.

f.khantsis
  • 3,256
  • 5
  • 50
  • 67