Kādu laiku lietoju TET ar ODI DFP-34X-2C2 transīveri un RB5009. Uzcepu arī manuāli, gan jau kādam noderēs.
Code:
## Follow this guide to connect to sfp module from ROS or follow instructions below
https://www.hitoha.moe/odi-dfp-34x-2c2-gpon-onu-sfp/
Remove SFP as bridge member
Go to Bridge -> Ports Tab -> #7
Change Interface to ether1
Go to Interface -> Interface List -> +
List: WAN
Interface: sfp-sfpplus1
Go to IP -> Address -> +
Address: 192.168.1.100/24
Network:
Interface: sfp-sfpplus1
## To succesfully auth to tet network, you need to get values from nokia modem
- Software Version (OMCI_SW_VER1, OMCI_SW_VER2)
- Hardware Version (HW_HWVER)
- Serial Number (GPON_SN)
## Open terminal, telnet into SFP module and execute these commands below
system/telnet 192.168.1.1
flash set OMCI_OLT_MODE 3
# Note! option 3 will not work on stock firmware, flash modded firmware (M110_sfp_ODI_220923FS.tar) from github - https://github.com/rajkosto/RTL960x/tree/main/Firmware/DFP-34X-2C2
## flash set OMCI_OLT_MODE 21 ##
# Should work on stock firmware, but is considered a hack - /bin/checkomci crashes with segmentation fault! Use "flash set OMCI_OLT_MODE 3" instead if possible
flash set OMCI_FAKE_OK 1
# Enable this for safety purposes - https://hack-gpon.org/ont-odi-realtek-dfp-34x-2c2/#gettingsetting-omci-olt-mode-and-fake-omci
flash set OMCI_SW_VER1 ...
flash set OMCI_SW_VER2 ...
flash set HW_HWVER ...
flash set GPON_SN ...
flash set LAN_SDS_MODE 6
# Do not skip this step. This mode forces SFP module to always try connecting to router at 2.5G (works with RB5009). For some reason module does not auto negotiate speed at all with RB5009 router, there are reports online that with media converter auto negotiation happens better. Go to troubleshooting down below, if after reboot you can't get module to come up in ROS - https://hack-gpon.org/ont-odi-realtek-dfp-34x-2c2/#gettingsetting-speed-lan-mode
# Note! Before setting "flash set LAN_SDS_MODE 6", make sure your device (router or media converter) supports 2.5G mode. If none of your devices supports such speed, then set "flash set LAN_SDS_MODE 1" which uses "1G baseX" speed.
reboot
# Note! After reboot module either will not become status "running" or it will, but after very long time (if at all). Just go in ROS, disable auto negotiation and set speed to "1G baseX" or "2.5G baseX" to get SFP module running at 1G or 2.5G (set accordingly depending on LAN_SDS_MODE)! This does not mean internet speed will be 2.5G :)
## If for any other reason ROS just shows SFP as not running after reboot, try troubleshooting steps down below
## Telnet again in the module
## If auth will be succesful, then you should be able to get a list of VLANs after reboot by executing command below
omcicli mib get 84 #read VLANs
## Now go to ROS and configure settings something like this (for me VLAN 3912 is tet internet)
/interface ethernet
set [ find default-name=sfp-sfpplus1 ] auto-negotiation=no speed=2.5G-baseX
/interface vlan
add interface=sfp-sfpplus1 name=vlan1 vlan-id=3912
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=sfp-sfpplus1
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=vlan1 list=WAN
/ip dhcp-client
add comment=tet-net interface=vlan1
## If everything went as planned, then you should be able to get an IP address on VLAN using dhcp-client and access the internet. Congrats :)
## Troubleshooting
- If you rebooted GPON stick, configured LAN_SDS_MODE setting and disabled auto negotiation in ROS and the stick still does not show in ROS with running status, then unplug and replug GPON module (without fiber plugged in), wait 1 or more minutes, then plug fiber back in.
The idea is that without fiber cable plugged in the SFP module should start to go through different link speed settings. Experiment plugging the cable in after waiting 1 minute (it takes 1 minute for the SFP stick to bootup). From my tests module tries another link speed after ~25 second intervals. It goes through LAN_SDS_MODE 1(Fiber 1G = 1GbaseX), 3(SGMII MAC = 1Gb MAC), 4(HiSGMII PHY = 2.5Gb PHY) and 7(SGMII Force = 1GbaseT).
If the stick did no become running, then unplug the module and replug it back in (without fiber cable). Try to plug the fiber cable at a later interval and double check in ROS you have "1G baseX" or "2.5G baseX" with auto negotiation off set!!
- If the stick still does not become running, then solder UART wires to RX and TX pads on GPON module and troubleshoot. Follow hack-gpon.org to find UART pad location!
In my case, I just soldered RX and TX wires to CH341A (model with voltage select switch). Then I plugged the CH341A in USB port of RB5009UG+S+IN and I plugged in ODI module in SFP cage to get common ground and power to SFP module. Then just set speed to usb port and connect from ROS to CH341A.
?? Maybe it's possible to avoid soldering UART just by using media converter box??? - https://github.com/xvzf/zyxel-gpon-sfp/issues/8#issuecomment-1472746286
- If your module does not try to auth to tet network, check auth status in ODI module admin webpage or use this command under telnet "diag gpon get onu-state"
If you get LOID Status "WRONG" and O0, then it's possible your MAC_KEY is wrong. Follow steps below
- Use "flash_eraseall /dev/mtd3" to clear all saved config and start from scratch. Before executing this, do save your existing config using "flash all" command!
- Try to setup SFP module again and check if you get some different status - O1 to O7 and Initial Status is a good sign. O0 and WRONG is not good. Go to step below, if you still have O0 and WRONG status.
- Use SFP or any other (even nokia modem MAC will work) MAC address, then generate MAC_KEY if you lost it after doing "flash_eraseall /dev/mtd3" or for some any other reason MAC_KEY is incorrect
- Generate MAC_KEY with this website - https://gchq.github.io/CyberChef/#recipe=To_Upper_case('All')Find_/_Replace(%7B'option':'Regex','string':'%5B%5E0-9A-F%5D*'%7D,'',true,false,true,false)Find_/_Replace(%7B'option':'Regex','string':'%5E'%7D,'hsgq1.9a',true,false,true,false)MD5()&input=MDA6MDA6MDA6MDA6MDA6MDA
## Useful docs
https://hack-gpon.org/ont-odi-realtek-dfp-34x-2c2/
https://github.com/Anime4000/RTL960x