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
#31
(2019-09-10, 10:04 PM)rastam4n Wrote: 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?

If you want to fix an IP address, you could add a line like 

   dhcp-host=b8:27:eb:5f:80:f8,10.10.10.3

to /etc/dnsmasq.conf in openplotter. The MAC address is the one of your tinypilot and you could get it from, for instance,

   grep DHCPREQUEST /var/log/syslog

... after openplotter handed out a dynamic one to your tinypilot.
Reply
#32
(2019-09-11, 01:32 PM)ironman Wrote:
(2019-09-10, 10:04 PM)rastam4n Wrote: 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?

If you want to fix an IP address, you could add a line like 

   dhcp-host=b8:27:eb:5f:80:f8,10.10.10.3

to /etc/dnsmasq.conf in openplotter. The MAC address is the one of your tinypilot and you could get it from, for instance,

   grep DHCPREQUEST /var/log/syslog

... after openplotter handed out a dynamic one to your tinypilot.


Thank you Ironman.
Reply
#33
(2019-09-11, 03:29 PM)rastam4n Wrote:
(2019-09-11, 01:32 PM)ironman Wrote:
(2019-09-10, 10:04 PM)rastam4n Wrote: 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?

If you want to fix an IP address, you could add a line like 

   dhcp-host=b8:27:eb:5f:80:f8,10.10.10.3

to /etc/dnsmasq.conf in openplotter. The MAC address is the one of your tinypilot and you could get it from, for instance,

   grep DHCPREQUEST /var/log/syslog

... after openplotter handed out a dynamic one to your tinypilot.


Thank you Ironman.

So this is interesting, for some reason every 10 minutes "box" gets disconnected even with a static IP set on OP for my TP's Mac address.

Sep 11 10:14:12 openplotter dnsmasq-dhcp[1712]: DHCPREQUEST(br0) 10.10.10.76 b8:27:eb:0e:44:83
Sep 11 10:24:10 openplotter dnsmasq-dhcp[1712]: DHCPREQUEST(br0) 10.10.10.76 b8:27:eb:0e:44:83
Sep 11 10:34:10 openplotter dnsmasq-dhcp[1712]: DHCPREQUEST(br0) 10.10.10.76 b8:27:eb:0e:44:83
Sep 11 10:44:45 openplotter dnsmasq-dhcp[1712]: DHCPREQUEST(br0) 10.10.10.76 b8:27:eb:0e:44:83
Sep 11 10:54:10 openplotter dnsmasq-dhcp[1712]: DHCPREQUEST(br0) 10.10.10.76 b8:27:eb:0e:44:83

any ideas why this would happen to the second every 10 minutes?
Reply
#34
(2019-09-11, 04:33 PM)rastam4n Wrote: any ideas why this would happen to the second every 10 minutes?

Is there any logging in /var/log/dhcpcd/current on the TP 'box'?
Reply
#35
Is the lease renewed? Is there any output on the tinypilot in /var/log/dhcpcd/current ?
Reply
#36
Yes, basically its reporting the carrier is lost every 10 minutes... interesting thing is I asked it to set the IP to 10.10.10.76 not 77 you can see in the log where OP offered 77 and it was accepted by TP

2019-06-11_20:00:33.31731 dhcpcd not running
2019-06-11_20:00:34.14879 wlan0: waiting for carrier
2019-06-11_20:01:47.24577 wlan0: carrier acquired
2019-06-11_20:01:47.33575 DUID 00:01:00:01:24:92:c5:2b:b8:27:eb:0e:44:83
2019-06-11_20:01:47.33583 wlan0: IAID eb:0e:44:83
2019-06-11_20:01:47.33586 wlan0: adding address fe80::e223:d213:c241:a73f
2019-06-11_20:01:47.33588 ipv6_addaddr1: Operation not supported
2019-06-11_20:01:47.42558 wlan0: soliciting a DHCP lease
2019-06-11_20:01:50.44080 wlan0: offered 10.10.10.77 from 10.10.10.1
2019-06-11_20:01:50.46034 wlan0: probing address 10.10.10.77/24
2019-06-11_20:01:55.66875 wlan0: leased 10.10.10.77 for 43200 seconds
2019-06-11_20:01:55.67643 wlan0: adding route to 10.10.10.0/24
2019-06-11_20:01:55.67735 wlan0: adding default route via 10.10.10.1
2019-06-11_20:10:35.72856 wlan0: carrier lost
2019-06-11_20:10:35.90935 wlan0: deleting route to 10.10.10.0/24
2019-06-11_20:10:35.91018 wlan0: deleting default route via 10.10.10.1
2019-06-11_20:10:36.43895 wlan0: carrier acquired
2019-06-11_20:10:36.53533 wlan0: IAID eb:0e:44:83
2019-06-11_20:10:37.26629 wlan0: rebinding lease of 10.10.10.77
2019-06-11_20:10:37.27960 wlan0: probing address 10.10.10.77/24
2019-06-11_20:10:42.09194 wlan0: leased 10.10.10.77 for 43200 seconds
2019-06-11_20:10:42.10091 wlan0: adding route to 10.10.10.0/24
2019-06-11_20:10:42.10098 wlan0: adding default route via 10.10.10.1
2019-06-11_20:20:35.81817 wlan0: carrier lost


This is my dnsmasq.conf

GNU nano 2.7.4 File: /etc/dnsmasq.conf

interface=br0
no-dhcp-interface=wlan0,usb0
dhcp-range=10.10.10.50,10.10.10.200,12h
dhcp-host=27:eb:0e:44:83,10.10.10.76
Reply
#37
(2019-09-11, 05:09 PM)rastam4n Wrote: Yes, basically its reporting the carrier is lost every 10 minutes... interesting thing is I asked it to set the IP to 10.10.10.76 not 77 you can see in the log where OP offered 77 and it was accepted by TP

2019-06-11_20:00:33.31731 dhcpcd not running
2019-06-11_20:00:34.14879 wlan0: waiting for carrier
2019-06-11_20:01:47.24577 wlan0: carrier acquired
2019-06-11_20:01:47.33575 DUID 00:01:00:01:24:92:c5:2b:b8:27:eb:0e:44:83
2019-06-11_20:01:47.33583 wlan0: IAID eb:0e:44:83
2019-06-11_20:01:47.33586 wlan0: adding address fe80::e223:d213:c241:a73f
2019-06-11_20:01:47.33588 ipv6_addaddr1: Operation not supported
2019-06-11_20:01:47.42558 wlan0: soliciting a DHCP lease
2019-06-11_20:01:50.44080 wlan0: offered 10.10.10.77 from 10.10.10.1
2019-06-11_20:01:50.46034 wlan0: probing address 10.10.10.77/24
2019-06-11_20:01:55.66875 wlan0: leased 10.10.10.77 for 43200 seconds
2019-06-11_20:01:55.67643 wlan0: adding route to 10.10.10.0/24
2019-06-11_20:01:55.67735 wlan0: adding default route via 10.10.10.1
2019-06-11_20:10:35.72856 wlan0: carrier lost
2019-06-11_20:10:35.90935 wlan0: deleting route to 10.10.10.0/24
2019-06-11_20:10:35.91018 wlan0: deleting default route via 10.10.10.1
2019-06-11_20:10:36.43895 wlan0: carrier acquired
2019-06-11_20:10:36.53533 wlan0: IAID eb:0e:44:83
2019-06-11_20:10:37.26629 wlan0: rebinding lease of 10.10.10.77
2019-06-11_20:10:37.27960 wlan0: probing address 10.10.10.77/24
2019-06-11_20:10:42.09194 wlan0: leased 10.10.10.77 for 43200 seconds
2019-06-11_20:10:42.10091 wlan0: adding route to 10.10.10.0/24
2019-06-11_20:10:42.10098 wlan0: adding default route via 10.10.10.1
2019-06-11_20:20:35.81817 wlan0: carrier lost


This is my dnsmasq.conf

 GNU nano 2.7.4               File: /etc/dnsmasq.conf                          

interface=br0
no-dhcp-interface=wlan0,usb0
dhcp-range=10.10.10.50,10.10.10.200,12h
dhcp-host=27:eb:0e:44:83,10.10.10.76

I would not issue from that range. Can you try 10.10.10.49 instead of .76?

Hate to ask, but you did restart dnsmasq after the config change right? SIGHUP is not enough.

'Carrier lost' looks like there's another problem though. What do the logs on the openplotter side say?
Reply
#38
(2019-09-11, 05:20 PM)ironman Wrote: I would not issue from that range. Can you try 10.10.10.49 instead of .76?

Hate to ask, but you did restart dnsmasq after the config change right? SIGHUP is not enough.

'Carrier lost' looks like there's another problem though. What do the logs on the openplotter side say?

I did not restart dnsmasq per-say, but I did reboot TP and OP and the logs I show are from reboot forward

I changed to .49 and rebooted, and now my current file has this ... 78 instead of 76 this time 

2019-06-11_20:00:33.47159 dhcpcd not running
2019-06-11_20:00:34.16648 wlan0: waiting for carrier
2019-06-11_20:01:12.21169 wlan0: carrier acquired
2019-06-11_20:01:12.28470 DUID 00:01:00:01:24:92:c5:08:b8:27:eb:0e:44:83
2019-06-11_20:01:12.28475 wlan0: IAID eb:0e:44:83
2019-06-11_20:01:12.28477 wlan0: adding address fe80::1aa5:5ba4:57b:4017
2019-06-11_20:01:12.28478 ipv6_addaddr1: Operation not supported
2019-06-11_20:01:12.38296 wlan0: soliciting a DHCP lease
2019-06-11_20:01:15.40496 wlan0: offered 10.10.10.78 from 10.10.10.1
2019-06-11_20:01:15.41627 wlan0: probing address 10.10.10.78/24
2019-06-11_20:01:20.46948 wlan0: leased 10.10.10.78 for 43200 seconds
2019-06-11_20:01:20.47771 wlan0: adding route to 10.10.10.0/24
2019-06-11_20:01:20.47776 wlan0: adding default route via 10.10.10.1

(2019-09-11, 05:20 PM)ironman Wrote: 'Carrier lost' looks like there's another problem though. What do the logs on the openplotter side say?

it seems filled with disassociated messages? Like pages of it and then this at the end

Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:50 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: disassociated
Sep 11 12:50:51 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 IEEE 802.11: associated
Sep 11 12:50:52 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 RADIUS: starting accounting session 7D58D94780B4EA81
Sep 11 12:50:52 openplotter hostapd: uap0: STA b8:27:eb:0e:44:83 WPA: pairwise key handshake completed (RSN)
Sep 11 12:50:52 openplotter dnsmasq-dhcp[1745]: DHCPREQUEST(br0) 10.10.10.76 b8:27:eb:0e:44:83
Sep 11 12:50:52 openplotter dnsmasq-dhcp[1745]: DHCPACK(br0) 10.10.10.76 b8:27:eb:0e:44:83 box
Sep 11 12:50:54 openplotter kernel: [  621.091892] w1_master_driver w1_bus_master1: Attaching one wire slave 00.d0000$
Sep 11 12:50:54 openplotter kernel: [  621.094829] w1_master_driver w1_bus_master1: Family 0 for 00.d00000000000.57 i$
Sep 11 12:51:13 openplotter systemd[895]: Time has been changed
Sep 11 12:51:13 openplotter systemd[1]: Time has been changed
Sep 11 12:51:13 openplotter systemd[1]: apt-daily-upgrade.timer: Adding 29min 7.951580s random time.
Sep 11 12:51:13 openplotter systemd[1]: apt-daily.timer: Adding 9h 55min 16.184563s random time.
Sep 11 12:51:13 openplotter systemd[895]: Time has been changed
Sep 11 12:51:13 openplotter systemd[1]: Time has been changed
Sep 11 12:51:13 openplotter systemd[1]: apt-daily-upgrade.timer: Adding 40min 31.381680s random time.
Sep 11 12:51:13 openplotter systemd[1]: apt-daily.timer: Adding 2h 36min 1.853690s random time.
ep 11 12:51:21 openplotter kernel: [  647.611622] w1_master_driver w1_bus_master1: Attaching one wire slave 00.30000$
Sep 11 12:51:21 openplotter kernel: [  647.615889] w1_master_driver w1_bus_master1: Family 0 for 00.300000000000.be i$
Sep 11 12:52:10 openplotter kernel: [  696.914929] w1_master_driver w1_bus_master1: Attaching one wire slave 00.b0000$
Sep 11 12:52:10 openplotter kernel: [  696.921000] w1_master_driver w1_bus_master1: Family 0 for 00.b00000000000.32 i$
Sep 11 12:52:49 openplotter kernel: [  736.235777] w1_master_driver w1_bus_master1: Attaching one wire slave 00.70000$
Sep 11 12:52:49 openplotter kernel: [  736.247383] w1_master_driver w1_bus_master1: Family 0 for 00.700000000000.f8 i$
Sep 11 12:53:41 openplotter kernel: [  788.215701] w1_master_driver w1_bus_master1: Attaching one wire slave 00.f0000$
Sep 11 12:53:41 openplotter kernel: [  788.218674] w1_master_driver w1_bus_master1: Family 0 for 00.f00000000000.74 i$
Sep 11 12:54:44 openplotter kernel: [  850.644458] w1_master_driver w1_bus_master1: Attaching one wire slave 00.08000$
Sep 11 12:54:44 openplotter kernel: [  850.650394] w1_master_driver w1_bus_master1: Family 0 for 00.080000000000.c2 i$
Sep 11 12:55:37 openplotter kernel: [  903.896124] w1_master_driver w1_bus_master1: Attaching one wire slave 00.88000$
Sep 11 12:55:37 openplotter kernel: [  903.901722] w1_master_driver w1_bus_master1: Family 0 for 00.880000000000.4e i$
Sep 11 12:55:37 openplotter systemd[1]: Starting Cleanup of Temporary Directories...
Sep 11 12:55:37 openplotter systemd[1]: Started Cleanup of Temporary Directories.
Sep 11 12:56:15 openplotter kernel: [  941.754947] w1_master_driver w1_bus_master1: Attaching one wire slave 00.48000$
Sep 11 12:56:15 openplotter kernel: [  941.761041] w1_master_driver w1_bus_master1: Family 0 for 00.480000000000

It OP and Box had disconnected for a time... then I rebooted and it has reconnected since
Reply
#39
(2019-09-11, 12:36 PM)seandepagnier Wrote: 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?

Your remark is noted. Indeed, it would take longer for the TP to boot. If it needs to check if OP-AP is available. Your remark about being usefull (?) to switch from AP to client without rebooting would be usefull option (!). This way, TP would start in AP, and when OP is available, it would switch to client.


I plan on building a TP installation. But without any display. As this could be difficult to integrate in an outside installation. Therefore planning to use the raymarine conversion python script.

The automatic AP-Client mode switching could be usefull for accessibility.

Wouter
Reply
#40
a gpio pin could be wired to a switch to select AP or client mode while running.

You could also consider a second tinypilot for a control head which connects to the first using wifi.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)