Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Connecting with an incar web server (with no outside data connection)

This site may earn commission on affiliate links.
I want to connect to a raspberry pi web sever while parked but the server will have no outside data connection (I want to be able to serve pages local to the pi)

Currently, when I try to connect, theccar to the pi, I get:
Could not connect to network
Unable to obtain IP Address. Please check DHCP server settings.

I have tried rebooting the car.
The car connects fine with my 5g and 2g home networks.
Yet I am able to connect to the pi with a laptop or cell phone.

Any suggestions would be most helpful!
 
Too little information to help here. I assume the pi is setup as a hotspot/access point? And you configured your Tesla to connect to that hotspot? Are you not seeing the SSID in the Tesla drop down? Or is the SSID hidden? If so, have you configured the SSID and PSK manually? Have you tried to unhide the SSID and see the car now sees it?
I remember reading the antenna for the wifi is on one of the wing mirrors. Not sure how the aluminum and steel would affect signal nor how powerful the pi in AP mode can transmit. Try moving the pi out side the car and try again.
 
I want to connect to a raspberry pi web sever while parked but the server will have no outside data connection (I want to be able to serve pages local to the pi)

Currently, when I try to connect, theccar to the pi, I get:
Could not connect to network
Unable to obtain IP Address. Please check DHCP server settings.

I have tried rebooting the car.
The car connects fine with my 5g and 2g home networks.
Yet I am able to connect to the pi with a laptop or cell phone.

Any suggestions would be most helpful!
So you have a DHCP server running on the Pi?
All the car is wanting is a IP address
 
Too little information to help here. I assume the pi is setup as a hotspot/access point?
Correct
And you configured your Tesla to connect to that hotspot?
Correct
Are you not seeing the SSID in the Tesla drop down?
Correct
Or is the SSID hidden?
I can see it
If so, have you configured the SSID and PSK manually? Have you tried to unhide the SSID and see the car now sees it?
I remember reading the antenna for the wifi is on one of the wing mirrors. Not sure how the aluminum and steel would affect signal nor how powerful the pi in AP mode can transmit. Try moving the pi out side the car and try again.
Not a problem as I can access it from the center console as well as outside of the garage(!) I didn't realize the pi had that kind of range!
 
Thanks for the suggestion! This is probably the problem. What range should I be using?
Been a while since I hooked mine up. If you're just using it as access point for a local server an not passing any traffic beyond the RP then it doesn't matter. Just pick something not in the RFC1918 range.

If you are using as a hotspot and passing traffic through to the internet then you need to configure it to not pass through the address your giving the RP. Can't remember which configuration file off hand(IPtables or Hostapd or sysctl).
 
Thanks for the suggestion! This is probably the problem. What range should I be using?

I'm not home at the moment and cannot run any tests, but according to RFC 1918:
"In Class A, 10.0.0.0/8 prefix range.
Class A private IPv4 addresses starts from 10.0.0.0 to 10.255.255.255. 10.0.0.0/8 is the network IPv4 address and10.255.255.255 is the directed broadcast IPv4 address."

My home range is 10.13.xxx.xxx and the car connects to it without any issues. I am not a network engineer and I am confused. Please explain...
 
Last edited:
  • Like
Reactions: APotatoGod
Been a while since I hooked mine up. If you're just using it as access point for a local server an not passing any traffic beyond the RP then it doesn't matter. Just pick something not in the RFC1918 range.

If you are using as a hotspot and passing traffic through to the internet then you need to configure it to not pass through the address your giving the RP. Can't remember which configuration file off hand(IPtables or Hostapd or sysctl).

I am hosting an http server on my iphone and using it as a personal hotspot (default gateway address 174.20.10.1). can’t access the web server when the car is connected to the hotspot!
is there a way around this?
read that some Tesla owners do not have problems accessing local ips??!
thanks
 
You are going to need to put an RP "in between" the phone and the browser. The RP acts as both an AP access point (for the browser) and a wifi client (for your IPhone wifi network). You need to configure the RP to pass all traffic through the IPhone WAN, except for the IP of the server which gets routed to the LAN.

If you can it might be easier to just run the server on an RPI and not have to worry about the pass through.
 
You are going to need to put an RP "in between" the phone and the browser. The RP acts as both an AP access point (for the browser) and a wifi client (for your IPhone wifi network). You need to configure the RP to pass all traffic through the IPhone WAN, except for the IP of the server which gets routed to the LAN.

If you can it might be easier to just run the server on an RPI and not have to worry about the pass through.
but in terms of the browser ability to access local ips ?? what ip range do suggest when setting up the pi AP...?!
my browser can’t access any local ips in my home network! (192.168.2.x)....?!
thanks
 
If you are using an RP and setting up your own DHCP on it you can use any network range you want. As long as it's not in RFC1918 range. Then either put your server on the RP and it give it a static IP address within that range. Or in the case where your server is on an IPhone, have the RP direct the "non-local" IP on the RP to the "local" IP on your IPhone.

The trick is to pass all traffic from the LAN to the WAN except for the static IP address of your server. Otherwise you'll end up with the content of that address from the web.
 
If you are using an RP and setting up your own DHCP on it you can use any network range you want. As long as it's not in RFC1918 range. Then either put your server on the RP and it give it a static IP address within that range. Or in the case where your server is on an IPhone, have the RP direct the "non-local" IP on the RP to the "local" IP on your IPhone.

The trick is to pass all traffic from the LAN to the WAN except for the static IP address of your server. Otherwise you'll end up with the content of that address from the web.


Thank u so much!
new to rasbperry pi! which one do u suggest putting in the car ... 3b plus or the 4??
do u suggest a specific kit?
distro?

thanks
 
The TeslaMirror app can run its web server on iOS and Android devices. As the older post said, "The Tesla browser won't connect to the RFC 1918 local address range." So for TeslaMirror app, the web server IP for iOS is 240.3.3.3, and the web server IP address is 3.3.3.3 for Android. Both 240.3.3.3 and 3.3.3.3 IP run on the mobile phone. I also heard that if the mobile router can set the network segment other than RFC 1918 local address range, it works for the Tesla connection too. Hope this will help.
 
  • Informative
Reactions: APotatoGod