sms-registration is not fully developed yet, and still contains bugs! If you encounter any sort of bug, please join [our Discord](https://discord.gg/BtSbcExKJ9), however please note we cannot get to everyone, so try to figure out any errors yourself before asking.
***Please note:*** You will have to use a client to send messages from your phone. We recommend [Beeper](https://www.beeper.com/), which is the best solution to keep all your chat apps inside one place, including iMessage! You can also use [BlueBubbles](https://bluebubbles.app/) (which requires you to have a server Mac running 24/7). One of our community members is also currently working on a BlueBubbles fork that implements a version of Pypush within it, so no server is needed and number reregistration is automatically ran. Additionally, Beeper has a more complete proprietary paid Android app solution derived from this Pypush PoC named [Beeper Mini](https://blog.beeper.com/p/introducing-beeper-mini-get-blue) ([details](https://blog.beeper.com/p/how-beeper-mini-works)) that includes both the messaging app and the registration.
However, Beeper is completely free and easy to use, and comes packed with multiple features that rivals native apps. Beeper is currently in the process of removing the waitlist, so you will have to use an invite link shared to you in order to skip the waitlist until this change is made. This app is what most testing is done on, and is by far the most popular in the Android and iMessage community.
You will first install Pypush onto your machine. *Please keep in mind that you will have to have a script running on a home server or PC 24/7 to keep your number active! See below for instructions.*
In order for Apple to verify your number, a specialized message has to be sent from your phone to Apple's "gateway number" and have the response captured. This number is different for each carrier, however the newest app version should automatically find your gateway number. If PNRgateway cannot find your gateway number, see below for help.
1. Install the APK. The message link containing the APK is located [here](https://discord.com/channels/1130633272595066880/1145177252015915080/1153070972090470481), and the GitHub repository is [here](https://github.com/JJTech0130/PNRGatewayClientV2).
2. Open the app.
3. Grant SMS permissions by clicking the button and approving the permissions.
4. Connect your phone to the same WiFi network as your host PC, and open the app (unless using Android: Termux, then it doesn't matter what network)
Use one of the automated installers for your operating system: [Windows](https://github.com/JJTech0130/pypush/blob/bacefed8b8eb78d5d3f295be5304830665464a04/windows_installer.ps1), [MacOS/Linux](https://github.com/JJTech0130/pypush/blob/bacefed8b8eb78d5d3f295be5304830665464a04/unix_installer.sh), or [Android Termux](./termux_installer.sh).
1. Open up Powershell and navigate to your downloads folder
```powershell
cd Downloads
```
2. Execute the installer
```powershell
.\windows_installer.ps1
```
3. Follow the prompts
4. Once initial registration has completed successfully, execute the reregistration setup file
```powershell
windows_reregistration.ps1
```
This file will re-register your number 5 minutes before registration expires.
5. Leave the Powershell window open permanently
The length of your registration will gradually increase the longer the reregistration process runs.
##### MacOS/Linux
1. Open up your temrinal and navigate to your downloads folder
```shell
cd Downloads
```
2. Make the script executable
```shell
chmod +x unix_installer.sh
```
3. Execute the script
```shell
./unix_installer.sh
```
4. Once initial registration has completed successfully, a `reregister.sh` script is created.
5. Execute the reregistration script
```shell
./reregister.sh
```
This will reregister your number 5 minutes before registration expires.
6. Leave the terminal window open permanently
The length of your registration will gradually increase the longer the reregistration process runs.
##### Android Termux
This solution should be run on the same mobile device as the PNRGateway, and greatly simplifies the Pypush to PNRGateway connection required during initial setup.
1. Ensure you have [`Termux`](https://f-droid.org/en/packages/com.termux/) and [`Termux: API`](https://f-droid.org/en/packages/com.termux.api/) apps installed from F-Droid.
**The Google Play `Termux` app is not updated, and is incompatible with the `Termux: API` app that's only available on F-Droid.**
2. Download the `termux_installer.sh` script above onto your phone.
3. Open `Termux`
4. Grant storage permissions to `Termux`
```shell
termux-setup-storage
```
And accept the permissions prompt for all files.
5. Open the `PNRGateway` app on a split screen.
**The `PNRGateway` app must be open in the foreground at the same time as `Termux` for it to function correctly.**
8. You will be walked thru the steps to register your phone number, create `~/pypush/reregistration.sh`, and setup a persistent system job to run the reregistration automatically.
9. If the registration indicates Apple has given you an expiration time of less than 15 minutes, you will need to manually run the `~/pypush/reregistration.sh` script about 5 minutes before expiration. Android system jobs are not able to be run more frequently than 15 minutes.
The length of your registration will gradually increase the longer the reregistration process runs.
You will have to reregister your number every so often. This can last anywhere between 10 minutes to 48 hours, and *usually* the longer you run the script, the longer it takes to deregister. We may implement a feature to automatically detect deregistration in the future.
If you ever have any type of error, delete the config.json file and run steps 3-4 again. *This is really important.*
# Issues
This is still in the development stage, so expect issues and bugs. Here is a list of possible errors:
### Timeout waiting for response from gateway
This means it took too long for Apple to respond from the gateway number, PNRgateway is not sending the message to the correct gateway, or the response is in an incorrect encoding. This is common, please reach out for help.
### Connection Closed
This means the app crashed or could not parse the response data from the gateway. This is also common, and a recent bug has caused this error to happen excessively with non-Verizon carriers.
### Failed to resolve host
This error occurs when you are not connected to the same network, the all is closed, or you are not using the correct IP.
This is because PNRgateway could not detect the correct gateway corresponding to your carrier. Please report this issue if you find it. To fix this issue, when you are on step 1 of number registration, append `--gateway [number]` after the `--ip` argument, and replace `number` with the gateway number. *(You can find your gateway number [here](https://discord.com/channels/1130633272595066880/1130990221920575618/1154069380699791470))*
### Failed to load the dynamic library
This is a Unicorn error. We do not yet know exactly what causes this error, but on MacOS try to run `sudo brew install unicorn`. This error usually occurs in MacOS VMs.
### Failed to register
Delete `config.json` and retry.
**If you encounter any other errors, please try to find answers online for help.**