This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tinypilot network config change
#11
When should we expect the next image?
--
Larry - s/v Katie Lee Passport 45 Ketch (For Sale) - somewhere in Taiwan
Reply
#12
I have it already I hope I can upload in a day or two.
Reply
#13
For what it's worth, I got some success with the tinypilot beta image, being able to make it a client to the openplotter access point.

First, using the beta image, I found in the webapp (http://pypilot.io) under Configuration an option Configure WIFI. This was not in the stable image. I configured that ("Managed-client"), but when hitting Submit it flicked back to "Master - AP" so that was not very promising. Indeed after a reboot the AP was gone. Editing the file /home/tc/.pypilot/networking.txt, as suggested in the screen, was also to no avail.

What finally worked was to create two files on /mnt/mmcblk0p2/tinypilot/. This location is persistent. If you put those files anywhere else they get lost over a reboot.

The first file carries the wifi config (so fill in your own wifi passphrase), the second I run manually for now.

/mnt/mmcblk0p2/tinypilot/wpa_supplicant.conf:

   network={
        ssid="openplotter"
        psk="secret"
   }

/mnt/mmcblk0p2/tinypilot/set_wlan.sh

   wpa_supplicant -B -i wlan0 -c /mnt/mmcblk0p2/tinypilot/wpa_supplicant.conf
   ifconfig wlan0 10.10.10.3 netmask 255.255.255.0 up

The moment you then enter the IP address of the tinypilot (10.10.10.3) in te opencpn plugin, the whole thing comes alive, which is quite thrilling to see the first time!

I tried the same with the old, stable image but that did not work (error in ifconfig), so you would really need the beta image.

Obviously, this solution for now only works in the lab, because you'd need console access to the tinypilot. But while configuring your setup it might come in handy.

Cheers,

-    
Reply
#14
(2019-07-09, 02:43 PM)ironman Wrote: For what it's worth, I got some success with the tinypilot beta image, being able to make it a client to the openplotter access point.

First, using the beta image, I found in the webapp (http://pypilot.io) under Configuration an option Configure WIFI. This was not in the stable image. I configured that ("Managed-client"), but when hitting Submit it flicked back to "Master - AP" so that was not very promising. Indeed after a reboot the AP was gone. Editing the file /home/tc/.pypilot/networking.txt, as suggested in the screen, was also to no avail.

What finally worked was to create two files on /mnt/mmcblk0p2/tinypilot/. This location is persistent. If you put those files anywhere else they get lost over a reboot.

The first file carries the wifi config (so fill in your own wifi passphrase), the second I run manually for now.

/mnt/mmcblk0p2/tinypilot/wpa_supplicant.conf:

   network={
        ssid="openplotter"
        psk="secret"
   }

/mnt/mmcblk0p2/tinypilot/set_wlan.sh

   wpa_supplicant -B -i wlan0 -c /mnt/mmcblk0p2/tinypilot/wpa_supplicant.conf
   ifconfig wlan0 10.10.10.3 netmask 255.255.255.0 up

Thanks for that. Actually I will not be sailing for a few weeks, so I will wait for the next beta image that Sean has promised.

For you, you can put your set_wlan.sh in /home/tc/.pypilot/. or in /opt/ and add a call to it in the right place in  /opt/bootlocal.sh with the full path. Then save it all with: filetool.sh -b and reboot.
  
Anyway this should work.
--
Larry - s/v Katie Lee Passport 45 Ketch (For Sale) - somewhere in Taiwan
Reply
#15
(2019-07-10, 01:31 AM)svkatielee Wrote: [...]
For you, you can put your set_wlan.sh in /home/tc/.pypilot/. or in /opt/ and add a call to it in the right place in  /opt/bootlocal.sh with the full path. Then save it all with: filetool.sh -b and reboot.
[...]

Thanks that did the trick! Had to add /opt/bootlocal.sh to the hidden file /opt/.filetool.lst for the filetool.sh to work.

Next: make it so that holding down a key during startup make it switch to Access Point mode. Stay tuned.
Reply
#16
(2019-07-11, 10:44 PM)ironman Wrote: Next: make it so that holding down a key during startup make it switch to Access Point mode. Stay tuned.

Ok that was fairly straightforward - see attached for the code. Got me a luxury setup: when I keep the auto key pressed during startup, it creates the original 'pypilot' wifi access point, when I keep the standby button down, it logs in as a client to my home network. No key during startup = client to the openplotter with a fixed ip address 10.10.10.3.

I reused the raymarine tiller pilot keyboard, hence the standby button.

Next question is how to get the sshd working on the tinypilot image. Whatever setting I give the daemon along, each ssh session fails on Permission denied, please try again, even when I try a key pair. Any idea?


Attached Files Image(s)
   
Reply
#17
for ssh, try with user: tc pw: pypilot

Nice idea about using the button at startup to select wifi. So far the new version of the tinypilot image supports changing in the lcd menu as well as web interface.
Reply
#18
Ha! that worked - and hence I figured out what I had done wrong. I had created a user and made its UID 0. But by default, sshd does not allow root login.

I replaced the lcd panel with only one led, so the lcd network menu is not an option for me. Code included, although off-topic.

Cheers,

-


Attached Files Image(s)
   

.txt   ray.txt (Size: 7.38 KB / Downloads: 196)
Reply
#19
Hi there,

I'm working on getting my new tinypilot installed. I use a vesper XB8000 for the instruments over wifi (as they fail I replace the expensive and unreliable simrad instruments with cheap android tablets inside and cheap waterproof android phones outside).

As all the instruments connect direct to the XB8000 I want to make the XB8000 the host and configure the pypilot to connect to it by wifi to get wind data, but I would also like the option to connect direct to the pypilot as host for the web interface or opencpn. Unfortunately its too far from the xb8000 to use a wired connection.

I have an old DLink 122 USB wifi dongle. I wonder if the tinypilot can connect to the vesper network using that for and simultaneously run as an access point with its own wifi (or vice versa)?

Failing that, holding a button at startup to select mode would be the next best option. SVkatielee Could you possibly post a step-by-step please of all the changes you made to make that work? My tinypilot only has infrared remote, would that work for the button press during startup or is it not initialised at that stage? If I need a physical button, I can see the pins for connecting that on the diagram on the pypilot website, but should the button connect the pin to ground or connect it to 5V?

Sean built my new tinypilot a month or two ago so hopefully the version is recent enough - I assume I got the beta version not the stable one because there is a wifi config page on the web interface. How do I check the exact version number I've got and which version number supports the client mode? I'd rather not have to upgrade if possible as this one seems pretty stable so far and I don't want to break it.

Thanks everyone!
Reply
#20
Hi syohana,

In the recently released tinypilot image the wifi client option seems to work out of the box. This invalidates some of the postings above. Tinypilot would then get a random IP address from the access point, in this case your xb8000, and with that ip address you can access the tinypilot web interface through the access point that you have chosen. This way you would not need to use the usb dongle, a road I would not choose as I've pulled many hairs on that one.

The fact it's a random ip address is a bit awkward. On openplotter you can fix an ip address to a mac address (under the hood, still). I'm not sure you can do that on your xb8000, but it may be possible. If not, it leaves you with the option of fixing it on the tinypilot side, changing for instance /opt/bootlocal.sh as below, add 'opt/bootlocal.sh' to /opt/.filetool.lst, run filetool.sh -b, and reboot.

ifconfig wlan0 10.10.10.4 netmask 255.255.255.0 up
#sv u dhcpcd

I think it would be quite handy (i.e., feature request ;-) if a new tinypilot image would allow for specifying a fixed client ip address.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)