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
#21
Good to hear client mode is working in the latest image.

It should be possible to switch between client and ap mode through the menu using the remote or keypad then reboot.

It is possible to have an additional wifi adaptor connect as a client to another network. for this, and other less common network setups you will have to modify the boot scripts.


Do I still need to implement the startup button to select wifi mode? What if changing the mode from the lcd menu does not need to reboot? There is no (nice) way to type the AP name using the remote, so for now you might have to switch to AP mode in the menu, then from the web interface type the ap name.

As for a fixed ip. It may be best to do from openplotter or the access point, but I will try to add this option as well for the next release.

syohana,

you will need to re-image the sd card with the new beta image to get working wifi client mode
Reply
#22
(2019-07-18, 12:50 PM)ironman Wrote: 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.


Hi ironman, thanks very much for the ideas, unfortunately the xb8000 isn't a fully featured router and can't allocate a fixed IP address.

One alternative would be to have both of them as clients to another wifi router which does allocate fixed and reserved IP addresses. I think that's just too many points of failure, extra power consumption and if the central router went down then nothing would work.

The key is to make it redundant so that if either the xb8000 or the pypilot fails then the other one is still accessible in an intuitive way to non-technical crew. They'll never think to turn it on holding a button. Having both of them in access point mode better satisfies that redundancy requirement.

Maybe I'll just have to run a very long serial cable all around the boat and hope it doesn't transmit or receive too much RF interference. Part of my reason for choosing pypilot was to get rid of all the long cables though. it would be about 10m cable which might be pushing the limits of nmea0183 and would certainly upset the SSB.

I'd be very reluctant to try fixing the IP address on the client side as it won't be reserved in the router. Seems like it could break if the router has already allocated something else to the IP address the client demands.

Hmmmm. Still not sure which way to go!
Reply
#23
Fixing ip addresses is not uncommon. Normally dhcp servers issue addresses out of a certain range, and leave another range explicitly 'free' for fixed addresses. The range, if not documented, becomes apparent if you look into it, like, when you see that the first address handed out ends on .128. Also, I believe no dhcp server will issue an address if it can be pinged.

Another idea would be adjust the boot script so that it starts its own AP if it cannot ping the vesper. But that device looks sturdy enough.
Reply
#24
If you have 3 devices communicating over wifi, usually the access point, and if it goes down the other two will not be able to communicate. There are 3 options I can think of:

1) secondary network using multiple wifi adaptors in the two clients.
2) two devices switch to secondary network if AP goes down (small down time)
3) ad-hoc wifi network. This is technically the best and most logical but rarely used.
Reply
#25
Thanks ironman, I've been experimenting a bit with fixing the Ip address from the client on my laptop and I think your idea will work because although the XB8000 only supports 5 clients I can actually pick any IP in the range 2-255 from the client end. Next I'll try your suggested config changes on the pypilot.
If the XB8000 went down then the pypilot can still be controlled by the infrared remote, assuming it works in sunlight?
Reply
#26
The sunlight does make the remote not as effective, but it should still work. You can also add buttons wired to the keypad pins.

Many dhcp servers remember mac addresses and will often assign the same client the same ip if possible, so this might help.
Reply
#27
I have a Tiny Pilot and I changed the mode from Access point to client via the webapp connecting to 192.168.14.1, it all seems to be working but now I am curious how to make the IP static using OP, I read above that you can assign an IP to a mac address using OP? 
where would I find how to do that?

edit: actually I was given an alternative to use "box" as the hostname and that seems to work. I would still like to know how to fix an Ip to a Mac address via OP though?
Reply
#28
I am not sure how to do it in OP or if it's supported, probably in the dhcp server configuration file.

In the next version of tinypilot I hope to support static ip for client, as well as possibly ad-hoc wifi mode which would be the ultimate network mode to use on a boat I think.
Reply
#29
As an alternative to the option stated above:

Would it be possible to have TP check if an OP access point is available, and then connect to it. When not available, make it's own TinyPilot AP? This would eliminate the need of a startup button to select the wifi modes.
Reply
#30
It's possible but it will take longer to establish the AP, and it won't know if openplotter becomes available later.

So in AP mode, it would make the AP sooner after boot.
In client mode it would reconnect to the AP always, so if openplotter starts later or restarts it can reconnect.

This would be a third mode. It might be more useful to switch from AP to client without rebooting somehow?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)