Closed tomicooler closed 4 years ago
Hi there, Thanks for feedback. These are what I guess you could try (and hmmm may not help):
./lnxrouter -n
. The right way to do is don't use -n
, so on pi wlan0
and wlan0_ap
can forward each other's traffic.phone details $ ip route show 192.168.27.0/24 dev wlan0 proto kernel scope link src 192.168.27.204
There should also be default via 192.168.27.10
so the phone knows where to reach the gateway. Is it there on phone's routing table?
Pinging the phone from the laptop works, but the time varies 20-400 ms.
If the phone's screen is off, the phone's wifi may go in powersaving mode.
Hi,
Well, I eventually got a decent workaround for this. I bought a WiFi adapter, so I have 2 interface on my Pi (wlan0 the internal, wlan1 the wifi adapter). I make the hotspot with my phone, the Pi connects to this network with the wlan0 interface (static ip) (because it is faster, and between the Pi <-> Phone there is a bigger traffic, like a screen sharing..), and the wlan1 connects to the OBD's wifi.
The wifi adapter is a Tenda U3 (quite a cheap one), but it said it can do Soft-AP. My original plan was to create the hotspot on the Pi with this Tenda U3, but as I found out Soft-AP is not what I thought it was. They state in their documentation:
Adapter and SoftAP. SoftAP can transfer your computer's wired network into wireless signal. SoftAP is working only when PC could access the internet.
As far as I remember when I made the virtual wlan0_ap interface on the Pi, and the wlan0 was connected to my home wifi network (which had internet access as well), everything was working with one interface on the Pi. Maybe due to similar reasons that this SoftAP means.
Anyway. Thanks for the help! I close the issue.
Hi,
i'm trying to achieve something with my Raspberry Pi 3B and an Android phone. Unfortunately I'm stuck. I think the real problem is the Android 10's routing, because the AP that I create on my Raspberry works with a laptop. Anyway I try to summarize what I've learned about the problem, and maybe you might come up with a solution/workaround.
First, I have a WiFi OBD (on board diagnostic) that creates a network.
ip route show (on my phone)
If I connect to this network with my phone, I must turn off the mobil data first, then I can ping 192.168.0.10 and I also able to communicate with the obd interface. Unfortunately If I connect more devices, the devices can't ping each other just the gateway. So my idea: raspberry connects to the Wifi_OBDII network and simultaneously creates an AP. My service on pi can communicate with the obd interface, and my phone can communicate with the pi. The phone doesn't need to access the obd interface.
More info on WiFi_OBDII (from my laptop)
Details about how I tried to use linux-router.
192.168.27.204 is my phone. 192.168.27.181 is a laptop. The laptop works, I mean from the laptop I can ping 192.168.27.10 the gateway.
I can ping the phone from the pi
I can ping the phone from the connected laptop as well.
But I can't ping the gateway from the phone.
phone details
I can ping the connected laptop from the phone, but I can't ping that damned gateway.
This is how I created the wlan0_ap on the pi.
Anyway, since the WiFi_OBDII creates a network where the gateway is accessible from my android phone, there must be a way to achieve this, isn't it?
I use archlinux on the raspberry.
Update: pinging the gateway from the laptop is working sometimes, but sometimes is not. Pinging the phone from the laptop works, but the time varies 20-400 ms.
Idea 2: hotspot on my phone. And connect the pi to two network simultaneously, but can't do that either.
Maybe I should get an usb wifi adapter for the pi to have 2 separate interface.