Two existing packages which might be worth a try:-
- JeeLabs esp-link https://github.com/jeelabs/esp-link This is a transparent serial interface adapter that I've had a lot of luck with. It's a mature package with lots of bells and whistles and no unpleasant surprises. The serial input/output can be piped directly to a browser, so it's really easy to verify that the connection is working as intended.
- Chris Liebman's NTP server https://github.com/liebman/ESPNTPServer Chris has done a lot of work on interfacing a GPS module with the ESP and is still developing this package. You can ignore the PPS connection (which is the timing-specific part of the NTP project) and use his code as a base for ESP to GPS comms. Do note that this package has dependencies, so you should clone it with the "--recursive" flag to pull in everything you need.
-John-