Clipper 4g Hat issues

I have been trying to get this Hat working for a while so hopefully some of this will help.
All this is based on my own testing and guess work I am not a network enginner.
I am assuming the reader knows how to use nano, cat, bash and sudo.
If something doesnt make sense or written badly please let me know ( all brains work differently)

Board -
Amber light just means powered up.
Green light - Solid means no SIM or cannot access APN
- Flashing means SIM is connected

If using with a full sized PI it tends to not have power issues but if using with a Zero 2W I often have to take the hat off and leave to completely discharge before turning on again.

Settings-

Start by making a PPP config file no need for apn user name and password here.

sudo cp /etc/ppp/peers/provider /etc/ppp/peers/clipper

edit the info

sudo nano /etc/ppp/peers/clipper
# coment out user
# user "myusername"

#change "YOURAPN" to your own such as internet for vodafone
#change pap to gprs
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T "YOURAPN""

# Serial device to which the modem is connected.
#Pi5
#/dev/ttyAMA0
#All other Pis
/dev/ttyS0

# Disable Hardware Flow Control
nocrtscts

# disable modem control lines
local

next we need to add apn details into pap and chaps ( as I don’t know which is correct)

sudo nano /etc/ppp/pap-secrets

add in below inbound connections ( I dont think location makes a difference) change user and pass to correct details for your network.

"user" * "pass" *

now edit chaps which has different formatting.

sudo nano /etc/ppp/chap-secrets

add this line with your correct details.

user * pass

At this point you could turn on ppp0 and it should connect but I didn’t have net access so I had to do a few changes which is all answered by AI so if someone has better methods please say.

Internet settings -
turn on PPP0 to get your destination IP address

sudo pon clipper

wait a few seconds for it to be connected and check the details

ifconfig

this will return all your current connections we are after ppp0 if this isnt showing try sending pon again and waiting 30-60 seconds.

mine looks like this

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.78.000.000  netmask 255.255.255.255  destination 10.64.000.000

Using the destination ip we can now edit the ip-up file

sudo nano /etc/ppp/ip-up

add this at the bottom of the file and add in your destination address

#!/bin/bash

# Add default route through the PPP connection
/sbin/ip route add default via "destination address" dev "ppp0"

Once you have done this we need to add ipforwarding

sudo nano /etc/sysctl.conf

look for the line below and remove the # and space

net.ipv4.ip_forward = 1

to apply the changes send the command

sudo sysctl -p 

I had to edit my NetworkManager conf for dns issues.

sudo nano /etc/NetworkManager/NetworkManager.conf

add in the below

[main]
dns=auto

Also added in DNS details into resolv

sudo nano /etc/resolv.conf

add the below to the file

nameserver 8.8.8.8
nameserver 1.1.1.1

stop this file being changed on boot

sudo chattr +i /etc/resolv.conf

if you need it to be changed again you can use

sudo chattr -i /etc/resolv.conf

At this point restart the pi
once you are back in use a service like pi tunnel or piconnect and ssh login.
send sudo pon clipper and wait for it to show in the ifconfig.
check your ip address with

curl icanhazip.com

if it is diffrent to the external IP of your other devices on home network it means the Pi us using the simcard. Now turn off wifi and see if you can use curl or something like apt update.

send the below command to turn off wifi

sudo ifconfig wlan0 down

I am now trying to get this to connect on boot but using a systemctl service I get the error

Jan 12 14:35:49 clipper chat[492]: SIGTERM
Jan 12 14:35:49 clipper pppd[489]: Child process /usr/sbin/chat -v -f /etc/chatscripts/gprs -T wlapn.com (pid 491) term>
Jan 12 14:35:49 clipper pppd[489]: Connect script failed

I have just stuck to cronjob to get the service started.

sudo user mod -aG dip "user"

Then added to crontab -e

@reboot sleep 60 && /usr/bin/pon clipper

Hopefully this helps someone or someone can help me with the next steps.