121 Commits

Author SHA1 Message Date
Cameron Thompson
af7fc536f8 Update installer 2025-07-25 21:55:42 -04:00
Cameron Thompson
3fc86d7a28 Install procd and depnds to skeleton 2025-07-25 21:54:39 -04:00
Cameron Thompson
01a8c2136b update installer 2025-07-24 23:49:27 -04:00
Cameron Thompson
b55088db19 begin prep for procd 2025-07-24 23:49:03 -04:00
Cameron Thompson
322e237364 add missing list file (empty) 2025-07-24 23:06:17 -04:00
Cameron Thompson
c614574313 Update installer 2025-07-24 22:56:28 -04:00
Cameron Thompson
9176bb3ef3 Replace wget with link to uclient-fetch 2025-07-24 22:55:37 -04:00
Cameron Thompson
ebaca3add3 Update installer 2025-07-24 22:35:39 -04:00
Cameron Thompson
2dc23e5b64 Register librt and usign as installed with opkg 2025-07-24 22:35:09 -04:00
Cameron Thompson
154b54c416 add wget ssl 2025-07-24 22:29:53 -04:00
Cameron Thompson
cc5ee2b322 Update installer 2025-07-24 21:16:48 -04:00
Cameron Thompson
e24d6663a2 Update banner 2025-07-24 21:16:03 -04:00
Cameron Thompson
e03f67049e Fix src declaration; add arch.conf 2025-07-24 21:12:38 -04:00
Cameron Thompson
930229d0aa Install usign to OpenWRT-skel 2025-07-24 20:55:37 -04:00
Cameron Thompson
bdd6ce1a86 Symlink libselinux to lib 2025-07-21 23:20:42 -04:00
Cameron Thompson
2326e3237f test and debug 2025-07-21 23:04:29 -04:00
Cameron Thompson
a4794ad36f Final Prep 2025-07-21 22:59:17 -04:00
Cameron Thompson
b0332e9c6f Add base files 2025-07-21 21:50:04 -04:00
Cameron Thompson
687e28030a Add more packages 2025-07-21 20:41:04 -04:00
Cameron Thompson
43d81d24d7 Add remount org rootfs as ro 2025-07-21 19:36:50 -04:00
Cameron Thompson
f0dc1565cf Revert "Update openwrt-overlayfs"
This reverts commit 5fdf1a8413.
2025-07-21 19:29:56 -04:00
Cameron Thompson
5fdf1a8413 Update openwrt-overlayfs 2025-07-21 19:17:15 -04:00
Cameron Thompson
0ae82c8a65 Add atcmd from kuno 2025-07-20 22:59:39 -04:00
Cameron Thompson
adca963196 Initial parts of the OpenWRT subsystem skeleton 2025-07-20 22:52:23 -04:00
Cameron Thompson
d61384c396 mount-fix progress 2025-07-20 20:23:02 -04:00
Cameron Thompson
b6ff2a3832 Small edits 2025-07-20 00:01:08 -04:00
Cameron Thompson
6936b9e5c8 The beginning of something new... 2025-07-15 00:43:45 -04:00
Cameron Thompson
feb7b2d6b1 Re-add changes after force sync 2025-07-15 00:43:00 -04:00
Cameron Thompson
47aaea465b Prep for SDXLEMUR main branch 2025-05-31 20:18:31 -04:00
Cameron Thompson
a48cb19db8 Merge pull request #168 from clndwhr/bug/fix-sms-phone-number
[BUG FIX] Fix Parsing for the phone number on received SMS
2025-05-31 20:11:12 -04:00
Cameron Thompson
630b897cd5 Merge pull request #167 from 1alessandro1/patch-2
Update year, maybe other branches need this too
2025-05-31 20:10:18 -04:00
Christopher Landwehr
2bc2ae3844 had to adjust for SMS Short codes in New Zealand where the minimum can be 3 digits (12 length hex string) 2025-05-22 14:05:18 -04:00
Christopher Landwehr
5ea71c3ccb Change the conditional to check on the hexString length and what it starts with vs just with what it starts with as a HEX string > 17 should indidcate the string is actual Hexadecimal and likely UTF-16BE, or starting with 003/002B and length >15 2025-05-22 13:55:50 -04:00
1alessandro1
179c9fa702 Update year 2025-05-22 00:55:41 +02:00
Cameron Thompson
6dd3eb8ea2 Update README.md 2025-05-16 23:43:09 -04:00
Cameron Thompson
5030f2c0bd Update deployment
- Updated simpleadmin content deployment script to obtain content from latest PR's #163 and #165

- Updated all deployment scripts to reflect a gitroot branch of development-SDXLEMUR

- Removed an unused deployment script that is no longer needed.
2025-05-16 23:40:53 -04:00
Cameron Thompson
94053b777e Merge pull request #165 from clndwhr/bug/fix-PCI-and-EARFCN-on-Homepage
[BUG FIX] PCI and EARFCN for NSA on Simple Admin Home Page
2025-05-16 23:12:02 -04:00
Cameron Thompson
b4cd059b76 Revert more overhaul stuff 2025-05-16 23:10:20 -04:00
Cameron Thompson
696cbf3054 Revert "Progress..."
This reverts commit ec07fb07ac.
2025-05-16 23:09:39 -04:00
Cameron Thompson
6e9acd8c87 Merge pull request #163 from clndwhr/bug/fix-bandwidth-reporting-and-adjust-tac
[BUG FIX] Bandwidth reporting and TAC Adjustment
2025-05-16 23:08:01 -04:00
Cameron Thompson
23038054bd Revert more overhaul stuff 2025-05-16 23:07:00 -04:00
Cameron Thompson
90d53cfe1d Revert "Progress..."
This reverts commit ec07fb07ac.
2025-05-16 23:03:40 -04:00
Cameron Thompson
2ef3ea4cb7 Revert "Merge branch 'SDXLEMUR' into development-SDXLEMUR"
This reverts commit 8c80eb7c0f, reversing
changes made to 8d7b02ca92.
2025-05-16 22:54:55 -04:00
Cameron Thompson
8c80eb7c0f Merge branch 'SDXLEMUR' into development-SDXLEMUR 2025-05-16 22:53:11 -04:00
Christopher Landwehr
72845b4360 migrate and cleanup code for SA codebase and structures 2025-05-16 11:36:33 -04:00
Christopher Landwehr
6c7ed50953 adjusting the logic for PCI on NSA(ENDC), and fixing the index for EARCN PCC on NSA(ENDC) 2025-05-16 10:48:57 -04:00
Christopher Landwehr
5996be64f4 updated NR_BANDWIDTH_LOOKUP to th eaccurate reference 2025-05-12 22:31:03 -04:00
Christopher Landwehr
2cbe8b76ab code reduction 2025-05-12 22:30:41 -04:00
Christopher Landwehr
f021311c93 Tac formatting 2025-05-12 22:30:31 -04:00
Christopher Landwehr
71f7dacf72 offline fonts and font-awesome icons 2025-05-12 22:01:54 -04:00
Christopher Landwehr
517f41c590 adjusting the reported Bandwidth mapping, utilzed the same functionality as QuecManager, updated TAC to show Base10 and Base16 value 2025-05-12 21:27:36 -04:00
Christopher Landwehr
69800c0608 Merge branch 'development-SDXLEMUR' of https://github.com/clndwhr/quectel-rgmii-toolkit into development-SDXLEMUR
# Conflicts:
#	README.md
2025-05-12 21:25:51 -04:00
Cameron Thompson
8d7b02ca92 Update README.md 2025-05-12 21:11:49 -04:00
Cameron Thompson
7ee03707e3 Update README.md 2025-05-12 21:10:57 -04:00
Cameron Thompson
4a76a5d032 Merge pull request #117 from 1alessandro1/SDXLEMUR
Convert eNB to decimal
2025-04-02 22:41:51 -04:00
Cameron Thompson
6c3cf93ffd Merge pull request #116 from 1alessandro1/patch-1
Fix typo
2025-01-28 20:43:14 -05:00
1alessandro1
924e06a153 Convert eNB to decimal 2025-01-27 23:52:38 +01:00
1alessandro1
a6fbc35f18 Fix typo 2025-01-27 23:33:16 +01:00
Cameron Thompson
ec07fb07ac Progress... 2024-12-20 16:31:13 -05:00
Cameron Thompson
d52f2c1b0f Begin rework process of opkg/opt 2024-12-09 18:48:33 +00:00
Cameron Thompson
370eb276a0 Update update_tailscale.sh 2024-11-22 19:35:29 -05:00
Cameron Thompson
550552d1a1 Update start_menu.sh 2024-11-20 22:27:53 -05:00
Cameron Thompson
b2758616cc Fix wrong link 2024-11-13 03:05:13 +00:00
Cameron Thompson
6f72fb4568 Update for new gitroot 2024-11-06 00:32:24 -05:00
Cameron Thompson
3235bd2c46 Update update_tailscale.sh 2024-11-01 00:17:38 -04:00
Cameron Thompson
d48f2f9c59 Update RMxxx_rgmii_toolkit.sh 2024-10-30 23:39:11 +00:00
Cameron Thompson
4b9785ceff Update RMxxx_rgmii_toolkit.sh 2024-10-30 19:18:59 -04:00
Cameron Thompson
64ff33c056 Update at-list.md
Add disable automapn command
2024-09-25 00:30:41 -04:00
Cameron Thompson
fffa77f106 Update at-list.md
Add more details
2024-09-25 00:20:25 -04:00
Cameron Thompson
0673ed1020 github directories can be downloaded 2024-09-16 23:56:57 -04:00
Cameron Thompson
acddaf7b08 Update download 2024-09-07 14:51:52 -04:00
Cameron Thompson
3117d70408 Update download
-Po not supported by busybox grep
2024-09-07 14:39:24 -04:00
Cameron Thompson
0e93104d53 Update at-list.md 2024-09-07 14:02:39 -04:00
Cameron Thompson
b4646a6875 draft 2024-09-04 23:34:36 -04:00
Cameron Thompson
96158cf859 edits 2024-08-25 23:16:44 -04:00
Cameron Thompson
2b961a40ef edits 2024-08-25 23:10:36 -04:00
Cameron Thompson
780e3b4cc8 Update download 2024-08-25 22:37:25 -04:00
Cameron Thompson
c32e90a436 Update download 2024-08-25 22:33:39 -04:00
Cameron Thompson
c3931dd009 Add more diagnostics 2024-08-25 22:24:52 -04:00
Cameron Thompson
643412f4ae Add diagnostic echos 2024-08-25 22:09:03 -04:00
Cameron Thompson
00ca424ae6 Update download 2024-08-25 00:22:17 -04:00
Cameron Thompson
949863c70e Create download
Create a download command that uses curl and falls back to wget. Should be able to download entire directories recursively from github as well.
2024-08-24 23:25:22 -04:00
Cameron Thompson
44f3a7aeed Update update_tailscale.sh
Updated to install latest 1.70.0
2024-07-23 01:24:39 -04:00
Cameron Thompson
ca190cebd1 Revert Changes 2024-07-14 12:23:25 -04:00
Cameron Thompson
435c472b16 Revert changes 2024-07-14 02:51:54 -04:00
Cameron Thompson
9c2870eb61 Update update_simpleadmin.sh 2024-07-14 01:49:15 -04:00
Cameron Thompson
a061212ff4 fix syntax 2024-07-14 01:57:04 -04:00
Cameron Thompson
91d1ade6a4 Fix syntax 2024-07-14 01:56:40 -04:00
Cameron Thompson
f872efca51 Merge pull request #69 from dr-dolomite/feature-watchcat
User AT command implementation
2024-07-14 01:55:20 -04:00
Cameron Thompson
1cd14a2225 Add ARCH check 2024-07-14 01:16:49 -04:00
Cameron Thompson
5fffcfd80d Update tailscale to 1.68.2 2024-07-14 00:45:01 -04:00
Cameron Thompson
f7780a589e Update get_atcommand
Uses atcmd11 now instead of microcom
2024-07-14 00:32:59 -04:00
Cameron Thompson
f2592a3dbb Merge branch 'development' of https://github.com/iamromulan/quectel-rgmii-toolkit into development 2024-07-13 23:23:26 -04:00
Cameron Thompson
865adc2fcd Add atcmd11
Separate commands for separate AT streams
2024-07-13 23:23:20 -04:00
Cameron Thompson
3f32d4001b Merge pull request #68 from dr-dolomite/feature-watchcat
Hot fix and band locking improvement and 502 support
2024-07-13 22:52:15 -04:00
Cameron Thompson
41b2c6a4f9 Update screenshots 2024-07-13 22:38:12 -04:00
Cameron Thompson
b8cd5b3a2a Merge pull request #67 from dr-dolomite/feature-watchcat
Added Various Changes and Fixes for Simple Network
2024-07-13 21:01:37 -04:00
Cameron Thompson
88d300303c Merge pull request #66 from dr-dolomite/feature-watchcat
Hot Fix
2024-07-03 20:03:01 -04:00
Cameron Thompson
65ceb39c1f Merge pull request #65 from dr-dolomite/feature-watchcat
Fixed SINR and RSRQ Swapped values when using NSA
2024-07-01 20:20:03 -04:00
Cameron Thompson
14b45941b0 Merge pull request #64 from dr-dolomite/feature-watchcat
Added Various Changes
2024-07-01 19:52:28 -04:00
Cameron Thompson
f6290708bf Merge pull request #59 from dr-dolomite/development-socat
Changes for Beta 1.0
2024-05-31 18:24:02 -04:00
Cameron Thompson
7c413fe5a0 Capture whole Firmware rev in ttyd 2024-05-26 15:55:18 -04:00
iamromulan
70e9af1273 Fix version number 2024-05-26 15:46:33 -04:00
Cameron Thompson
155e8dd9bb Merge pull request #57 from dr-dolomite/development-socat
Added Changes for Version 0.9
2024-05-24 20:39:13 -04:00
Cameron Thompson
b1cd03ec72 Remove Requires from unit 2024-05-24 13:03:50 -04:00
Cameron Thompson
3965081d97 Ensure opt.mount is available
Ensure that opt.mount is complete before starting lighttpd
2024-05-24 12:22:52 -04:00
iamromulan
9ea53d593d fix chmod 2024-05-23 23:33:02 -04:00
iamromulan
b4bc15f8ef Dumb mistake fix 2024-05-23 23:06:45 -04:00
iamromulan
e6a0c00ce8 Fix mistakes for update script 2024-05-23 22:26:16 -04:00
Cameron Thompson
f6739360ee Merge pull request #56 from dr-dolomite/development-socat
Added Various Changes
2024-05-23 20:31:31 -04:00
Cameron Thompson
f1b08de405 Merge pull request #55 from dr-dolomite/development-socat
Hot Fix for Index (Home Page) Async Problem
2024-05-23 00:43:00 -04:00
Cameron Thompson
9ca4451ef4 Use curl instead
Downloads ttyd and tailscale with curl now. Needed for newer RM520 firmwares.
2024-05-22 15:20:05 -04:00
Cameron Thompson
08b799a906 Merge pull request #53 from dr-dolomite/development-socat
Added Various Changes for Alpha 0.8
2024-05-19 00:06:01 -04:00
iamromulan
744871a90b Make sure curl is on all firmware versions pt2 2024-05-17 23:36:21 -04:00
iamromulan
79f835fd0f Make sure curl is on all firmware versions 2024-05-17 23:24:46 -04:00
Cameron Thompson
5e8bcd1d3f Merge pull request #52 from dr-dolomite/development-socat
Added Various Changes Ready For Merge
2024-05-14 00:48:43 -04:00
iamromulan
5f387e7b17 menu is executable 2024-05-14 00:17:33 -04:00
iamromulan
bf0c2028b1 Update start_menu.sh 2024-05-14 00:14:37 -04:00
iamromulan
0858b03da2 Update start_menu.sh 2024-05-13 23:20:42 -04:00
iamromulan
408cf583dd Install Console Menu 2024-05-13 22:35:32 -04:00
Cameron Thompson
ff23e5cfac Merge pull request #50 from dr-dolomite/development-socat
NSA Mode Bandwidth Parsing and SMS Layout Fixes
2024-05-11 23:14:10 -04:00
571 changed files with 38721 additions and 557 deletions

156
README.md
View File

@@ -1,158 +1,8 @@
# RGMII Toolkit # RGMII Toolkit
Software deployment Toolkit for Quectel RM5xxx series 5G modems utilizing an m.2 to RJ45 adapter (RGMII) Software deployment Toolkit for Quectel RM5xxx series 5G modems utilizing an m.2 to RJ45 adapter (RGMII)
Current Branch: **Development** Current Branch: **overhaul-SDXLEMUR**
Current Status: ⚠️ **DO NOT USE OR DEPLOY/BROKEN STATE** ⚠️
Please PR to this branch instead of main :) - Currently creating an OpenWRT overlay sub-system
Fork development, and PR development to development :)
#### [JUMP TO HOW TO USE](#how-to-use)
**Currently:** This will allow you to install or if already installed, update, remove, or modify:
- Simple Admin: A simple web interface for managing your Quectel m.2 modem through it's gateway address
- It will install socat-at-bridge: sets up ttyOUT and ttyOUT2 for AT commands. You'll be able to use the `atcmd` command as well for an interactive at command session from adb, ssh, or ttyd
- It will install simplefirewall: A simple firewall that blocks definable incoming ports and a TTL mangle option/modifier. As of now only the TTL is controllable through Simple Admin. You can edit port block options and TTL from the 3rd option in the toolkit
- Tailscale: A magic VPN for accessing Simple Admin, SSH, and ttyd on the go. The Toolkit installs the Tailscale client directly to the modem and allows you to login and configure other settings. Head over to tailscale.com to sign up for a free account and learn more.
- Schedule a Daily Reboot at a specified time
- A fix for certain modems that don't start in CFUN=1 mode
- Entware/OPKG: A package installer/manager/repo
- Run `opkg help` to see how to use it
- These packages are installable: https://bin.entware.net/armv7sf-k3.2/Packages.html
- TTYd: A shell session right from your browser
- Currently this uses port 443 but SSL/TLS is not in use (http only for now)
- Entware/OPKG is required so it will install it if it isn't installed
- This will replace the stock Quectel login and passwd binaries with ones from entware
**My goal** is for this to also include any new useful scripts or software for this modem and others that support RGMII mode.
## Screenshots
![Home Page](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulansimpleindex.png?raw=true)
![AT Commands](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulanatcommands.png?raw=true)
![TTL](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulansimpleTTL.png?raw=true)
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulantoolkit.png?raw=true)
# Devleopment Branch: the below commands will download the beta/work in progress toolkit
## How to Use
**To run the Toolkit:**
- Open ADB & Fastboot++ covered in [Using ADB](https://github.com/iamromulan/quectel-rgmii-configuration-notes?tab=readme-ov-file#unlocking-and-using-adb) or just use adb
- Make sure your modem is connected by USB to your computer
- Run `adb devices` to make sure your modem is detected by adb
- Run `adb shell ping 8.8.8.8` to make sure the shell can access the internet. If you get an error, make sure the modem is connected to a cellular network and make sure `AT+QMAPWAC=1` as covered in the troubleshooting section: [I Can't get internet access from the Ethernet port (Common)](https://github.com/iamromulan/quectel-rgmii-configuration-notes/tree/main?tab=readme-ov-file#i-cant-get-internet-access-from-the-ethernet-port-common)
- If you don't get an error you should be getting replies back endlessly, press `CTRL-C` to stop it.
- Simply Copy/Paste this into your Command Prompt/Shell
```bash
adb shell "cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh" && cd /
```
**Or, if you want to stay in the modems shell when you are done**
```
adb shell
```
Then run
```
cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd /
```
**You should see:**
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulantoolkit.png?raw=true)
## Tailscale Installation and Config
> :warning: Your modem must already be connected to the internet for this to install
### Installation:
Open up the toolkit main menu and **press 4** to enter the Tailscale menu
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/tailscalemenu.png?raw=true)
**Press 1, wait for it to install. This is a very large file for the system so give it some time.**
**Once done and it says Tailscale installed successfully press 2/enter to configure it.**
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/tailscaleconfig.png?raw=true)
If you want to, enable the Tailscale Web UI on port 8088 for configuration from the browser later by **pressing 1/enter**.
To do it in the toolkit:
First time connecting you'll be given a link to login with
- Press 3 to just connect only.
- Press 4 to connect and enable SSH access (remote command line) over tailscale.
- Press 5 to reconnect with SSH off while connected with SSH on
- Press 6 to disconnect
- Press 7 to Logout
That's it! From another device running tailscale you should be able to access your modem through the IP assigned to it by your tailnet. To access SSH from another device on the tailnet, open a terminal/command prompt and type
tailscale ssh root@(IP or Hostname)
IP or Hostname being the IP or hostname assigned to it in your tailnet
- Note that your SSH client must be able to give you a link to sign in with upon connecting. That's how the session is authorized. Works fine in Windows CMD or on Android use JuiceSSH.
## Advanced/Beta
### Entware/OPKG installation
It isn't perfect yet so it goes here under Advanced/Beta for now.
Here's what you gotta know about going into it:
- After installing, the `opkg` command will work
- You can run `opkg list` to see a list of installable packages, or head over to https://bin.entware.net/armv7sf-k3.2/Packages.html
- Everything opkg does is installed to /opt
- `/opt` is actually located at `/usrdata/opt` to save space but is
mounted at `/opt`
- Anything `opkg` installs will not be available in the system path by
default but you can get around this either:
#### Temporarily:
Run this at the start of each adb shell or SSH shell session
export PATH=/opt/bin:/opt/sbin:$PATH
#### Permanently:
Symbolic linking each binary installed by the package to `/bin` and `/sbin` from `/opt/bin` and `/opt/sbin`
For example, if you were to install zerotier:
opkg install zerotier
ln -sf /opt/bin/zerotier-one /bin
ln -sf /opt/bin/zerotier-cli /bin
ln -sf /opt/bin/zerotier-idtool /bin
Now you can run those 3 binaries from the shell anytime since they are linked in a place already part of the system path.
I plan to create a watchdog service for /opt/bin and /opt/sbin that will automaticly link new packages to /bin or /sbin later on in order to combat this.
### TTYd installation
It isn't perfect yet so it goes here under Advanced/Beta for now.
Here's what you gotta know about going into it:
- This listens on port 443 for http requests (no SSL/TLS yet)
- This will automaticly install entware and patch the login and passwd binaries with ones from entware
- It will ask you to set a password for the `root` user account
- TTYd doesn't seem to be too mobile friendly for now but I optimized it the best i could for now so it is at least usable through a smartphone browser. Hopefully the startup script can be improved even more later.
## Acknowledgements
### GitHub Users/Individuals:
Thank You to:
[Nate Carlson](https://github.com/natecarlson) for the Original Telnet Deamon/socat bridge usage and the Original RGMII Notes
[aesthernr](https://github.com/aesthernr) for creating the Original Simple Admin
[rbflurry](https://github.com/rbflurry/) for inital Simple Admin fixes
[dr-dolomite](https://github.com/dr-dolomite) for some major stat page improvements and this repos first approved external PR!
[tarunVreddy](https://github.com/tarunVreddy) for helping with the SA band aggregation parse
### Existing projects:
Simpleadmin heavily uses the AT Command Parsing Scripts (Basically a copy with new changes and tweaks) of Dairyman's Rooter Source https://github.com/ofmodemsandmen/ROOterSource2203
Tailscale was obtained through Tailscale's static build page. Since these modems have a 32-bit ARM processor on-board I used the arm package. https://pkgs.tailscale.com/stable/#static
Entware/opkg was obtained through [Entware's wiki](https://github.com/Entware/Entware/wiki/Alternative-install-vs-standard) and the installer heavily modified by [iamromulan](https://github.com/iamromulan) for use with Quectel modems
TTYd was obtained from the [TTYd Project](https://github.com/tsl0922/ttyd)

109
at-list.md Normal file
View File

@@ -0,0 +1,109 @@
# Useful AT Commands
You can send more than one command at once by sperating them with ``;`` and not including the AT part. ``AT+QENG="servingcell";+QCAINFO`` for example to see the info from both ``AT+QENG="servingcell"`` and ``AT+QCAINFO``
## PCIe RC Ethernet mode setup
### For RM500-RM521 modems
``AT+QETH="eth_driver","r8125",1;+QCFG="pcie/mode",1;+QCFG="usbnet",1;+QMAP="MPDN_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF";+QMAP="DHCPV4DNS","disable";+QCFG="usbcfg",0x2C7C,0x0801,1,1,1,1,1,2,0;+CFUN=1,1``
This will do the following:
- Set the 2.5Gig Ethernet driver as active
- Enable PCIe RC mode
- Set to ECM mode via USB and AP mode connection behavior
- Enable IPPT
- Enable DNS IPPT (disables onboard proxy)
- Force Enables ADB Access
- Reboots after all the above
### For x70 modems (RM550/551)
For BETA versions of firmware: the adb value 2 trick still works so one and done:
``AT+QCFG="pcie/mode",1;+QCFG="usbnet",1;+QCFG="usbcfg",0x2C7C,0x0122,1,1,1,1,1,2,0;+CFUN=1,1``
OR if you are running the latest non-beta firmware
``AT+QCFG="pcie/mode",1;+QCFG="usbnet",1``
Then unlock ADB:
Ask the modem for its adb code by sending: ``AT+QADBKEY?``
It'll respond with something like ``+QADBKEY: 29229988``
Take that number and paste it in this generator: https://onecompiler.com/python/3znepjcsq (hint: where it says STDIN)
You should get something like
``AT+QADBKEY="mrX4zOPwdSIEjfM"``
Send that command to the modem and adb will be able to be turned on with the next command
Now you can turn it on with the usbcfg command ``AT+QCFG="usbcfg"``
***Be super careful, this controls what ports are on/off over USB.***
Run it and you will get the current settings. Something like this:
``+QCFG: "usbcfg",0x2C7C,0x0122,1,1,1,1,1,0,0``
Send ``AT+QCFG="usbcfg",0x2C7C,0x0122,1,1,1,1,1,1,0`` to enable adb
Now you can reboot: ``AT+CFUN=1,1``
This will do the following:
- Enable PCIe RC mode (Driver selection is automatic now)
- Set to ECM mode via USB and AP mode connection behavior
- Force Enables ADB Access
- Reboots after all the above
Tip: APN automatic selection will somtimes choose the wrong APN. You may need to set your APN after powering up with the SIM inserted.
## The List
- ``AT+CFUN=1,1`` (reboot)
- ``AT+CFUN=0;CFUN=1`` (Disconnect then reconnect)(tip: run this after chnaging APN and you don't have to reboot)
- ``AT+QMAPWAC? ``(get current status of auto connect, 0=disabled 1=enabled)
- ``AT+QMAPWAC=1`` (enable auto connect internet for ethernet)
- ``AT+QMAPWAC=0`` (disable auto connect for ethernet; use when you want internet over USB to work; IPPT must be disabled)
- ``AT+QUIMSLOT?`` (get active sim slot; 1=Slot 1; 2=Slot 2)
- ``AT+QUIMSLOT=1`` (switch to sim slot 1)
- ``AT+QUIMSLOT=2`` (switch to sim slot 2)
- ``AT+CGDCONT?`` (Get active APN profle st 1 through 8)
- ``AT+QMBNCFG="AutoSel",0;+QMBNCFG="Deactivate"`` (Disable Automatic APN selection)(You will need to set your APN when you switch SIMs or Slots)(Can also set APN after you switch the run ``AT+CFUN=0;CFUN=1``
- ``AT+CGDCONT=1,"IPV4V6","APNHERE"`` (Sets APN profile 1 to APNHERE using both IPV4 and IPV6)
- ``AT+GSN`` (Show current IMEI)
- ``AT+EGMR=0,7`` (Show current IMEI)
- ``AT+EGMR=1,7,"IMEIGOESHERE"`` (sets/repairs IMEI)
- ``AT+QCFG="usbcfg",0x2C7C,0x0801,1,1,1,1,1,2,0`` (enables adb bypasses adb key)
- ``AT+QENG="servingcell"`` (shows anchor band and network connection status)
- ``AT+QCAINFO`` (Show all connected bands/CA info)
- ``AT+QNWPREFCFG="mode_pref"`` (Check what the current network search mode is set to)
- ``AT+QNWPREFCFG="mode_pref",AUTO`` (Set network search mode to automatic)
- ``AT+QNWPREFCFG="mode_pref",NR5G:LTE`` (Set network search mode to 5GNR and 4GLTE only)
- ``AT+QNWPREFCFG="mode_pref",NR5G`` (Set network search mode to 5GNR only)
- ``AT+QNWPREFCFG="mode_pref",LTE`` (Set network search mode to 4GLTE only)
- ``AT+QNWPREFCFG="nr5g_disable_mode"`` (Check to see if SA or NSA NR5G is disabled)
- ``AT+QNWPREFCFG="nr5g_disable_mode",0`` (Enable Both SA and NSA 5GNR)
- ``AT+QNWPREFCFG="nr5g_disable_mode",1`` (Disable SA 5GNR only)
- ``AT+QNWPREFCFG="nr5g_disable_mode",2`` (Disable NSA 5GNR only)
- ``AT+QNWPREFCFG="nr5g_band"`` (Get current SA 5GNR bandlock settings)
- ``AT+QNWPREFCFG="nsa_nr5g_band"`` (Get current NSA 5GNR bandlock settings)
- ``AT+QNWPREFCFG="nr5g_band",1:2:3:4:5:6`` (Example: Lock to SA 5G/NR bands n1,n2,n3,n4,n5, and n6)
- ``AT+QNWPREFCFG="nsa_nr5g_band",1:2:3:4:5:6`` (Example: Lock to SA 5G/NR bands n1,n2,n3,n4,n5, and n6)
- ``AT+QNWPREFCFG="lte_band"`` (Get current 4GLTE bandlock settings)
- ``AT+QNWPREFCFG="lte_band",1:2:3:4:5:6`` (Example: Lock to 4G/LTE bands 1,2,3,4,5, and 6)
- ``AT+QMAP="WWAN"`` (Show currently assigned IPv4 and IPv6 from the provider)
- ``AT+QMAP="LANIP"`` (Show current DHCP range and Gateway address for VLAN0)
- ``AT+QMAP="LANIP",IP_start_range,IP_end_range,Gateway_IP `` (Set IPv4 Start/End range and Gateway IP of DHCP for VLAN0)
- ``AT+QMAP="DHCPV4DNS","disable"`` (disable the onboard DNS proxy; recommended for IPPT)
- ``AT+QMAP="MPDN_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF"`` (Turn on IP Passthrough for Ethernet)
(:warning: On the RM551E-GL you must specify the ethernet devices MAC address instead of FF:FF:FF...)
- ``AT+QMAP="MPDN_rule",0`` (turn off IPPT/clear MPDN rule 0; Remember to run AT+QMAPWAC=1 and reboot after)

View File

@@ -0,0 +1,15 @@
Package: atinout
Version: 0.9.1
Depends: libc
Source: feeds/kiddin9/atinout
SourceName: atinout
License: GPLv2
LicenseFiles: LICENSE
Section: net
SourceDateEpoch: 1731357966
URL: http://atinout.sourceforge.net/
Maintainer: Adrian Guenter <a@gntr.me>
Architecture: arm_cortex-a7_neon-vfpv4
Installed-Size: 20480
Description: Atinout is a program that will execute AT commands in sequence and
capture the response from the modem.

View File

@@ -0,0 +1,5 @@
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_postinst $0 $@

View File

@@ -0,0 +1,4 @@
#!/bin/sh
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_prerm $0 $@

View File

@@ -0,0 +1 @@
2.0

View File

@@ -0,0 +1,2 @@
/etc/config/
/etc/atinout/

View File

@@ -0,0 +1 @@
2.0

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Set up OpenWRT overlay filesystem
DefaultDependencies=no
Requires=qmi_shutdown_modemd.service
After=qmi_shutdown_modemd.service
ConditionPathExists=/usr/sbin/openwrt-overlay.sh
[Service]
Type=oneshot
ExecStart=/usr/sbin/openwrt-overlay.sh
RemainAfterExit=true
[Install]
WantedBy=openwrt-subsystem.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=OpenWRT Subsystem Target
Requires=openwrt-overlay.service
After=qmi_shutdown_modemd.service openwrt-overlay.service
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,81 @@
#!/bin/sh
newroot() {
/bin/echo "Begin mount fix process to make a usable userspace for OpenWRT Subsystem"
# Forcefully unmount /etc
/bin/echo "Unmounting the bind at /etc"
/bin/umount -lf /etc
# Remount root filesystem as read-write
/bin/echo "Remounting / as read-write"
/bin/mount -o remount,rw /
# Make mount namespaces private
mount --make-rprivate /
# Ensure necessary directories exist for overlay and pivot_root
/bin/echo "Creating new overlay system"
if [ ! -d /usrdata/rootfs ]; then
mkdir -p /usrdata/rootfs
fi
if [ ! -d /usrdata/rootfs-workdir ]; then
mkdir -p /usrdata/rootfs-workdir
fi
if [ ! -d /rootfs ]; then
mkdir -p /rootfs
fi
# Mount the new overlay filesystem
/bin/mount -t overlay overlay -o lowerdir=/,upperdir=/usrdata/rootfs,workdir=/usrdata/rootfs-workdir /rootfs
# Create the real_rootfs directory in the new root
if [ ! -d /rootfs/real_rootfs ]; then
mkdir -p /rootfs/real_rootfs
fi
# Pivot root to the new root
/bin/echo "Pivoting Root / to /rootfs; Be back soon!!"
/sbin/pivot_root /rootfs /rootfs/real_rootfs >/dev/null 2>&1
# Move the mounted filesystems to the new locations
/bin/echo "Moving previous mount points to the new root"
/bin/mount --move /real_rootfs/sys /sys
/bin/mount --move /real_rootfs/proc /proc
/bin/mount --move /real_rootfs/tmp /tmp
/bin/mount --move /real_rootfs/dev /dev
/bin/mount --move /real_rootfs/firmware /firmware
/bin/mount --move /real_rootfs/usrdata /usrdata
/bin/mount --move /real_rootfs/persist /persist
/bin/mount --move /real_rootfs/cache /cache
/bin/mount --move /real_rootfs/data /data
/bin/mount --move /real_rootfs/run /run
/bin/mount --move /real_rootfs/etc/machine-id /etc/machine-id
/bin/mount --move /real_rootfs/var/volatile /var/volatile
/bin/mount --move /real_rootfs/systemrw /systemrw
# Bind-mount core mountpoints back into real_rootfs for chroot/debug
/bin/echo "Binding previous mount points to the old root"
/bin/mount --bind /dev /real_rootfs/dev
/bin/mount --bind /proc /real_rootfs/proc
/bin/mount --bind /sys /real_rootfs/sys
/bin/mount --bind /tmp /real_rootfs/tmp
/bin/mount --bind /run /real_rootfs/run
/bin/mount --bind /firmware /real_rootfs/firmware
/bin/mount --bind /persist /real_rootfs/persist
/bin/mount --bind /cache /real_rootfs/cache
/bin/mount --bind /data /real_rootfs/data
/bin/mount --bind /systemrw /real_rootfs/systemrw
/bin/mount --bind /usrdata /real_rootfs/usrdata
/bin/mount --bind /etc /real_rootfs/etc
/bin/mount --bind /etc/machine-id /real_rootfs/etc/machine-id
/bin/mount --bind /var/volatile /real_rootfs/var/volatile
# Mount orginal rootfs as RO
/bin/mount -o remount,ro /real_rootfs
echo "Complete"
}
newroot

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Set up OpenWRT overlay filesystem
DefaultDependencies=no
Requires=qmi_shutdown_modemd.service
After=qmi_shutdown_modemd.service
ConditionPathExists=/usr/sbin/openwrt-overlay.sh
[Service]
Type=oneshot
ExecStart=/usr/sbin/openwrt-overlay.sh
RemainAfterExit=true
[Install]
WantedBy=openwrt-subsystem.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=OpenWRT Subsystem Target
Requires=openwrt-overlay.service
After=qmi_shutdown_modemd.service openwrt-overlay.service
[Install]
WantedBy=multi-user.target

View File

@@ -1,10 +1,15 @@
#!/bin/sh #!/bin/sh
# Define toolkit paths # Define toolkit paths
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/usrdata/root/bin
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITMAINTREE="main" GITTREE="SDXLEMUR"
GITDEVTREE="development" GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
TMP_DIR="/tmp" TMP_DIR="/tmp"
USRDATA_DIR="/usrdata" USRDATA_DIR="/usrdata"
SOCAT_AT_DIR="/usrdata/socat-at-bridge" SOCAT_AT_DIR="/usrdata/socat-at-bridge"
@@ -104,7 +109,7 @@ ensure_entware_installed() {
remount_rw remount_rw
if [ ! -f "/opt/bin/opkg" ]; then if [ ! -f "/opt/bin/opkg" ]; then
echo -e "\e[1;32mInstalling Entware/OPKG\e[0m" echo -e "\e[1;32mInstalling Entware/OPKG\e[0m"
cd /tmp && wget -O installentware.sh "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/installentware.sh" && chmod +x installentware.sh && ./installentware.sh cd /tmp && wget -O installentware.sh "$GITROOT/installentware.sh" && chmod +x installentware.sh && ./installentware.sh
if [ "$?" -ne 0 ]; then if [ "$?" -ne 0 ]; then
echo -e "\e[1;31mEntware/OPKG installation failed. Please check your internet connection or the repository URL.\e[0m" echo -e "\e[1;31mEntware/OPKG installation failed. Please check your internet connection or the repository URL.\e[0m"
exit 1 exit 1
@@ -161,7 +166,17 @@ ensure_entware_installed() {
else else
echo "useradd already exists. Continuing..." echo "useradd already exists. Continuing..."
fi fi
if [ ! -f "/usr/bin/curl" ] && [ ! -f "/opt/bin/curl" ]; then
echo "curl does not exist. Installing curl..."
opkg update && opkg install curl
if [ "$?" -ne 0 ]; then
echo -e "\e[1;31mFailed to install curl. Please check your internet connection and try again.\e[0m"
exit 1
fi
else
echo "curl already exists. Continuing..."
fi
} }
#Uninstall Entware if the Users chooses #Uninstall Entware if the Users chooses
@@ -293,8 +308,8 @@ set_simpleadmin_passwd(){
ensure_entware_installed ensure_entware_installed
opkg update opkg update
opkg install libaprutil opkg install libaprutil
wget -O /usrdata/root/bin/htpasswd https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/htpasswd && chmod +x /usrdata/root/bin/htpasswd wget -O /usrdata/root/bin/htpasswd $GITROOT/simpleadmin/htpasswd && chmod +x /usrdata/root/bin/htpasswd
wget -O /usrdata/root/bin/simplepasswd https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/simplepasswd && chmod +x /usrdata/root/bin/simplepasswd wget -O /usrdata/root/bin/simplepasswd $GITROOT/simpleadmin/simplepasswd && chmod +x /usrdata/root/bin/simplepasswd
echo -e "\e[1;32mTo change your simpleadmin (admin) password in the future...\e[0m" echo -e "\e[1;32mTo change your simpleadmin (admin) password in the future...\e[0m"
echo -e "\e[1;32mIn the console type simplepasswd and press enter\e[0m" echo -e "\e[1;32mIn the console type simplepasswd and press enter\e[0m"
/usrdata/root/bin/simplepasswd /usrdata/root/bin/simplepasswd
@@ -308,54 +323,31 @@ set_root_passwd() {
# Function to install/update Simple Admin # Function to install/update Simple Admin
install_simple_admin() { install_simple_admin() {
while true; do echo -e "\e[1;32mInstalling Simpleadmin 2.0\e[0m"
echo -e "\e[1;32mWhat version of Simple Admin do you want to install? This will start a webserver on port 80/443 on test build\e[0m" ensure_entware_installed
echo -e "\e[1;32m1) Stable current version, (Main Branch)\e[0m" echo -e "\e[1;31m2) Installing Simpleadmin 2.0\e[0m"
echo -e "\e[1;31m2) Install Test Build (Development Branch)\e[0m" mkdir /usrdata/simpleupdates > /dev/null 2>&1
echo -e "\e[0;33m3) Return to Main Menu\e[0m" mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1
echo -e "\e[1;32mSelect your choice: \e[0m" wget -O /usrdata/simpleupdates/scripts/update_socat-at-bridge.sh $GITROOT/simpleupdates/scripts/update_socat-at-bridge.sh && chmod +x /usrdata/simpleupdates/scripts/update_socat-at-bridge.sh
read choice echo -e "\e[1;32mInstalling/updating dependency: socat-at-bridge\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
case $choice in /usrdata/simpleupdates/scripts/update_socat-at-bridge.sh
1) echo -e "\e[1;32m Dependency: socat-at-bridge has been updated/installed.\e[0m"
echo -e "\e[1;32mYou are using the development toolkit; Use the one from main if you want the stable version right now\e[0m" sleep 1
break wget -O /usrdata/simpleupdates/scripts/update_simplefirewall.sh $GITROOT/simpleupdates/scripts/update_simplefirewall.sh && chmod +x /usrdata/simpleupdates/scripts/update_simplefirewall.sh
;; echo -e "\e[1;32mInstalling/updating dependency: simplefirewall\e[0m"
2) echo -e "\e[1;32mPlease Wait....\e[0m"
ensure_entware_installed /usrdata/simpleupdates/scripts/update_simplefirewall.sh
echo -e "\e[1;31m2) Installing simpleadmin from the development test branch\e[0m" echo -e "\e[1;32m Dependency: simplefirewall has been updated/installed.\e[0m"
mkdir /usrdata/simpleupdates > /dev/null 2>&1 sleep 1
mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1 set_simpleadmin_passwd
wget -O /usrdata/simpleupdates/scripts/update_socat-at-bridge.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_socat-at-bridge.sh && chmod +x /usrdata/simpleupdates/scripts/update_socat-at-bridge.sh wget -O /usrdata/simpleupdates/scripts/update_simpleadmin.sh $GITROOT/simpleupdates/scripts/update_simpleadmin.sh && chmod +x /usrdata/simpleupdates/scripts/update_simpleadmin.sh
echo -e "\e[1;32mInstalling/updating dependency: socat-at-bridge\e[0m" echo -e "\e[1;32mInstalling/updating: Simpleadmin content\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m" echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_socat-at-bridge.sh /usrdata/simpleupdates/scripts/update_simpleadmin.sh
echo -e "\e[1;32m Dependency: socat-at-bridge has been updated/installed.\e[0m" echo -e "\e[1;32mSimpleadmin content has been updated/installed.\e[0m"
sleep 1 sleep 1
wget -O /usrdata/simpleupdates/scripts/update_simplefirewall.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_simplefirewall.sh && chmod +x /usrdata/simpleupdates/scripts/update_simplefirewall.sh break
echo -e "\e[1;32mInstalling/updating dependency: simplefirewall\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_simplefirewall.sh
echo -e "\e[1;32m Dependency: simplefirewall has been updated/installed.\e[0m"
sleep 1
set_simpleadmin_passwd
wget -O /usrdata/simpleupdates/scripts/update_simpleadmin.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_simpleadmin.sh && chmod +x /usrdata/simpleupdates/scripts/update_simpleadmin.sh
echo -e "\e[1;32mInstalling/updating: Simpleadmin content\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_simpleadmin.sh
echo -e "\e[1;32mSimpleadmin content has been updated/installed.\e[0m"
sleep 1
break
;;
3)
echo "Returning to main menu..."
break
;;
*)
echo "Invalid choice. Please try again."
;;
esac
done
} }
# Function to Uninstall Simpleadmin and dependencies # Function to Uninstall Simpleadmin and dependencies
@@ -475,9 +467,10 @@ tailscale_menu() {
# Function to install, update, or remove Tailscale # Function to install, update, or remove Tailscale
install_update_tailscale() { install_update_tailscale() {
echo -e "\e[1;31m2) Installing tailscale from the $GITTREE branch\e[0m" echo -e "\e[1;31m2) Installing tailscale from the $GITTREE branch\e[0m"
ensure_entware_installed
mkdir /usrdata/simpleupdates > /dev/null 2>&1 mkdir /usrdata/simpleupdates > /dev/null 2>&1
mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1 mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1
wget -O /usrdata/simpleupdates/scripts/update_tailscale.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_tailscale.sh && chmod +x /usrdata/simpleupdates/scripts/update_tailscale.sh wget -O /usrdata/simpleupdates/scripts/update_tailscale.sh $GITROOT/simpleupdates/scripts/update_tailscale.sh && chmod +x /usrdata/simpleupdates/scripts/update_tailscale.sh
echo -e "\e[1;32mInstalling/updating: Tailscale\e[0m" echo -e "\e[1;32mInstalling/updating: Tailscale\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m" echo -e "\e[1;32mPlease Wait....\e[0m"
remount_rw remount_rw
@@ -503,8 +496,8 @@ configure_tailscale() {
1) 1)
remount_rw remount_rw
cd /lib/systemd/system/ cd /lib/systemd/system/
wget -O tailscale-webui.service https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/main/tailscale/systemd/tailscale-webui.service wget -O tailscale-webui.service $GITROOT/tailscale/systemd/tailscale-webui.service
wget -O tailscale-webui-trigger.service https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/main/tailscale/systemd/tailscale-webui-trigger.service wget -O tailscale-webui-trigger.service $GITROOT/tailscale/systemd/tailscale-webui-trigger.service
ln -sf /lib/systemd/system/tailscale-webui-trigger.service /lib/systemd/system/multi-user.target.wants/ ln -sf /lib/systemd/system/tailscale-webui-trigger.service /lib/systemd/system/multi-user.target.wants/
systemctl daemon-reload systemctl daemon-reload
echo "Tailscale Web UI Enabled" echo "Tailscale Web UI Enabled"
@@ -745,7 +738,7 @@ install_sshd() {
ensure_entware_installed ensure_entware_installed
mkdir /usrdata/simpleupdates > /dev/null 2>&1 mkdir /usrdata/simpleupdates > /dev/null 2>&1
mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1 mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1
wget -O /usrdata/simpleupdates/scripts/update_sshd.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_sshd.sh && chmod +x /usrdata/simpleupdates/scripts/update_sshd.sh wget -O /usrdata/simpleupdates/scripts/update_sshd.sh $GITROOT/simpleupdates/scripts/update_sshd.sh && chmod +x /usrdata/simpleupdates/scripts/update_sshd.sh
echo -e "\e[1;32mInstalling/updating: SSHd\e[0m" echo -e "\e[1;32mInstalling/updating: SSHd\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m" echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_sshd.sh /usrdata/simpleupdates/scripts/update_sshd.sh
@@ -754,6 +747,20 @@ install_sshd() {
# Main menu # Main menu
ARCH=$(uname -a)
if echo "$ARCH" | grep -q "aarch64"; then
cd /tmp && wget -O RM55x_rcPCIe_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/SDXPINN/RM55x_rcPCIe_toolkit.sh && chmod +x RM55x_rcPCIe_toolkit.sh && ./RM55x_rcPCIe_toolkit.sh && cd /
exit 0
elif echo "$ARCH" | grep -q "armv7l"; then
# Continue if architecture is armv7l
echo "Architecture is armv7l, continuing..."
else
uname -a
echo "Unsupported architecture."
exit 1
fi
while true; do while true; do
echo " .%+: " echo " .%+: "
echo " .*@@@-. " echo " .*@@@-. "

114
old/download Normal file
View File

@@ -0,0 +1,114 @@
#!/bin/sh
# Determine the absolute path of the script
SCRIPT_PATH=$(realpath "$0")
download() {
if [ "$1" = "github" ]; then
download_github_directory "$2" "$3"
else
download_file "$1" "$2"
fi
}
download_file() {
url="$1"
output="${2:-$(basename "$url")}"
echo "Attempting to download file from URL: $url"
echo "Saving to output: $output"
# Ensure the output directory exists
mkdir -p "$(dirname "$output")"
if command -v curl > /dev/null 2>&1; then
curl -L -o "$output" "$url"
elif command -v wget > /dev/null 2>&1; then
wget -O "$output" "$url"
else
echo "Error: Neither curl nor wget is available."
exit 1
fi
}
download_github_directory() {
github_url="$1"
output_dir="${2:-.}" # Set output directory to the provided parameter or current directory
repo_info=$(echo "$github_url" | sed -n 's|https://github.com/\([^/]*\)/\([^/]*\)/tree/\([^/]*\)/\(.*\)|\1 \2 \3 \4|p')
owner=$(echo "$repo_info" | cut -d' ' -f1)
repo=$(echo "$repo_info" | cut -d' ' -f2)
branch=$(echo "$repo_info" | cut -d' ' -f3)
directory=$(echo "$repo_info" | cut -d' ' -f4)
echo "Owner: $owner, Repo: $repo, Branch: $branch, Directory: $directory"
if [ -z "$owner" ] || [ -z "$repo" ] || [ -z "$branch" ] || [ -z "$directory" ]; then
echo "Error: Invalid GitHub URL."
exit 1
fi
echo "Output directory set to: $output_dir"
api_url="https://api.github.com/repos/$owner/$repo/contents/$directory?ref=$branch"
echo "Fetching directory contents from API URL: $api_url"
if command -v curl > /dev/null 2>&1; then
contents=$(curl -s -H "Accept: application/vnd.github.v3+json" "$api_url")
elif command -v wget > /dev/null 2>&1; then
contents=$(wget -qO- --header="Accept: application/vnd.github.v3+json" "$api_url")
else
echo "Error: Neither curl nor wget is available."
exit 1
fi
echo "API Response Contents:"
echo "$contents"
# Use awk to parse JSON content and prepare commands
echo "$contents" | awk -v output_dir="$output_dir" -v owner="$owner" -v repo="$repo" -v branch="$branch" -v script_path="$SCRIPT_PATH" '
BEGIN {
RS="},"; FS=","; # Set Record Separator to "}," and Field Separator to ","
}
/"type": "file"/ {
file_path = ""; download_url = "";
for (i = 1; i <= NF; i++) {
if ($i ~ /"path": "/) {
gsub(/.*"path": "/, "", $i);
gsub(/".*/, "", $i);
file_path = $i;
}
if ($i ~ /"download_url": "/) {
gsub(/.*"download_url": "/, "", $i);
gsub(/".*/, "", $i);
download_url = $i;
}
}
if (file_path && download_url) {
output_file_path = output_dir "/" file_path;
print "Calling download_file for:", download_url, "to", output_file_path;
system("'"$SCRIPT_PATH"'" " \"" download_url "\" \"" output_file_path "\"");
}
}
/"type": "dir"/ {
sub_dir = "";
for (i = 1; i <= NF; i++) {
if ($i ~ /"path": "/) {
gsub(/.*"path": "/, "", $i);
gsub(/".*/, "", $i);
sub_dir = $i;
}
}
if (sub_dir) {
print "Calling download_github_directory for sub-directory:", sub_dir;
system("'"$SCRIPT_PATH"'" " github \"https://github.com/" owner "/" repo "/tree/" branch "/" sub_dir "\" \"" output_dir "\"");
}
}'
}
if [ "$#" -eq 0 ]; then
echo "Usage: download <type> <url> [output_directory]"
exit 1
else
download "$@"
fi

105
old/installopkg.sh Normal file
View File

@@ -0,0 +1,105 @@
#!/bin/sh
#|---------|-------------------------|
#| TARGET | SDXLEMUR |
#| ARCH | arm_cortex-a7_neon-vfpv4|
#|---------|-------------------------|
# Based on entware, heavily modified by iamromulan
# This script sets up a custom opkg installation system for the SDXLEMUR platform
# The primary feed for this will be my feed and will be a combo of modified IPK files from multiple sources
# opkg is from entware and expects /opt to exist
# /opt will be setup as an overlay of lower / and upper /usrdata/rootfs-upper
# Most likely several mount binds will be setup at / to point back to /opt the overlay
# The real /lib/systemd will need to be able to be written to so we may bind that within /opt
# In active development; will decide if the entware feed gets re added later
ARCH=arm_cortex-a7_neon-vfpv4
#ARCH=armv7sf-k3.2
PRE_OPKG_PATH=$(which opkg)
URL=https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development-SDXLEMUR/opkg-feed/installer
# Remount filesystem as read-write
mount -o remount,rw /
# Will need to edit this. Will be an overlay instead of bind mount
# The package sdxlemur-mount-fix will make this run at boot
create_opt_overlay() {
[ ! -d "/opt" ] && mkdir /opt
[ ! -d "/usrdata/rootfs-upper" ] && mkdir /usrdata/rootfs-upper
[ ! -d "/usrdata/rootfs-work" ] && mkdir /usrdata/rootfs-work
mount -t overlay overlay_root -o lowerdir=/,upperdir=/usrdata/rootfs-upper,workdir=/usrdata/rootfs-work /opt
# add additional mount binds and dir
}
# Account for existing opkg binary on the RM502Q-AE
if [ -n "$PRE_OPKG_PATH" ]; then
# Automatically rename the existing opkg binary
mv "$PRE_OPKG_PATH" "${PRE_OPKG_PATH}_old"
echo -e "\033[32mFactory/Already existing opkg has been renamed to opkg_old.\033[0m"
else
echo "Info: no existing opkg binary detected, proceeding with installation"
fi
echo -e '\033[32mInfo: Creating /opt overlayfs with lower / and upper /usrdata/rootfs-upper \033[0m'
create_opt_overlay
echo -e '\033[32mInfo: Proceeding with main installation ...\033[0m'
echo -e '\033[32mInfo: Opkg package manager deployment...\033[0m'
wget $URL/opkg -O /opt/bin/opkg
chmod 755 /opt/bin/opkg
wget $URL/opkg.conf -O /opt/etc/opkg.conf
echo -e '\033[32mInfo: Basic packages installation...\033[0m'
/opt/bin/opkg update
#/opt/bin/opkg install entware-opt #Will revist this and its need
/opt/bin/opkg install sdxlemur-factory-packages
# Fix for multiuser environment
chmod 777 /opt/tmp
echo -e '\033[32mInfo: Add /opt/bin & /opt/sbin to $PATH variable\033[0m'
ln -sf /opt/bin/opkg /bin
echo -e '\033[32mInfo: Patching Quectel Login Binary\033[0m'
opkg update && opkg install shadow-login shadow-passwd shadow-useradd
if [ "$?" -ne 0 ]; then
echo -e "\e[1;31mPackage installation failed. Please check your internet connection and try again.\e[0m"
exit 1
fi
# Replace the login and passwd binaries and set home for root to a writable directory
rm /opt/etc/shadow
rm /opt/etc/passwd
cp /etc/shadow /opt/etc/
cp /etc/passwd /opt/etc
mkdir /usrdata/root
mkdir /usrdata/root/bin
touch /usrdata/root/.profile
echo "# Set PATH for all shells" > /usrdata/root/.profile
echo "export PATH=/bin:/usr/sbin:/usr/bin:/sbin:/opt/sbin:/opt/bin:/usrdata/root/bin" >> /usrdata/root/.profile
chmod +x /usrdata/root/.profile
sed -i '1s|/home/root:/bin/sh|/usrdata/root:/bin/bash|' /opt/etc/passwd
rm /bin/login /usr/bin/passwd
ln -sf /opt/bin/login /bin
ln -sf /opt/bin/passwd /usr/bin/
ln -sf /opt/bin/useradd /usr/bin/
echo -e "\e[1;31mPlease set the root password.\e[0m"
/usr/bin/passwd
# Install basic and useful utilites
opkg install mc htop dfc lsof
ln -sf /opt/bin/mc /bin
ln -sf /opt/bin/htop /bin
ln -sf /opt/bin/dfc /bin
ln -sf /opt/bin/lsof /bin
# Remount filesystem as read-only
mount -o remount,ro /
echo -e '\033[32mInfo: Congratulations!\033[0m'
echo -e '\033[32mInfo: If there are no errors above then Entware was successfully initialized.\033[0m'

View File

@@ -81,9 +81,9 @@ set_ttl(){
# function to configure the fetures of simplefirewall # function to configure the fetures of simplefirewall
simple_firewall_menu() { simple_firewall_menu() {
if [ ! -f "$SIMPLE_FIREWALL_SCRIPT" ]; then if [ ! -f "$SIMPLE_FIREWALL_SCRIPT" ]; then
echo -e "\033[0;31mSimplefirewall is not installed, would you like to install it?\033[0m" display_random_color "Simplefirewall is not installed, would you like to install it?"
echo -e "\033[0;32m1) Yes\033[0m" display_green "1) Yes"
echo -e "\033[0;31m2) No\033[0m" display_red "2) No"
read -p "Enter your choice (1-2): " install_choice read -p "Enter your choice (1-2): " install_choice
case $install_choice in case $install_choice in
@@ -94,14 +94,15 @@ simple_firewall_menu() {
return return
;; ;;
*) *)
echo -e "\033[0;31mInvalid choice. Please select either 1 or 2.\033[0m" display_red "Invalid choice. Please select either 1 or 2."
;; ;;
esac esac
fi fi
echo -e "\e[1;32mConfigure Simple Firewall:\e[0m" display_random_color "Configure Simple Firewall:"
echo -e "\e[38;5;208m1) Configure incoming port block\e[0m" display_green "1) Configure incoming port block"
echo -e "\e[38;5;27m2) Configure TTL\e[0m" display_green "2) Configure TTL"
display_green "3) Exit to Main Menu"
read -p "Enter your choice (1-2): " menu_choice read -p "Enter your choice (1-2): " menu_choice
case $menu_choice in case $menu_choice in
@@ -111,6 +112,9 @@ simple_firewall_menu() {
2) 2)
set_ttl set_ttl
;; ;;
3)
return
;;
*) *)
echo -e "\e[1;31mInvalid choice. Please select either 1 or 2.\e[0m" echo -e "\e[1;31mInvalid choice. Please select either 1 or 2.\e[0m"
;; ;;
@@ -120,6 +124,6 @@ simple_firewall_menu() {
echo -e "\e[1;32mFirewall configuration updated.\e[0m" echo -e "\e[1;32mFirewall configuration updated.\e[0m"
} }
# Start by checking and installing xml if necessary, then mount filesystem as rw and run the menu # Main execution
mount -o remount,rw / mount -o remount,rw /
simple_firewall_menu simple_firewall_menu

View File

@@ -24,18 +24,18 @@ display_red() {
toolkit_menu() { toolkit_menu() {
while true; do while true; do
display_green "Run a Toolkit version" display_random_color "Run a Toolkit version"
display_green "Select an option:" display_green "Select an option:"
echo "------------------" echo "------------------"
display_green "1. Get and run the Toolkit" display_green "1. Get and run the Toolkit"
display_red "2. Get and run the Development/unstable Toolkit" display_random_color "2. Get and run the Development/unstable Toolkit"
display_red "3. Exit (Enter Root Shell)" display_random_color "3. Exit (Enter Root Shell)"
echo echo
read -p "Select an option (1-11): " option read -p "Select an option (1-3): " option
case "$option" in case "$option" in
1) cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/main/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd / ;; 1) cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/SDXLEMUR/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd / ;;
2) cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd / ;; 2) cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development-SDXLEMUR/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd / ;;
3) break ;; 3) break ;;
*) echo "Invalid option. Please try again." ;; *) echo "Invalid option. Please try again." ;;
esac esac
@@ -44,7 +44,7 @@ toolkit_menu() {
apps_menu() { apps_menu() {
while true; do while true; do
display_green "Run a modem App" display_random_color "Run a modem App"
display_green "Select an option:" display_green "Select an option:"
echo "------------------" echo "------------------"
display_random_color "1. Open File Browser/Editor (mc)" display_random_color "1. Open File Browser/Editor (mc)"
@@ -52,17 +52,17 @@ apps_menu() {
display_random_color "3. Open Task Manager/View CPU Load" display_random_color "3. Open Task Manager/View CPU Load"
display_random_color "4. Run speedtest.net test" display_random_color "4. Run speedtest.net test"
display_random_color "5. Run fast.com test (30Mbps max)" display_random_color "5. Run fast.com test (30Mbps max)"
display_red "6. Go Back" display_green "6. Go Back"
echo echo
read -p "Select an option (1-11): " option read -p "Select an option (1-6): " option
case "$option" in case "$option" in
4) mc ;; 1) mc ;;
5) dfc ;; 2) dfc ;;
6) htop ;; 3) htop ;;
7) speedtest ;; 4) speedtest ;;
8) fast ;; 5) fast ;;
11) break ;; 6) break ;;
*) echo "Invalid option. Please try again." ;; *) echo "Invalid option. Please try again." ;;
esac esac
done done
@@ -70,21 +70,23 @@ apps_menu() {
settings_menu() { settings_menu() {
while true; do while true; do
display_green "Welcome to iamromulan's Simple Console Menu" display_random_color "Welcome to" && display_green "iamromulan's" && display_random_color "Simple Console Menu"
display_green "Select an option:" display_green "Select an option:"
echo "------------------" echo "------------------"
display_green "1. LAN Settings" display_green "1. LAN Settings"
display_green "2. Change simpleadmin (admin) password" display_green "2. simplefirewall settings (TTL and Port Block)"
display_green "3. Change root password (shell/ssh/console)" display_green "3. Change simpleadmin (admin) password"
display_green "4. Go back" display_green "4. Change root password (shell/ssh/console)"
display_green "5. Go back"
echo echo
read -p "Select an option (1-11): " option read -p "Select an option (1-5): " option
case "$option" in case "$option" in
1) $MENU_SH/LAN_settings ;; 1) $MENU_SH/LAN_settings.sh ;;
2) $EXE/simplepasswd ;; 2) $MENU_SH/sfirewall_settings.sh ;;
3) passwd ;; 3) simplepasswd ;;
4) break ;; 4) passwd ;;
5) break ;;
*) echo "Invalid option. Please try again." ;; *) echo "Invalid option. Please try again." ;;
esac esac
done done
@@ -93,15 +95,15 @@ settings_menu() {
main_menu() { main_menu() {
while true; do while true; do
display_green "Welcome to iamromulan's Simple Console Menu" display_green "Welcome to iamromulan's Simple Console Menu"
display_green "To get back to this from the root shell, just type 'menu'" display_green "To get back to this from the root shell, just type 'menu'"
display_green "Select an option:" display_green "Select an option:"
echo "------------------" echo "------------------"
display_random_color "1) Apps" display_random_color "1. Apps"
display_random_color "2) Settings" display_random_color "2. Settings"
display_random_color "3) Toolkit" display_random_color "3. Toolkit"
display_random_color "4) Exit (Enter Root Shell)" display_random_color "4. Exit (Enter Root Shell)"
echo echo
read -p "Select an option (1-11): " option read -p "Select an option (1-4): " option
case "$option" in case "$option" in
1) apps_menu ;; 1) apps_menu ;;
@@ -113,4 +115,4 @@ main_menu() {
done done
} }
main_menu main_menu

View File

@@ -5,7 +5,7 @@ if [ -f "/usrdata/socat-at-bridge/atcmd" ]; then
# Read the serial number # Read the serial number
serial_number=$(/usrdata/socat-at-bridge/atcmd 'AT+EGMR=0,5' | grep '+EGMR:' | cut -d '"' -f2) serial_number=$(/usrdata/socat-at-bridge/atcmd 'AT+EGMR=0,5' | grep '+EGMR:' | cut -d '"' -f2)
# Read the firmware revision # Read the firmware revision
firmware_revision=$(/usrdata/socat-at-bridge/atcmd 'AT+CGMR' | grep -o 'RM[0-9A-Z]*' | head -1) firmware_revision=$(/usrdata/socat-at-bridge/atcmd 'AT+QGMR' | grep -o 'RM[0-9A-Z].*')
else else
serial_number="UNKNOWN" serial_number="UNKNOWN"
firmware_revision="UNKNOWN" firmware_revision="UNKNOWN"

View File

@@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Lighttpd Daemon Description=Lighttpd Daemon
After=network.target After=network.target opt.mount
[Service] [Service]
Type=simple Type=simple

View File

@@ -0,0 +1,12 @@
[Unit]
Description=TTYD Service
After=network.target
[Service]
Type=simple
ExecStartPre=/bin/sleep 5
ExecStart=/usrdata/simpleadmin/console/ttyd -i 127.0.0.1 -p 8080 -t 'theme={"foreground":"white","background":"black"}' -t fontSize=25 --writable /usrdata/simpleadmin/console/ttyd.bash
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@@ -16,11 +16,20 @@ fi
x=$(urldecode "$atcmd") x=$(urldecode "$atcmd")
MYATCMD=$(printf '%b\n' "${atcmd//%/\\x}") MYATCMD=$(printf '%b\n' "${atcmd//%/\\x}")
if [ -n "${MYATCMD}" ]; then if [ -n "${MYATCMD}" ]; then
# Capture the response and remove ANSI color codes using awk # Initialize wait time to 200 ms
runcmd=$(atcmd11 "$x" | awk '{ gsub(/\x1B\[[0-9;]*[mG]/, "") }1') wait_time=200
while true; do
runcmd=$(echo -en "$x\r\n" | microcom -t $wait_time /dev/ttyOUT2)
# Check if "OK" or "ERROR" is present in the response
if [[ $runcmd =~ "OK" ]] || [[ $runcmd =~ "ERROR" ]]; then
break # Exit the loop if "OK" or "ERROR" is found
fi
# If neither "OK" nor "ERROR" is found, increment wait time by 1 second
((wait_time++))
done
fi fi
echo "Content-type: text/plain" echo "Content-type: text/plain"
echo $x echo $x
echo "" echo ""
echo "$runcmd" echo $runcmd

View File

@@ -17,10 +17,10 @@ x=$(urldecode "$atcmd")
MYATCMD=$(printf '%b\n' "${atcmd//%/\\x}") MYATCMD=$(printf '%b\n' "${atcmd//%/\\x}")
if [ -n "${MYATCMD}" ]; then if [ -n "${MYATCMD}" ]; then
# Capture the response and remove ANSI color codes using awk # Capture the response and remove ANSI color codes using awk
runcmd=$(atcmd "$x" | awk '{ gsub(/\x1B\[[0-9;]*[mG]/, "") }1') runcmd=$(atcmd '$x' | awk '{ gsub(/\x1B\[[0-9;]*[mG]/, "") }1')
fi fi
echo "Content-type: text/plain" echo "Content-type: text/plain"
echo $x echo $x
echo "" echo ""
echo "$runcmd" echo "$runcmd"

6143
old/simpleadmin/www/css/all.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,173 @@
/* import poppins */
/* poppins-300 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: normal;
font-weight: 300;
src: url('../fonts/poppins-v23-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-300italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: italic;
font-weight: 300;
src: url('../fonts/poppins-v23-latin-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
src: url('../fonts/poppins-v23-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: url('../fonts/poppins-v23-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-500 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: url('../fonts/poppins-v23-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-500italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: url('../fonts/poppins-v23-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-600 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
src: url('../fonts/poppins-v23-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-600italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: italic;
font-weight: 600;
src: url('../fonts/poppins-v23-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
src: url('../fonts/poppins-v23-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-700italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Poppins';
font-style: italic;
font-weight: 700;
src: url('../fonts/poppins-v23-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* import fontawesome icons */
@import url("./all.min.css");
* {
font-family: "Poppins", sans-serif;
}
.custom-checkbox .form-check-input {
margin-right: 1px;
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
display: flex;
justify-content: center;
align-items: center;
}
.loading-modal {
background-color: #fff;
padding: 3rem;
border-radius: 10px;
text-align: center;
}
.loading-text {
font-size: 18px;
color: #333;
}
.loader {
width: 64px;
height: 64px;
border: 3px dotted #000;
border-style: solid solid dotted dotted;
border-radius: 50%;
display: inline-block;
position: relative;
box-sizing: border-box;
animation: rotation 2s linear infinite;
margin-bottom: 2rem;
}
.loader::after {
content: "";
box-sizing: border-box;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
border: 3px dotted #0b5ed7;
border-style: solid solid dotted;
width: 24px;
height: 24px;
border-radius: 50%;
animation: rotationBack 1s linear infinite;
transform-origin: center center;
}
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes rotationBack {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
.is-warning {
background-color: #ffb70f !important;
color: #000 !important;
}
.is-medium {
font-weight: 600;
}

View File

@@ -302,7 +302,7 @@
class="text-reset" class="text-reset"
>documentation</a >documentation</a
> >
for more information. All rights reserved. 2024 for more information. All rights reserved. 2025
</div> </div>
</div> </div>
</div> </div>

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -275,7 +275,7 @@
<table class="table"> <table class="table">
<tbody> <tbody>
<tr> <tr>
<th scope="row">Assesment</th> <th scope="row">Assessment</th>
<td x-text="signalAssessment"></td> <td x-text="signalAssessment"></td>
</tr> </tr>
<tr> <tr>
@@ -852,14 +852,15 @@
} }
// --- Bandwidth --- // --- Bandwidth ---
// find this example value from lines "+QENG: \"servingcell\"
const bandwidth_line = lines.find((line) =>
line.includes('+QENG: "servingcell"')
);
if ( if (
this.networkMode == "5G SA TDD" || this.networkMode == "5G SA TDD" ||
this.networkMode == "5G SA FDD" this.networkMode == "5G SA FDD"
) { ) {
// find this example value from lines "+QENG: \"servingcell\"
const bandwidth_line = lines.find((line) =>
line.includes('+QENG: "servingcell"')
);
const nr_bw = bandwidth_line.split(",")[11]; const nr_bw = bandwidth_line.split(",")[11];
const calculated_bandwidth = this.calculate_nr_bw(nr_bw); const calculated_bandwidth = this.calculate_nr_bw(nr_bw);
this.bandwidth = "NR " + calculated_bandwidth + " MHz"; this.bandwidth = "NR " + calculated_bandwidth + " MHz";
@@ -867,11 +868,6 @@
this.networkMode == "4G LTE FDD" || this.networkMode == "4G LTE FDD" ||
this.networkMode == "4G LTE TDD" this.networkMode == "4G LTE TDD"
) { ) {
// find this example value from lines "+QENG: \"servingcell\"
const bandwidth_line = lines.find((line) =>
line.includes('+QENG: "servingcell"')
);
const lte_bw_ul = bandwidth_line.split(",")[10]; const lte_bw_ul = bandwidth_line.split(",")[10];
const lte_bw_dl = bandwidth_line.split(",")[11]; const lte_bw_dl = bandwidth_line.split(",")[11];
const calculated_bandwidth_ul = const calculated_bandwidth_ul =
@@ -985,7 +981,7 @@
// find this value from lines "+QCAINFO: \"PCC\" // find this value from lines "+QCAINFO: \"PCC\"
const lte_pcc_arfcn = lines const lte_pcc_arfcn = lines
.find((line) => line.includes('+QCAINFO: "PCC"')) .find((line) => line.includes('+QCAINFO: "PCC"'))
.split(",")[5]; .split(",")[1];
try { try {
// Look for all the lines with this value "+QCAINFO: \"SCC\" and store them in an array // Look for all the lines with this value "+QCAINFO: \"SCC\" and store them in an array
@@ -1054,7 +1050,6 @@
const lte_pcc_pci = lines const lte_pcc_pci = lines
.find((line) => line.includes('+QCAINFO: "PCC"')) .find((line) => line.includes('+QCAINFO: "PCC"'))
.split(",")[5]; .split(",")[5];
try { try {
// Look for all the lines with this value "+QCAINFO: \"SCC\" and store them in an array // Look for all the lines with this value "+QCAINFO: \"SCC\" and store them in an array
const lte_scc_pci = lines.filter((line) => const lte_scc_pci = lines.filter((line) =>
@@ -1079,39 +1074,38 @@
this.sccPCI = "-"; this.sccPCI = "-";
} }
} else if (this.networkMode == "5G NSA") { } else if (this.networkMode == "5G NSA") {
// find this value from lines "+QCAINFO: \"PCC\" const pccparts = lines.find((m) => m.includes("QCAINFO: \"PCC\"")).split(":")[1].split(",");
const lte_pcc_pci = lines const sccarr = lines.filter((m) => m.includes("QCAINFO: \"SCC\""));
.find((line) => line.includes('+QCAINFO: "PCC"')) const sccpci = [];
.split(",")[5]; sccarr.forEach((s) => {
const sccparts = s.split(":")[1].split(",");
try { let sccIndex = 5;
// Look for all the lines with this value "+QCAINFO: \"SCC\" and store them in an array switch (sccparts.length) {
const lte_scc_pci = lines.filter((line) => case 8: // length 8, PCI is at index 4, NR5G PCC and NR5G SCC Band when NR5G-NSA
line.includes('+QCAINFO: "SCC"') sccIndex = 4;
); break;
case 13: // length 13, PCI is at index 5, LTE SCC Band
// if empty, then proceed to error block case 12: // length 12, PCI is at index 5, NR5G SCC Band
if (lte_scc_pci.length == 0) { case 10: // length 10, PCI is at index 5, LTE PCC Band
throw "No SCC PCI"; default:
sccIndex = 5;
break;
} }
sccpci.push(sccparts[sccIndex]);
// process all the values in the array and extract the PCI part only });
for (let i = 0; i < lte_scc_pci.length; i++) { this.sccPCI = sccpci.join(', ');
// if line contains LTE BAND then do this process switch (pccparts.length) {
if (lte_scc_pci[i].includes("LTE BAND")) { case 8: // length 8, PCI is at index 4, NR5G PCC and NR5G SCC Band when NR5G-NSA
lte_scc_pci[i] = lte_scc_pci[i].split(",")[5]; pccIndex = 4;
} else { break;
lte_scc_pci[i] = lte_scc_pci[i].split(",")[4]; case 13: // length 13, PCI is at index 5, LTE SCC Band
} case 12: // length 12, PCI is at index 5, NR5G SCC Band
} case 10: // length 10, PCI is at index 5, LTE PCC Band
default:
// combine the PCC and SCC PCI values pccIndex = 5;
this.pccPCI = lte_pcc_pci; break;
this.sccPCI = lte_scc_pci.join(", ");
} catch (error) {
this.pccPCI = lte_pcc_pci.replace(/,/g, "");
this.sccPCI = "-";
} }
this.pccPCI = pccparts[pccIndex]?.trim();
} else { } else {
this.pccPCI = "0"; this.pccPCI = "0";
this.sccPCI = "-"; this.sccPCI = "-";
@@ -1186,7 +1180,7 @@
.replace(/"/g, ""); .replace(/"/g, "");
// Get the eNBID. Its just Cell ID minus the last 2 characters // Get the eNBID. Its just Cell ID minus the last 2 characters
this.eNBID = longCID.substring(0, longCID.length - 2); this.eNBID = parseInt(longCID.substring(0, longCID.length - 2), 16);
// Get the short Cell ID (Last 2 characters of the Cell ID) // Get the short Cell ID (Last 2 characters of the Cell ID)
const shortCID = longCID.substring(longCID.length - 2); const shortCID = longCID.substring(longCID.length - 2);
@@ -1196,11 +1190,11 @@
currentNetworkMode == "5G SA FDD" currentNetworkMode == "5G SA FDD"
) { ) {
// TAC // TAC
this.tac = lines const localTac = lines
.find((line) => line.includes('+QENG: "servingcell"')) .find((line) => line.includes('+QENG: "servingcell"'))
.split(",")[8] .split(",")[8]
.replace(/"/g, ""); .replace(/"/g, "");
this.tac = parseInt(localTac, 16) + " (" + localTac + ")";
// CSQ // CSQ
this.csq = "NR-SA Mode"; this.csq = "NR-SA Mode";
@@ -1250,11 +1244,11 @@
} else { } else {
// LTE Only // LTE Only
// TAC // TAC
this.tac = lines const localTac = lines
.find((line) => line.includes('+QENG: "servingcell"')) .find((line) => line.includes('+QENG: "servingcell"'))
.split(",")[12] .split(",")[12]
.replace(/"/g, ""); .replace(/"/g, "");
this.tac = parseInt(localTac, 16) + " (" + localTac + ")";
// CSQ // CSQ
this.csq = lines this.csq = lines
.find((line) => line.includes("+CSQ:")) .find((line) => line.includes("+CSQ:"))
@@ -1334,7 +1328,7 @@
.replace(/"/g, ""); .replace(/"/g, "");
// Get the eNBID. Its just Cell ID minus the last 2 characters // Get the eNBID. Its just Cell ID minus the last 2 characters
this.eNBID = longCID.substring(0, longCID.length - 2); this.eNBID = parseInt(longCID.substring(0, longCID.length - 2), 16);
// Get the short Cell ID (Last 2 characters of the Cell ID) // Get the short Cell ID (Last 2 characters of the Cell ID)
const shortCID = longCID.substring(longCID.length - 2); const shortCID = longCID.substring(longCID.length - 2);
@@ -1354,11 +1348,24 @@
")"; ")";
// TAC // TAC
this.tac = lines const localTac = lines
.find((line) => line.includes('+QENG: "LTE"')) .find((line) => line.includes('+QENG: "LTE"'))
.split(",")[10] .split(",")[10]
.replace(/"/g, ""); .replace(/"/g, "");
this.tac = parseInt(localTac, 16) + " ("+localTac+")";
this.cellID =
"Short " +
shortCID +
"(" +
parseInt(shortCID, 16) +
")" +
", " +
"Long " +
longCID +
"(" +
parseInt(longCID, 16) +
")";
// CSQ // CSQ
this.csq = lines this.csq = lines
.find((line) => line.includes("+CSQ:")) .find((line) => line.includes("+CSQ:"))
@@ -1489,32 +1496,40 @@
}, },
calculate_lte_bw(lte_bw) { calculate_lte_bw(lte_bw) {
switch (true) { const BANDWIDTH_MAP = {
case 0: 0: 1.4,
return 1.4; 1: 3,
case 1: 2: 5,
return 3; 3: 10,
// Now case 2 - 5 4: 15,
case lte_bw >= 2 && lte_bw <= 5: 5: 20,
return (lte_bw - 1) * 5; 6: 40,
default: 7: 80,
return "Unknown"; 8: 100,
} 9: 200,
};
return BANDWIDTH_MAP[lte_bw];
}, },
calculate_nr_bw(nr_bw) { calculate_nr_bw(nr_bw) {
switch (true) { const NR_BANDWIDTH_MAP = {
case nr_bw >= 0 && nr_bw <= 5: 0: 5,
return (nr_bw + 1) * 5; 1: 10,
case nr_bw >= 6 && nr_bw <= 12: 2: 15,
return (nr_bw - 2) * 10; 3: 20,
case nr_bw === 13: 4: 25,
return "200"; 5: 30,
case nr_bw === 14: 6: 40,
return "400"; 7: 50,
default: 8: 60,
return "Unknown"; 9: 70,
} 10: 80,
11: 90,
12: 100,
13: 200,
14: 400,
};
return NR_BANDWIDTH_MAP[nr_bw];
}, },
calculateRSRPPercentage(rsrp) { calculateRSRPPercentage(rsrp) {

View File

@@ -104,7 +104,7 @@
placeholder="ATI" placeholder="ATI"
aria-describedby="atCommandInput" aria-describedby="atCommandInput"
x-model="atcmd" x-model="atcmd"
@keydown.enter="sendUserATCommand()" @keydown.enter="sendATCommand()"
/> />
<div id="atCommandInputHelper" class="form-text"> <div id="atCommandInputHelper" class="form-text">
Seperate multiple commands with comma (,). Seperate multiple commands with comma (,).
@@ -116,7 +116,7 @@
<button <button
class="btn btn-primary me-md-2" class="btn btn-primary me-md-2"
type="button" type="button"
@click="sendUserATCommand()" @click="sendATCommand()"
:disabled="isLoading" :disabled="isLoading"
> >
Submit Submit

View File

@@ -220,7 +220,10 @@
while ((match = cmglRegex.exec(data)) !== null) { while ((match = cmglRegex.exec(data)) !== null) {
const index = parseInt(match[1]); const index = parseInt(match[1]);
const senderHex = match[2]; const senderHex = match[2];
const sender = senderHex.startsWith("003") ? this.convertHexToText(senderHex) : senderHex; // Maximum world wide phone number length is 17 (North Korea), UTF-16BE Hex string comes back at 48+ for US Number, min length is 3.
// When 3 digit SMS short code is used the result is a 12 length string (which we then need to check if the sender hex starts with 003 or 002B(+))
// This check is probably completley unecessary but I have no data on how the modems behave with different firmware(whether support for CSCS="UCS2" is available).
const sender = senderHex.length > 11 && (senderHex.startsWith('002B') || senderHex.startsWith('003')) ? this.convertHexToText(senderHex) : senderHex;
const dateStr = match[3].replace(/\+\d{2}$/, ""); const dateStr = match[3].replace(/\+\d{2}$/, "");
const date = this.parseCustomDate(dateStr); const date = this.parseCustomDate(dateStr);
if (isNaN(date)) { if (isNaN(date)) {

View File

@@ -1,13 +1,23 @@
#!/bin/bash #!/bin/bash
# Define constants # Define constants
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="development-SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
DIR_NAME="simpleadmin" DIR_NAME="simpleadmin"
SERVICE_FILE="/lib/systemd/system/install_simpleadmin.service" SERVICE_FILE="/lib/systemd/system/install_simpleadmin.service"
SERVICE_NAME="install_simpleadmin" SERVICE_NAME="install_simpleadmin"
TMP_SCRIPT="/tmp/install_simpleadmin.sh" TMP_SCRIPT="/tmp/install_simpleadmin.sh"
LOG_FILE="/tmp/install_simpleadmin.log" LOG_FILE="/tmp/install_simpleadmin.log"
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/usrdata/root/bin
# Tmp Script dependent constants # Tmp Script dependent constants
SIMPLE_ADMIN_DIR="/usrdata/simpleadmin" SIMPLE_ADMIN_DIR="/usrdata/simpleadmin"
@@ -44,9 +54,20 @@ EOF
cat <<EOF > "$TMP_SCRIPT" cat <<EOF > "$TMP_SCRIPT"
#!/bin/bash #!/bin/bash
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="development-SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
SIMPLE_ADMIN_DIR="/usrdata/simpleadmin" SIMPLE_ADMIN_DIR="/usrdata/simpleadmin"
export HOME=/usrdata/root
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/usrdata/root/bin
# Function to remount file system as read-write # Function to remount file system as read-write
remount_rw() { remount_rw() {
@@ -107,8 +128,8 @@ install_lighttpd() {
systemctl stop lighttpd systemctl stop lighttpd
echo -e "\033[0;32mInstalling/Updating Lighttpd...\033[0m" echo -e "\033[0;32mInstalling/Updating Lighttpd...\033[0m"
mkdir -p "$SIMPLE_ADMIN_DIR" mkdir -p "$SIMPLE_ADMIN_DIR"
wget -O "$SIMPLE_ADMIN_DIR/lighttpd.conf" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/lighttpd.conf wget -O "$SIMPLE_ADMIN_DIR/lighttpd.conf" $GITROOT/simpleadmin/lighttpd.conf
wget -O "/lib/systemd/system/lighttpd.service" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/systemd/lighttpd.service wget -O "/lib/systemd/system/lighttpd.service" $GITROOT/simpleadmin/systemd/lighttpd.service
ln -sf "/lib/systemd/system/lighttpd.service" "/lib/systemd/system/multi-user.target.wants/" ln -sf "/lib/systemd/system/lighttpd.service" "/lib/systemd/system/multi-user.target.wants/"
echo "www-data ALL = (root) NOPASSWD: /usr/sbin/iptables, /usr/sbin/ip6tables, /usrdata/simplefirewall/ttl-override, /bin/echo, /bin/cat" > /opt/etc/sudoers.d/www-data echo "www-data ALL = (root) NOPASSWD: /usr/sbin/iptables, /usr/sbin/ip6tables, /usrdata/simplefirewall/ttl-override, /bin/echo, /bin/cat" > /opt/etc/sudoers.d/www-data
@@ -135,51 +156,79 @@ echo -e "\e[1;31m2) Installing simpleadmin from the $GITTREE branch\e[0m"
mkdir $SIMPLE_ADMIN_DIR/www/cgi-bin mkdir $SIMPLE_ADMIN_DIR/www/cgi-bin
mkdir $SIMPLE_ADMIN_DIR/www/css mkdir $SIMPLE_ADMIN_DIR/www/css
mkdir $SIMPLE_ADMIN_DIR/www/js mkdir $SIMPLE_ADMIN_DIR/www/js
mkdir $SIMPLE_ADMIN_DIR/www/fonts
cd $SIMPLE_ADMIN_DIR/systemd cd $SIMPLE_ADMIN_DIR/systemd
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/systemd/lighttpd.service wget $GITROOT/simpleadmin/systemd/lighttpd.service
sleep 1 sleep 1
cd $SIMPLE_ADMIN_DIR/script cd $SIMPLE_ADMIN_DIR/script
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/script/ttl_script.sh wget $GITROOT/simpleadmin/script/ttl_script.sh
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/script/remove_watchcat.sh wget $GITROOT/simpleadmin/script/remove_watchcat.sh
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/script/create_watchcat.sh wget $GITROOT/simpleadmin/script/create_watchcat.sh
sleep 1
cd $SIMPLE_ADMIN_DIR/console
wget $GITROOT/simpleadmin/console/.profile
sleep 1
cd $SIMPLE_ADMIN_DIR/console/menu
wget $GITROOT/simpleadmin/console/menu/start_menu.sh
ln -f $SIMPLE_ADMIN_DIR/console/menu/start_menu.sh /usrdata/root/bin/menu
wget $GITROOT/simpleadmin/console/menu/sfirewall_settings.sh
wget $GITROOT/simpleadmin/console/menu/start_menu.sh
sleep 1 sleep 1
cd $SIMPLE_ADMIN_DIR/www cd $SIMPLE_ADMIN_DIR/www
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/deviceinfo.html wget $GITROOT/simpleadmin/www/deviceinfo.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/favicon.ico wget $GITROOT/simpleadmin/www/favicon.ico
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/index.html wget $GITROOT/simpleadmin/www/index.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/network.html wget $GITROOT/simpleadmin/www/network.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/settings.html wget $GITROOT/simpleadmin/www/settings.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/sms.html wget $GITROOT/simpleadmin/www/sms.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/scanner.html wget $GITROOT/simpleadmin/www/scanner.html
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/watchcat.html wget $GITROOT/simpleadmin/www/watchcat.html
sleep 1 sleep 1
cd $SIMPLE_ADMIN_DIR/www/js cd $SIMPLE_ADMIN_DIR/www/js
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/js/alpinejs.min.js wget $GITROOT/simpleadmin/www/js/alpinejs.min.js
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/js/bootstrap.bundle.min.js wget $GITROOT/simpleadmin/www/js/bootstrap.bundle.min.js
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/js/dark-mode.js wget $GITROOT/simpleadmin/www/js/dark-mode.js
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/js/generate-freq-box.js wget $GITROOT/simpleadmin/www/js/generate-freq-box.js
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/js/parse-settings.js wget $GITROOT/simpleadmin/www/js/parse-settings.js
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/js/populate-checkbox.js wget $GITROOT/simpleadmin/www/js/populate-checkbox.js
sleep 1 sleep 1
cd $SIMPLE_ADMIN_DIR/www/css cd $SIMPLE_ADMIN_DIR/www/css
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/css/bootstrap.min.css wget $GITROOT/simpleadmin/www/css/bootstrap.min.css
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/css/styles.css wget $GITROOT/simpleadmin/www/css/styles.css
wget $GITROOT/simpleadmin/www/css/all.min.css
sleep 1
cd $SIMPLE_ADMIN_DIR/www/fonts
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-300italic.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-300.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-500italic.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-500.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-600italic.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-600.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-700italic.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-700.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-italic.woff2
wget $GITROOT/simpleadmin/www/fonts/poppins-v23-latin-regular.woff2
sleep 1 sleep 1
cd $SIMPLE_ADMIN_DIR/www/cgi-bin cd $SIMPLE_ADMIN_DIR/www/cgi-bin
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_atcommand wget $GITROOT/simpleadmin/www/cgi-bin/get_atcommand
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_ping wget $GITROOT/simpleadmin/www/cgi-bin/user_atcommand
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_sms wget $GITROOT/simpleadmin/www/cgi-bin/get_ping
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_ttl_status wget $GITROOT/simpleadmin/www/cgi-bin/get_sms
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/set_ttl wget $GITROOT/simpleadmin/www/cgi-bin/get_ttl_status
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/send_sms wget $GITROOT/simpleadmin/www/cgi-bin/set_ttl
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_uptime wget $GITROOT/simpleadmin/www/cgi-bin/send_sms
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/get_watchcat_status wget $GITROOT/simpleadmin/www/cgi-bin/get_uptime
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/set_watchcat wget $GITROOT/simpleadmin/www/cgi-bin/get_watchcat_status
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/www/cgi-bin/watchcat_maker wget $GITROOT/simpleadmin/www/cgi-bin/set_watchcat
wget $GITROOT/simpleadmin/www/cgi-bin/watchcat_maker
sleep 1 sleep 1
cd / cd /
chmod +x $SIMPLE_ADMIN_DIR/www/cgi-bin/* chmod +x $SIMPLE_ADMIN_DIR/www/cgi-bin/*
chmod +x $SIMPLE_ADMIN_DIR/script/* chmod +x $SIMPLE_ADMIN_DIR/script/*
chmod +x $SIMPLE_ADMIN_DIR/console/menu/*
chmod +x $SIMPLE_ADMIN_DIR/console/.profile
cp -f $SIMPLE_ADMIN_DIR/console/.profile /usrdata/root/.profile
chmod +x /usrdata/root/.profile
cp -rf $SIMPLE_ADMIN_DIR/systemd/* /lib/systemd/system cp -rf $SIMPLE_ADMIN_DIR/systemd/* /lib/systemd/system
sleep 1 sleep 1
systemctl daemon-reload systemctl daemon-reload
@@ -187,10 +236,11 @@ echo -e "\e[1;31m2) Installing simpleadmin from the $GITTREE branch\e[0m"
} }
install_ttyd() { install_ttyd() {
echo -e "\e[1;34mStarting ttyd installation process...\e[0m" echo -e "\e[1;34mStarting ttyd installation process...\e[0m"
cd $SIMPLE_ADMIN_DIR cd $SIMPLE_ADMIN_DIR/console
wget -O ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.armhf && chmod +x ttyd curl -L -o ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.armhf && chmod +x ttyd
wget -O $SIMPLE_ADMIN_DIR/console/ttyd.bash "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/console/ttyd.bash" && chmod +x console/ttyd.bash wget "$GITROOT/simpleadmin/console/ttyd.bash" && chmod +x ttyd.bash
wget -O $SIMPLE_ADMIN_DIR/systemd/ttyd.service "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/systemd/ttyd.service" cd $SIMPLE_ADMIN_DIR/systemd/
wget "$GITROOT/simpleadmin/systemd/ttyd.service"
cp -f $SIMPLE_ADMIN_DIR/systemd/ttyd.service /lib/systemd/system/ cp -f $SIMPLE_ADMIN_DIR/systemd/ttyd.service /lib/systemd/system/
ln -sf /usrdata/simpleadmin/ttyd /bin ln -sf /usrdata/simpleadmin/ttyd /bin

View File

@@ -1,8 +1,17 @@
#!/bin/bash #!/bin/bash
# Define constants # Define constants
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="development-SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
DIR_NAME="simplefirewall" DIR_NAME="simplefirewall"
SERVICE_FILE="/lib/systemd/system/install_simplefirewall.service" SERVICE_FILE="/lib/systemd/system/install_simplefirewall.service"
SERVICE_NAME="install_simplefirewall" SERVICE_NAME="install_simplefirewall"
@@ -41,8 +50,17 @@ EOF
cat <<EOF > "$TMP_SCRIPT" cat <<EOF > "$TMP_SCRIPT"
#!/bin/bash #!/bin/bash
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
SIMPLE_FIREWALL_DIR="/usrdata/simplefirewall" SIMPLE_FIREWALL_DIR="/usrdata/simplefirewall"
SIMPLE_FIREWALL_SCRIPT="$SIMPLE_FIREWALL_DIR/simplefirewall.sh" SIMPLE_FIREWALL_SCRIPT="$SIMPLE_FIREWALL_DIR/simplefirewall.sh"
SIMPLE_FIREWALL_SYSTEMD_DIR="$SIMPLE_FIREWALL_DIR/systemd" SIMPLE_FIREWALL_SYSTEMD_DIR="$SIMPLE_FIREWALL_DIR/systemd"
@@ -76,14 +94,14 @@ install_simple_firewall() {
mount -o remount,rw / mount -o remount,rw /
mkdir -p "$SIMPLE_FIREWALL_DIR" mkdir -p "$SIMPLE_FIREWALL_DIR"
mkdir -p "$SIMPLE_FIREWALL_SYSTEMD_DIR" mkdir -p "$SIMPLE_FIREWALL_SYSTEMD_DIR"
wget -O "$SIMPLE_FIREWALL_DIR/simplefirewall.sh" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simplefirewall/simplefirewall.sh wget -O "$SIMPLE_FIREWALL_DIR/simplefirewall.sh" $GITROOT/simplefirewall/simplefirewall.sh
wget -O "$SIMPLE_FIREWALL_DIR/ttl-override" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simplefirewall/ttl-override wget -O "$SIMPLE_FIREWALL_DIR/ttl-override" $GITROOT/simplefirewall/ttl-override
wget -O "$SIMPLE_FIREWALL_DIR/ttlvalue" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simplefirewall/ttlvalue wget -O "$SIMPLE_FIREWALL_DIR/ttlvalue" $GITROOT/simplefirewall/ttlvalue
chmod 666 $SIMPLE_FIREWALL_DIR/ttlvalue chmod 666 $SIMPLE_FIREWALL_DIR/ttlvalue
chmod +x "$SIMPLE_FIREWALL_DIR/simplefirewall.sh" chmod +x "$SIMPLE_FIREWALL_DIR/simplefirewall.sh"
chmod +x "$SIMPLE_FIREWALL_DIR/ttl-override" chmod +x "$SIMPLE_FIREWALL_DIR/ttl-override"
wget -O "$SIMPLE_FIREWALL_SYSTEMD_DIR/simplefirewall.service" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simplefirewall/systemd/simplefirewall.service wget -O "$SIMPLE_FIREWALL_SYSTEMD_DIR/simplefirewall.service" $GITROOT/simplefirewall/systemd/simplefirewall.service
wget -O "$SIMPLE_FIREWALL_SYSTEMD_DIR/ttl-override.service" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simplefirewall/systemd/ttl-override.service wget -O "$SIMPLE_FIREWALL_SYSTEMD_DIR/ttl-override.service" $GITROOT/simplefirewall/systemd/ttl-override.service
cp -rf $SIMPLE_FIREWALL_SYSTEMD_DIR/* /lib/systemd/system cp -rf $SIMPLE_FIREWALL_SYSTEMD_DIR/* /lib/systemd/system
ln -sf "/lib/systemd/system/simplefirewall.service" "/lib/systemd/system/multi-user.target.wants/" ln -sf "/lib/systemd/system/simplefirewall.service" "/lib/systemd/system/multi-user.target.wants/"
ln -sf "/lib/systemd/system/ttl-override.service" "/lib/systemd/system/multi-user.target.wants/" ln -sf "/lib/systemd/system/ttl-override.service" "/lib/systemd/system/multi-user.target.wants/"

View File

@@ -1,8 +1,16 @@
#!/bin/bash #!/bin/bash
# Define constants # Define constants
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="development-SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
DIR_NAME="socat-at-bridge" DIR_NAME="socat-at-bridge"
SERVICE_FILE="/lib/systemd/system/install_socat-at-bridge.service" SERVICE_FILE="/lib/systemd/system/install_socat-at-bridge.service"
SERVICE_NAME="install_socat-at-bridge" SERVICE_NAME="install_socat-at-bridge"
@@ -39,8 +47,17 @@ EOF
cat <<EOF > "$TMP_SCRIPT" cat <<EOF > "$TMP_SCRIPT"
#!/bin/bash #!/bin/bash
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
SOCAT_AT_DIR="/usrdata/socat-at-bridge" SOCAT_AT_DIR="/usrdata/socat-at-bridge"
SOCAT_AT_SYSD_DIR="/usrdata/socat-at-bridge/systemd_units" SOCAT_AT_SYSD_DIR="/usrdata/socat-at-bridge/systemd_units"
@@ -85,26 +102,29 @@ install_at_socat() {
mkdir $SOCAT_AT_DIR mkdir $SOCAT_AT_DIR
cd $SOCAT_AT_DIR cd $SOCAT_AT_DIR
mkdir $SOCAT_AT_SYSD_DIR mkdir $SOCAT_AT_SYSD_DIR
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/socat-armel-static wget $GITROOT/socat-at-bridge/socat-armel-static
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/killsmd7bridge wget $GITROOT/socat-at-bridge/killsmd7bridge
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/atcmd wget $GITROOT/socat-at-bridge/atcmd
wget $GITROOT/socat-at-bridge/atcmd11
cd $SOCAT_AT_SYSD_DIR cd $SOCAT_AT_SYSD_DIR
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/systemd_units/socat-smd11.service wget $GITROOT/socat-at-bridge/systemd_units/socat-smd11.service
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/systemd_units/socat-smd11-from-ttyIN.service wget $GITROOT/socat-at-bridge/systemd_units/socat-smd11-from-ttyIN.service
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/systemd_units/socat-smd11-to-ttyIN.service wget $GITROOT/socat-at-bridge/systemd_units/socat-smd11-to-ttyIN.service
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/systemd_units/socat-killsmd7bridge.service wget $GITROOT/socat-at-bridge/systemd_units/socat-killsmd7bridge.service
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/systemd_units/socat-smd7-from-ttyIN2.service wget $GITROOT/socat-at-bridge/systemd_units/socat-smd7-from-ttyIN2.service
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/systemd_units/socat-smd7-to-ttyIN2.service wget $GITROOT/socat-at-bridge/systemd_units/socat-smd7-to-ttyIN2.service
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/socat-at-bridge/systemd_units/socat-smd7.service wget $GITROOT/socat-at-bridge/systemd_units/socat-smd7.service
# Set execute permissions # Set execute permissions
cd $SOCAT_AT_DIR cd $SOCAT_AT_DIR
chmod +x socat-armel-static chmod +x socat-armel-static
chmod +x killsmd7bridge chmod +x killsmd7bridge
chmod +x atcmd chmod +x atcmd
chmod +x atcmd11
# Link new command for AT Commands from the shell # Link new command for AT Commands from the shell
ln -sf $SOCAT_AT_DIR/atcmd /bin ln -sf $SOCAT_AT_DIR/atcmd /bin
ln -sf $SOCAT_AT_DIR/atcmd11 /bin
# Install service units # Install service units
echo -e "\033[0;32mAdding AT Socat Bridge systemd service units...\033[0m" echo -e "\033[0;32mAdding AT Socat Bridge systemd service units...\033[0m"

View File

@@ -1,8 +1,17 @@
#!/bin/bash #!/bin/bash
# Define constants # Define constants
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="development-SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
DIR_NAME="simpleupdates" DIR_NAME="simpleupdates"
SERVICE_FILE="/lib/systemd/system/install_sshd.service" SERVICE_FILE="/lib/systemd/system/install_sshd.service"
SERVICE_NAME="install_sshd" SERVICE_NAME="install_sshd"
@@ -29,15 +38,23 @@ EOF
cat <<EOF > "$TMP_SCRIPT" cat <<EOF > "$TMP_SCRIPT"
#!/bin/bash #!/bin/bash
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
install_sshd() { install_sshd() {
echo -e "\e[1;32mOpenSSH Server\e[0m" echo -e "\e[1;32mOpenSSH Server\e[0m"
remount_rw remount_rw
mkdir /usrdata/sshd mkdir /usrdata/sshd
wget -O /lib/systemd/system/sshd.service "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/sshd/sshd.service" wget -O /lib/systemd/system/sshd.service "$GITROOT/sshd/sshd.service"
ln -sf "/lib/systemd/system/sshd.service" "/lib/systemd/system/multi-user.target.wants/" ln -sf "/lib/systemd/system/sshd.service" "/lib/systemd/system/multi-user.target.wants/"
opkg install openssh-server-pam opkg install openssh-server-pam

View File

@@ -1,13 +1,22 @@
#!/bin/bash #!/bin/bash
# Define constants # Define constants
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="development-SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
DIR_NAME="tailscale" DIR_NAME="tailscale"
SERVICE_FILE="/lib/systemd/system/install_tailscale.service" SERVICE_FILE="/lib/systemd/system/install_tailscale.service"
SERVICE_NAME="install_tailscale" SERVICE_NAME="install_tailscale"
TMP_SCRIPT="/tmp/install_tailscale.sh" TMP_SCRIPT="/tmp/install_tailscale.sh"
LOG_FILE="/tmp/install_sshd.log" LOG_FILE="/tmp/install_tailscale.log"
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/usrdata/root/bin
# Tmp Script dependent constants # Tmp Script dependent constants
TAILSCALE_DIR="/usrdata/tailscale/" TAILSCALE_DIR="/usrdata/tailscale/"
@@ -46,8 +55,17 @@ cat <<EOF > "$TMP_SCRIPT"
#!/bin/bash #!/bin/bash
export HOME=/usrdata/root export HOME=/usrdata/root
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/usrdata/root/bin
# Define GitHub repo info
GITUSER="iamromulan" GITUSER="iamromulan"
GITTREE="development" REPONAME="quectel-rgmii-toolkit"
GITTREE="SDXLEMUR"
GITMAINTREE="SDXLEMUR"
GITDEVTREE="development-SDXLEMUR"
GITROOT="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITTREE"
GITROOTMAIN="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITMAINTREE"
GITROOTDEV="https://raw.githubusercontent.com/$GITUSER/$REPONAME/$GITDEVTREE"
# Define filesystem path
TAILSCALE_DIR="/usrdata/tailscale/" TAILSCALE_DIR="/usrdata/tailscale/"
TAILSCALE_SYSD_DIR="/usrdata/tailscale/systemd" TAILSCALE_SYSD_DIR="/usrdata/tailscale/systemd"
@@ -75,15 +93,16 @@ install_update_tailscale() {
mkdir -p "$TAILSCALE_DIR" "$TAILSCALE_SYSD_DIR" mkdir -p "$TAILSCALE_DIR" "$TAILSCALE_SYSD_DIR"
echo "Downloading binary files..." echo "Downloading binary files..."
cd /usrdata cd /usrdata
wget https://pkgs.tailscale.com/stable/tailscale_1.64.0_arm.tgz curl -O https://pkgs.tailscale.com/stable/tailscale_1.76.1_arm.tgz
tar -xzf tailscale_1.64.0_arm.tgz tar -xzf tailscale_1.76.1_arm.tgz
cd tailscale_1.64.0_arm rm tailscale_1.76.1_arm.tgz
cd /usrdata/tailscale_1.76.1_arm
mv tailscale tailscaled "$TAILSCALE_DIR/" mv tailscale tailscaled "$TAILSCALE_DIR/"
rm -rf /usrdata/tailscale_1.64.0_arm rm -rf /usrdata/tailscale_1.76.1_arm
echo "Downloading systemd files..." echo "Downloading systemd files..."
cd "$TAILSCALE_SYSD_DIR" cd "$TAILSCALE_SYSD_DIR"
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/main/tailscale/systemd/tailscaled.service wget $GITROOT/tailscale/systemd/tailscaled.service
wget https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/main/tailscale/systemd/tailscaled.defaults wget $GITROOT/tailscale/systemd/tailscaled.defaults
sleep 2s sleep 2s
echo "Setting Permissions..." echo "Setting Permissions..."
chmod +x "$TAILSCALE_DIR/tailscaled" "$TAILSCALE_DIR/tailscale" chmod +x "$TAILSCALE_DIR/tailscaled" "$TAILSCALE_DIR/tailscale"
@@ -94,6 +113,7 @@ install_update_tailscale() {
echo "Starting Tailscaled..." echo "Starting Tailscaled..."
systemctl start tailscaled systemctl start tailscaled
cd / cd /
ln -sf /usrdata/tailscale/tailscale /usrdata/root/bin
remount_ro remount_ro
echo -e "\e[32mTailscale installed successfully.\e[0m" echo -e "\e[32mTailscale installed successfully.\e[0m"
exit 0 exit 0

View File

@@ -0,0 +1,69 @@
#!/bin/bash
DEVICE=/dev/ttyOUT
BAUD=115200
# Function to setup device communication parameters
setup_device() {
stty -F $DEVICE cs8 $BAUD ignbrk -brkint -icrnl -imaxbel \
-opost -onlcr -isig -icanon -iexten -echo -echoe -echok \
-echoctl -echoke noflsh -ixon -crtscts
}
# Function to send AT command and capture the output
send_at_command() {
local command="$1"
# Clear the device buffer before sending a new command
echo -n > $DEVICE
# Send the AT command, preserving the integrity of the input
echo -e "$command\r" > $DEVICE
# Use a temporary file to capture the command output
tmpfile=$(mktemp)
# Start reading the device output to the temporary file
cat $DEVICE > "$tmpfile" &
CAT_PID=$!
# Monitor the output file for "OK" or "ERROR"
while ! grep -qe "OK" -e "ERROR" "$tmpfile"; do
sleep 1
done
# Kill the `cat` process after capturing the response
kill $CAT_PID
wait $CAT_PID 2>/dev/null
# Display the response
cat "$tmpfile" | while IFS= read -r line; do
echo -e "\033[0;32m$line\033[0m"
done
# Clean up
rm "$tmpfile"
}
# Prepare the device for communication
setup_device
# Check if an AT command is provided as an argument
if [ $# -gt 0 ]; then
# Concatenate all arguments to handle commands with spaces and/or quotes correctly
FULL_CMD="$*"
send_at_command "$FULL_CMD"
else
echo -e "\033[0;36mType 'exit' to end the session.\033[0m"
while true; do
echo -en "\033[0;36mEnter AT Command: \033[0m"
read user_input
if [[ "$user_input" == "exit" ]]; then
echo -e "\033[0;32mExiting...\033[0m"
break
fi
send_at_command "$user_input"
done
fi

Some files were not shown because too many files have changed in this diff Show More