Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SG-2340/MBT-4220 GPS-Lure Stratum-1 NTP clock under pfSense?

    Scheduled Pinned Locked Moved Official Netgate® Hardware
    48 Posts 5 Posters 8.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      Hmm, I used the generic type with a USB connected GPS previously.

      Do you see the com port? You can probably just try connecting to it using cu and some baud rates etc. You should see it spitting NMEA.

      Steve

      1 Reply Last reply Reply Quote 0
      • rcfaR
        rcfa
        last edited by rcfa

        https://forums.freebsd.org/threads/gpio-pps-driver-for-minnowboard.70768/

        https://forums.freebsd.org/threads/gpio-on-turbot.58693/

        1 Reply Last reply Reply Quote 0
        • L
          lra
          last edited by

          Depending on what your time is worth (no pun intended), this $300 standalone unit with external antenna has worked well for me for years.

          GPS NTP Network Time Server (TM1000A)
          https://timemachinescorp.com/product/gps-time-server-tm1000a/

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            Yup you could go that route for sure... Or for like less than a $100 total and a few minutes time you could setup a pi with a hat and run that as stratum 1.. I have one on my home network, that serves to the pool and my local network for like couple of years now.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            T 1 Reply Last reply Reply Quote 0
            • rcfaR
              rcfa
              last edited by

              Thanks for the various alternative proposals.

              Having a stratum-1 NTP clock isn't that important for my purposes, that I what the hassle of once more device that can break, requires an outlet, etc.

              It would just be "cute" to have one, given that the device I use as firewall/router/VPN box would be able to provide one, given proper drivers.

              So it's more about using a device to its fullest, than having a hardcore need for a stratum-1 clock.

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                Hear yah - they really should put a disclaimer that currently does not work on pfsense/freebsd..Until such time that there is driver that allows it to, etc.

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  I agree, I'll try to get something added.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by

                    I would assume most people buying off the hardware off netgate store prob wanting to use it as their pfsense box ;) So yeah before some actually bitches should prob put disclaimers on any add on sort of hardware that isn't currently easy to get working, without like writing your own driver ;) hehehe

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • rcfaR
                      rcfa
                      last edited by

                      Well, on the freeBSD forum (see above links), someone said there's already a working GPIO driver for the board, so all that's missing is the PPS aspect.

                      I'm trying to see if I can get more information on that. Maybe sending that person who wrote the GPIO driver for the board a GPS module might be an incentive for him to write the PPS driver.

                      That would be a win-win for everyone...

                      1 Reply Last reply Reply Quote 0
                      • rcfaR
                        rcfa
                        last edited by

                        Any chance someone knows how the config should look like to simply get the GPS to provide time, i.e. without the PPS?

                        I always get that, when I look in the NTP status:

                        May 18 23:18:46	ntpd	34463	kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
                        May 18 23:18:46	ntpd	34463	kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
                        May 18 23:18:46	ntpd	34463	GPS_NMEA(0) serial /dev/gps0 open at 9600 bps
                        

                        And that with an external GPS antenna, in a location where my phone has no trouble picking up a GPS signal.
                        So I assume it's not actually the clock/GPS not being synced up, but the settings being wrong.

                        Under NTP "Serial GPS", I have the following:

                        GPS Type: MediaTek
                        Serial Port: cuau0, 9600 baud
                        NMEA Sentences: ZDA or ZDG
                        Flags: Prefer this clock, Display extended GPS status
                        GPS Initialization:

                        $PMTK225,02B
                        $PMTK314,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
                        28
                        $PMTK301,22E
                        $PMTK320,0
                        2F
                        $PMTK330,02E
                        $PMTK386,0
                        23
                        $PMTK397,023
                        $PMTK251,9600
                        17

                        So far no dice....

                        1 Reply Last reply Reply Quote 1
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Are you seeing useful any useful output from the device at 9600? The one I had ran at a lower board rate, 2400 I think.

                          ntpd won't sync to what it sees as a bad clock source but you should still see it showing a time value in the ntp status.

                          Steve

                          rcfaR 1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            Mmm, OK the docs indicate 9600 but also to use serial port 4... do you see more than one serial port?

                            1 Reply Last reply Reply Quote 0
                            • rcfaR
                              rcfa @stephenw10
                              last edited by

                              @stephenw10

                              I tried to use cu to check any device output, but I did't get any, but seeing that least I dealt with serial ports was back when kermit was still under active development, that doesn't mean much, I may just have invoked cu the wrong way.

                              I picked 9600, because that's what the Linux setup showed. The standard MediaTek setup is 4800 (if selected on the pop-up), tried that, too, but no change. Also, I updated the init strings to 9600 baud, because they showed 4800, even after increasing the rate to 9600.

                              I know about the port number, but cuau0 is the only device showing. Since pfSense supports the serial console, and since that supposedly uses the same pins as the ones to which the GPS lure is attached to (and not regular USB-to-serial), I figure that is the proper device.

                              If there's a way to use different serial interfaces, I haven't found it.

                              rcfaR 1 Reply Last reply Reply Quote 1
                              • rcfaR
                                rcfa @rcfa
                                last edited by

                                Does anyone have any input one what it takes to access the GPS module, simply as a clock, without PPS?
                                Can't seem to get that working, either.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by stephenw10

                                  Ok, this looks promising.

                                  The minnowboard has a standard com port that is brought out to the 6 pin debug header. That's where you get the serial console if you enable it, /dev/cuau0. It also has two UARTs on the low speed header that the GPS-Lure uses but it appears that in the default config FreeBSD/pfSense does not recognise and attach to them.

                                  But! If you change the LPSS & SCC Devices Mode to PCI mode in the BIOS an additional two com ports are then detected. That's in Device Manager > System Setup > South Cluster Config > LPSS & SCC Config.
                                  Also check that both UARTs are enabled there. Mine were here but I've played around with those settings I can't be sure they were by default.

                                  Anyway once that is done and you see cuau2 and cuau3 in /dev try those ports for NMEA signals from the GPS.

                                  Steve

                                  rcfaR 1 Reply Last reply Reply Quote 1
                                  • rcfaR
                                    rcfa @stephenw10
                                    last edited by

                                    @stephenw10 Cool, thanks!
                                    That brings us quite a step forward. (BTW: is there documentation anywhere on all the settings in there? Many of them are obvious, others not, managed to enable some things that resulted in the NICs no longer being recognized by the system, so I reset to factory settings, and then just re-enabled the UARTs).

                                    Anyway, that done, I now get this, which means the GPS module is seen by the system:

                                    [2.5.0-DEVELOPMENT][admin@local]/root: cu -s 9600 -l cuau2
                                    Connected
                                    $GPGGA,010835.800,,,,,0,0,,,M,,M,,*4F
                                    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
                                    $GPRMC,010835.800,V,,,,,0.00,0.00,060180,,,N*45
                                    $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
                                    $GPGGA,010836.800,,,,,0,0,,,M,,M,,*4C
                                    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
                                    $GPRMC,010836.800,V,,,,,0.00,0.00,060180,,,N*46
                                    $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
                                    $GPGGA,010837.800,,,,,0,0,,,M,,M,,*4D
                                    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
                                    $GPRMC,010837.800,V,,,,,0.00,0.00,060180,,,N*47
                                    $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
                                    $GPGGA,010838.800,,,,,0,0,,,M,,M,,*42
                                    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
                                    $GPGSV,1,1,00*79
                                    $GPRMC,010838.800,V,,,,,0.00,0.00,060180,,,N*48
                                    $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
                                    $GPGGA,010839.800,,,,,0,0,,,M,,M,,*43
                                    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
                                    

                                    So, since is obvious from this, that the GPS module can't get a fix, that's not yet being quite there...

                                    Figuring that the patch antenna on the module inside a metal case might not be ideal, I invested into an external GPS antenna. My iPhone gets a GPS lock where the unit is, so I'd figure with an external antenna, that should be good enough of a location. Maybe not. Maybe the system just takes much longer to get a fix, as it's not assisted by cell tower and WiFi information to acquire one.
                                    Hopefully in a few hours or so, it will acquire a satellite fix.

                                    No matter what, at least we now know we can access the device, and that's the biggest obstacle.

                                    1 Reply Last reply Reply Quote 1
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      There is this though it's a bit outdated: https://elinux.org/Minnowboard:MaxBios

                                      Yeah that looks like no satellites in view. And, yeah, it can take a while without agps. But that looks pretty promising otherwise. ☺

                                      Steve

                                      rcfaR 1 Reply Last reply Reply Quote 0
                                      • rcfaR
                                        rcfa @stephenw10
                                        last edited by

                                        @stephenw10 Just had an idea: is the external antenna detected automatically, or do the init commands enable it? If it's not automatic, and the integrated patch antenna is being used, inside of what's a metal case with a few vents, in a basement, I'd 100% be not surprised it can't get a satellite lock.

                                        On the other hand, if the switch-over is automatic, then I am surprised, because I'd expect an external antenna to have a better reception than what my iPhone gets, and that has no issue locking on to the GPS signal, basement and all.

                                        Wonder where I can find out, if the external antenna is recognized automatically...

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          Hmm, good question. Can you move it somewhere with better reception for the patch antenna as a test?

                                          Steve

                                          rcfaR 1 Reply Last reply Reply Quote 0
                                          • rcfaR
                                            rcfa @stephenw10
                                            last edited by

                                            @stephenw10 Not really, because of where internet comes into the house. I could just try to run the box stand-alone for a while to test, both with and without the cover of the case, and with and without the external antenna (if for some reason it should be busted), but I'd have to do that when I don't need access to the internet for a period of time...

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.