Skip to content

Commit

Permalink
Remove shitty telnet py, use tftp instead
Browse files Browse the repository at this point in the history
  • Loading branch information
zry98 committed Dec 30, 2020
1 parent 30cf5df commit d7c1ce5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
cmake-build-debug
CMakeLists.txt
.build
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
Some stuff about GPON Stick DFP-34X-2C2 / DFP-34G-2C2

## Set hexadecimal GPON password
(There is a pre-built binary available in releases)

- Set up a cross-compilation environment with [crosstool-ng](https://crosstool-ng.github.io/docs/)
- Use the `ct-ng.config` in the repo, or config it as `arm-unknown-linux-uclibcgnueabi` in the samples, with CPU set to `arm9tdmi`
- Compile libtagparamuserapi.so with command like `arm-unknown-linux-uclibcgnueabi-gcc -shared -o libtagparamuserapi.so libtagparamuserapi.c`
- Compile the dummy libtagparamuserapi.so with command like `arm-unknown-linux-uclibcgnueabi-gcc -shared -o libtagparamuserapi.so libtagparamuserapi.c`
- Compile the program with command like `arm-unknown-linux-uclibcgnueabi-gcc -std=c99 libtagparamuserapi.so -s -o setmac_hex setmac_hex.c`
- Send compiled executable to the stick through telnet using the python script `telnet_send.py`
- Telnet to the stick and run command like `/var/tmp/setmac_hex 1 2178 "f2 01 80 01 02 03 04 00 00 00"` (replace the hex string in quotes) to set GPON password
- Set up a TFTP server in the same subnet, and get the executable on stick with commands like `cd /var/tmp && tftp -g setmac_hex -p 192.168.1.2 69`
- Telnet to stick and run command like `/var/tmp/setmac_hex 1 2178 "f2 01 80 01 02 03 04 00 00 00"` to set GPON password
- Run `setmac 2 2178` or `/var/tmp/setmac_hex 2 2178` to verify the result
28 changes: 0 additions & 28 deletions telnet_send.py

This file was deleted.

0 comments on commit d7c1ce5

Please sign in to comment.