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 access-point mode vs non-access-point mode
#1
I have a wireless router providing a LAN that's working quite well for some other functions (like providing AIS data from my VHF which OpenCPN can then use). That means I want my display (a Samsung tablet) connected to that wireless router (192.171.X.Y) in general. 

Then again, to make OpenCPN talk to the tinypilot (or even to control the tinypilot from the web interface), I need at present to be connected to the wireless network called "pypilot" (192.168.14.1, I think...) Constantly switching wireless networks is a bit of a pain, and the fact that I can configure (through the "front panel" of the tinypilot and the infrared clicker) the network to be something different seems as if it might be promising. 

I'd like to tell the tinypilot that on startup, it should search for a network called Boat2 (or that has an IP address of 192.171.255.X or something like that), and if it doesn't find that, it should fall back to the usual "access point" form, so that I can still reach it even if the boat's LAN is turned off, or fails for some reason. 

From what I've read, I gather that I can at least set it up to try to join my network, but that when it does so, it may end up with a random address in the 192.171.255.X range; that makes it hard to use with OpenCPN. Is there a way to say "connect to that network, using this fixed IP address"? 

Thanks for any help you can offer.
Reply
#2
yes,

you can configure the network from
192.168.14.1/wifi

It wont automatically fallback to ap mode, however you can switch it back to ap mode using the ir remote. This is because it will automatically reconnect to boat2 when it comes back up. Is there some other behavior that would be more useful?
Reply
#3
(2021-08-08, 06:30 PM)seandepagnier Wrote: yes,

you can configure the network from
192.168.14.1/wifi

It wont automatically fallback to ap mode, however you can switch it back to ap mode using the ir remote.   This is because it will automatically reconnect to boat2 when it comes back up.   Is there some other behavior that would be more useful?

Thanks. I'll give that a try. In my little "NMEA sentence forwarding widget" (running on a NodeMCU), the default is "try to connect to the last known network, but if that fails, then after 10 seconds, come up in access-point mode." This works well, because the tool I'm using to look at the data stream is often my phone, and I just just connect to "NMEABridge" and socat all the data coming out, and I can even do this when the local router isn't turned on (useful for debugging when off the boat, for instance). 

Would that be good behavior for the tiny pilot? I'm not sure, but I think so. Having it hung up trying to connect to a network that's not there doesn't seem like it serves any useful purpose, but presenting the access point when that process gets wedged...at least that lets you do SOMEthing without having to look at the tiny blue screen. Sad
Reply
#4
Well it is a problem because what if the normal access point comes back up again? Like when the access point resets you would have to then reset the tinypilot! If I changed the behavior I think more people would complain, but it could be a separate option to switch to access point if it cannot connect.
Reply
#5
(2021-08-09, 03:54 AM)seandepagnier Wrote: Well it is a problem because what if the normal access point comes back up again?  Like when the access point resets you would have to then reset the tinypilot!   If I changed the behavior I think more people would complain, but it could be a separate option to switch to access point if it cannot connect.

If you start TP, and nothing works for you because it's not on the network, you're probably going to go turn on your router (or whatever else is needed), at which point restarting TP should be pretty simple. With the proposed "make the access point show up after a brief attempt" thing, at least you have some hope of using the TP from your phone or other tool. 

Here's a possibility that's low-cost for both kinds of users: have a "how-long-before-switching-to-access-point" persistent datum. A value of "0" indicates "never switch from client mode to access-point-mode"; other values are in seconds, so "30" means "try to connect to my favorite network for 30 seconds, but then give up and start the access-point."

To keep the behavior unsurprising for current users, you can make this default to "0". 

Then again, you may want to reduce the number of possible parameters, and I'd certainly understand that.
Reply
#6
Well.. you can switch to access point using the remote control I could make it a function so that a single key press on the remote, or a momentary switch could be configured to do this.

Ideally it could function as AP and client at the same time. This is my preferred solution so maybe I can get it working at some point.

I like your idea too but maybe i would just have a 30 second timeout to be simple, in any case, it would require a reset or intervention if the access point does come back up.
Reply
#7
(2021-08-08, 06:30 PM)seandepagnier Wrote: yes,

you can configure the network from
192.168.14.1/wifi

It wont automatically fallback to ap mode, however you can switch it back to ap mode using the ir remote.   This is because it will automatically reconnect to boat2 when it comes back up.   Is there some other behavior that would be more useful?

I found I could configure it to be in "client" mode, but I didn't see any way to tell it what network to try to join.

And I also saw no way, from the "console display", to see the CURRENT IP address in client mode. 

All this may be a consequence of the age of my TP; it's running version 0.12, and I haven't yet had the time to update it.
Reply
#8
If you can update to the recent version it is improved and you can do what you need to.

I am hoping the next version will support ap and client mode.
Reply
#9
With the recent version, it was relatively simple to pick a fixed IP address (my router serves DHCP from 100 to 199, so I just used 192.168.1.99), and everything worked nicely!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)