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

Anyone still rocking a Pi Zero W smart drive for TeslaCam on Sentry Mode?

This site may earn commission on affiliate links.
I don't think your Pi has internet access and therefore setup can't download the scripts to finish setup. Run ping github.com after you ssh into your pi, you should get responses like (press <CTRL>+C to quit ping):

PING github.com (140.82.114.3) 56(84) bytes of data.
64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=1 ttl=50 time=27.2 ms
64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=2 ttl=50 time=35.4 ms
64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=3 ttl=50 time=32.4 ms
^C​

Also run ifconfig and look for your wireless connection, it should look something like this:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.144 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba27:ebff:fecf:9457 prefixlen 64 scopeid 0x20<link>
inet6 2601:c3:4200:3ac:ba27:ebff:fecf:9457 prefixlen 64 scopeid 0x0<global>
ether b8:27:eb:cf:94:57 txqueuelen 1000 (Ethernet)
RX packets 14552 bytes 1078489 (1.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17398 bytes 1855379 (1.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0​
 
  • Informative
Reactions: focher
I don't think your Pi has internet access and therefore setup can't download the scripts to finish setup. Run ping github.com after you ssh into your pi, you should get responses like (press <CTRL>+C to quit ping):

PING github.com (140.82.114.3) 56(84) bytes of data.
64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=1 ttl=50 time=27.2 ms
64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=2 ttl=50 time=35.4 ms
64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=3 ttl=50 time=32.4 ms
^C​

Also run ifconfig and look for your wireless connection, it should look something like this:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.144 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba27:ebff:fecf:9457 prefixlen 64 scopeid 0x20<link>
inet6 2601:c3:4200:3ac:ba27:ebff:fecf:9457 prefixlen 64 scopeid 0x0<global>
ether b8:27:eb:cf:94:57 txqueuelen 1000 (Ethernet)
RX packets 14552 bytes 1078489 (1.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17398 bytes 1855379 (1.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0​

Thanks emcsssdv, seems to be connecting all OK:

upload_2020-5-17_19-55-58.png


upload_2020-5-17_19-54-40.png
 
Yeah, you’re right it’s connected. To be clear you tried to install originally by:
  1. flashing the pre-built image using etcher.
  2. Ejected the SD card and re-inserted it in your Mac.
  3. Edit and save the sample config file to the root of the SD card as you see it in finder. Note that up to this point the SD card is still in your Mac.
  4. Eject the SD card from your Mac and put it in your Pi, then power up your pi.
  5. Wait a minute or two then ssh into your pi and run: tail -f teslausb-headless-setup.log to monitor the setup, it can take up to 10 min or so.
If that’s exactly what you’ve done then I’m out of ideas then, sorry.
 
Yeah, you’re right it’s connected. To be clear you tried to install originally by:
  1. flashing the pre-built image using etcher.
  2. Ejected the SD card and re-inserted it in your Mac.
  3. Edit and save the sample config file to the root of the SD card as you see it in finder. Note that up to this point the SD card is still in your Mac.
  4. Eject the SD card from your Mac and put it in your Pi, then power up your pi.
  5. Wait a minute or two then ssh into your pi and run: tail -f teslausb-headless-setup.log to monitor the setup, it can take up to 10 min or so.
If that’s exactly what you’ve done then I’m out of ideas then, sorry.

Thanks, again I really appreciate your help. I did not do step 5, so I think I’ll try yet another clean install tomorrow and add this step.
 
I created a file called root and moved the file into that and re-booted. It's still saying it cannot find it.
That is because /boot and /root live on different partitions. You now created a new directory called /boot/root. You should have followed my instructions on the pi:

sudo -i
/root/bin/remountfs_rw
mv /boot/tesla_setup_variables.conf /root/
/root/bin/setup-teslausb

I just don't understand why this is so hard, supposed to be a one click setup...
You had an internet/DNS problem in your network. You really can't blame TeslaUSB for that. Nothing will work properly without internet access these days.
 
That is because /boot and /root live on different partitions. You now created a new directory called /boot/root. You should have followed my instructions on the pi:

sudo -i
/root/bin/remountfs_rw
mv /boot/tesla_setup_variables.conf /root/
/root/bin/setup-teslausb

I definitely did but perhaps out of sequence. I have tried it again now and again it states it cannot find it.

upload_2020-5-18_9-19-26.png


You had an internet/DNS problem in your network. You really can't blame TeslaUSB for that. Nothing will work properly without internet access these days.

I did fix this and confirm connectivity. I had assumed in the setup it installs the settings needed, nowhere in any instructions does it state to go into the Pi settings to do so, but noted now. I am going to try another clean install today for what it is worth and see if anything different on this attempt. Again all the help here is much appreciated!
 
sudo -i
/root/bin/remountfs_rw
mv /boot/tesla_setup_variables.conf /root/
/root/bin/setup-teslausb

Tried after clean re-install, updated internet settings (on the Pi) and verified connection. Below is the response in terminal. It just seems that the Pi cannot read any of the files from the SD Card. I have also re-formatted the card to ExFat, installed a new clean installation, added connection credentials to Pi menu and verified connection.

I don't really understand what's wrong with root vs boot, this is the default from the install, but following your guidance, I tried the commands and get the below.

Is there something that could be preventing the Pi from reading the files?

root@raspberrypi:~# sudo -i

SSH is enabled and the default password for the 'pi' user has not been changed.

This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

root@raspberrypi:~# /root/bin/remountfs_rw

-bash: /root/bin/remountfs_rw: No such file or directory

root@raspberrypi:~# mv /boot/tesla_setup_variables.conf /root/

mv: cannot stat '/boot/tesla_setup_variables.conf': No such file or directory

root@raspberrypi:~# /root/bin/setup-teslausb

root@raspberrypi:~#
That is because /boot and /root live on different partitions. You now created a new directory called /boot/root. You should have followed my instructions on the pi:

sudo -i
/root/bin/remountfs_rw
mv /boot/tesla_setup_variables.conf /root/
/root/bin/setup-teslausb


You had an internet/DNS problem in your network. You really can't blame TeslaUSB for that. Nothing will work properly without internet access these days.
 
My commands were meant for you to continue without needed a reinstall. Now that you started over with the correct network settings all should be done automatically. (One-step-setup as promised.) The fact that setup-teslausb returns without error is proof of that.

Your TeslaUSB is good to go.
 
Tried after clean re-install, updated internet settings (on the Pi) and verified connection. Below is the response in terminal. It just seems that the Pi cannot read any of the files from the SD Card. I have also re-formatted the card to ExFat, installed a new clean installation, added connection credentials to Pi menu and verified connection.

I don't really understand what's wrong with root vs boot, this is the default from the install, but following your guidance, I tried the commands and get the below.

Is there something that could be preventing the Pi from reading the files?

root@raspberrypi:~# sudo -i

SSH is enabled and the default password for the 'pi' user has not been changed.

This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

root@raspberrypi:~# /root/bin/remountfs_rw

-bash: /root/bin/remountfs_rw: No such file or directory

root@raspberrypi:~# mv /boot/tesla_setup_variables.conf /root/

mv: cannot stat '/boot/tesla_setup_variables.conf': No such file or directory

root@raspberrypi:~# /root/bin/setup-teslausb

root@raspberrypi:~#

How are you starting this process? Are you flashing the prebuilt image with Etcher or are you downloading the repo from GitHub and copying it to an already formatted SD card with linux already installed? There's no formatting involved if you flash the pre-built image as the image already has the Buster version of the Raspian linux distribution installed and configured for teslausb. If you haven't used the pre-built image on your previous attempts I recommend that you do that. Have you looked at this you tube video:

The actual process I followed starts at about 7:30 into the video.
 
Last edited:
How are you starting this process? Are you flashing the prebuilt image with Etcher or are you downloading the repo from GitHub and copying it to an already formatted SD card with linux already installed? There's no formatting involved if you flash the pre-built image as the image already has the Buster version of the Raspian linux distribution installed and configured for teslausb. If you haven't used the pre-built image on your previous attempts I recommend that you do that. Have you looked at this you tube video:

The actual process I followed starts at about 7:30 into the video.

Thanks for the video...

I am downloading the teslausb-20200122 image from Github.

I have now tried using Wonk's configuration file instead of the default one (I have only changed the SSID & PW and Cam allocation at this point). The only thing he has done different than me is using his Hotpot and putting his laptop on the same network. I have tried the boot up again now joining my laptop to the same network and then trying to see what's happening - once again, the Pi can't read the/any file it seems:

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

Last login: Wed Jan 22 23:47:02 2020 from fe80::182c:d6e:4841:19f7%usb0

pi@raspberrypi:~ $ tail -f teslausb-headless-setup.log

tail: cannot open 'teslausb-headless-setup.log' for reading: No such file or directory

tail: no files remaining

pi@raspberrypi:~ $ ping github.com

PING github.com (140.82.114.3) 56(84) bytes of data.

64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=1 ttl=52 time=39.10 ms

64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=2 ttl=52 time=47.6 ms

64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=3 ttl=52 time=47.8 ms

64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=4 ttl=52 time=46.6 ms

64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=5 ttl=52 time=48.1 ms

64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=6 ttl=52 time=51.9 ms

64 bytes from lb-140-82-114-3-iad.github.com (140.82.114.3): icmp_seq=7 ttl=52 time=46.0 ms
 
You are forgetting the sudo again. When you login as user “pi” you are in the /home/pi directory. After “sudo -i” you are in the /root directory where the config and log files are created.

I had put that in just prior. I thought that then set for the session, but have just tried again now:

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

Last login: Wed Jan 22 23:47:07 2020 from fe80::10d5:74ae:6883:c355%usb0

pi@raspberrypi:~ $ sudo -i

root@raspberrypi:~# tail -f teslausb-headless-setup.log

tail: cannot open 'teslausb-headless-setup.log' for reading: No such file or directory

tail: no files remaining

root@raspberrypi:~#
 
My bad, the log files are in /boot

tail -100 /boot/teslausb-headless-setup.log

Last login: Mon May 18 20:37:30 2020 from fe80::63:b217:9e66:f67%usb0

pi@raspberrypi:~ $ sudo -i

root@raspberrypi:~# tail -100 /boot/teslausb-headless-setup.log

Wed 22 Jan 23:46:16 GMT 2020 : Detecting whether to update wpa_supplicant.conf

Mon 18 May 17:21:45 BST 2020 : Detecting whether to update wpa_supplicant.conf

Mon 18 May 17:21:46 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.

Mon 18 May 17:21:46 BST 2020 : Grabbing main setup file.

Mon 18 May 17:21:47 BST 2020 : Starting setup.

Mon 18 May 17:23:46 BST 2020 : Detecting whether to update wpa_supplicant.conf

Mon 18 May 17:23:46 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.

Mon 18 May 17:23:46 BST 2020 : Starting setup.

Mon 18 May 17:23:59 BST 2020 : Detecting whether to update wpa_supplicant.conf

Mon 18 May 17:23:59 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.

Mon 18 May 17:23:59 BST 2020 : Starting setup.

Mon 18 May 18:22:54 BST 2020 : Detecting whether to update wpa_supplicant.conf

Mon 18 May 18:53:52 BST 2020 : Detecting whether to update wpa_supplicant.conf

Mon 18 May 20:42:09 BST 2020 : Detecting whether to update wpa_supplicant.conf

root@raspberrypi:~#
 
sudo -i
/root/bin/remountfs_rw
/root/bin/setup-teslausb

There has to be something stopping files being read... At every attempt I get 'no file' when I can clearly see the files when I put the SD card into the reader. This is consistent across two separate SD cards so has to be something to do with the file system overall. Just nuts.

root@raspberrypi:~# sudo -i

root@raspberrypi:~# /root/bin/remountfs_rw

-bash: /root/bin/remountfs_rw: No such file or directory
 
This just means the setup did not finish. I think your pi is rebooted before it can finish the setup script.
If /root/bin/remountfs_rw is not there your root partition is most likely still mounted read-write (as is the pi default). Just ignore the error and continue:

sudo -i
/root/bin/remountfs_rw
/root/bin/setup-teslausb
tail -20 /boot/teslausb-headless-setup.log
 
This just means the setup did not finish. I think your pi is rebooted before it can finish the setup script.
If /root/bin/remountfs_rw is not there your root partition is most likely still mounted read-write (as is the pi default). Just ignore the error and continue:

sudo -i
/root/bin/remountfs_rw
/root/bin/setup-teslausb
tail -20 /boot/teslausb-headless-setup.log

I do think there is some form of permissions error or such as it keeps stating No such file for almost every option even when I have verified they are on the SD Card. Here is the latest attempt.

Last login: Mon May 18 23:53:53 2020 from fe80::1873:5f02:8d18:a5bb%usb0

pi@raspberrypi:~ $ sudo -i

root@raspberrypi:~# /root/bin/remountfs_rw

-bash: /root/bin/remountfs_rw: No such file or directory

root@raspberrypi:~# /root/bin/setup-teslausb

couldn't find /root/teslausb_setup_variables.conf

root@raspberrypi:~# /root/bin/remountfs_rw

-bash: /root/bin/remountfs_rw: No such file or directory

root@raspberrypi:~# sudo -i

root@raspberrypi:~# /root/bin/remountfs_rw

-bash: /root/bin/remountfs_rw: No such file or directory

root@raspberrypi:~# /root/bin/setup-teslausb

couldn't find /root/teslausb_setup_variables.conf

root@raspberrypi:~# tail -20 /boot/teslausb-headless-setup.log

After checking the SD Card the log shows again:

Mon 18 May 23:54:11 BST 2020 : Detecting whether to update wpa_supplicant.conf
 
I do think there is some form of permissions error or such as it keeps stating No such file for almost every option even when I have verified they are on the SD Card. Here is the latest attempt.

Last login: Mon May 18 23:53:53 2020 from fe80::1873:5f02:8d18:a5bb%usb0
pi@raspberrypi:~ $ sudo -i
root@raspberrypi:~# /root/bin/remountfs_rw
-bash: /root/bin/remountfs_rw: No such file or directory
root@raspberrypi:~# /root/bin/setup-teslausb
couldn't find /root/teslausb_setup_variables.conf
root@raspberrypi:~# /root/bin/remountfs_rw
-bash: /root/bin/remountfs_rw: No such file or directory
root@raspberrypi:~# sudo -i
root@raspberrypi:~# /root/bin/remountfs_rw
-bash: /root/bin/remountfs_rw: No such file or directory
root@raspberrypi:~# /root/bin/setup-teslausb
couldn't find /root/teslausb_setup_variables.conf
root@raspberrypi:~# tail -20 /boot/teslausb-headless-setup.log
After checking the SD Card the log shows again:
Mon 18 May 23:54:11 BST 2020 : Detecting whether to update wpa_supplicant.conf

If you're so inclined, log in to the pi and run:
pwd
ls -al​

then run sudo -i and:
cd /root
ls -al
cd /
ls -al​

and post the results of the pwd command and all the directory listings (the ls -al commands). Those commands will show the contents of the SD card as seen by linux running on the pi:
  1. The directory you log into
  2. The contents of that directory with all the permissions assigned to each file and subdirectory
  3. The contents of the /root directory with all their permissions
  4. The contents of the / directory with all their permissions.