Coder Social home page Coder Social logo

tripleoxygen / realtek-libohwtc Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 11 KB

Small shared library to enable feature 0x14 (Huawei proprietary OMCI MEs) on Realtek RTL9601X / Luna SDK based GPON devices (and maybe others).

License: GNU General Public License v2.0

Makefile 28.13% C 71.87%
gpon huawei odi realtek rtl9601d rtl9601x

realtek-libohwtc's Introduction

About

Some Realtek GPON ONT/ONU based on RTL960x SoC provides support to Huawei vendor-specific OMCI MEs but they are not enabled by default. This small and dumb lib replies implements the feature code (0x14) for this, enabling them. As simple as it gets.

Since no other code is used besides checking if the feature is on or off (registered or not), the feature's handler function is stubbed out.

A device with Huawei support should list the following .so in it's MIB library, usually located in /lib/omci devices's rootfs:

mib_Me350.so
mib_Me370.so
mib_Me373.so

If your device don't have these files, there is no support for HWTC specific stuff, so this lib is of no use. Maybe a 'Frankenstein' firmware can be made on these devices by copying the files over, but that hasn't been and won't be tested.

Also, .so for other vendor specific stuff are included in some devices, like "mib_fh65*.so" for FiberHome stuff, as seen on D-Link DPN-101G. If they're working on not, unknown.

Information on unpacking and repacking firmware images are out of scope, hence not provided and should be sourced from somewhere else.

This lib has been tested and working successfully on ODI DFP-34X-2C2 (more info on ODI DFP-34X-2C2). Additionally, the same type of modification has been done on V-SOL V2802RH, but as direct binary patches as it's a non-Linux device (V-SOL V2802RH).

Use

  • Update your uClibc MIPS/Lexra GCC toolchain prefix in Makefile, if needed.
    • Tweaks on linked libraries or some GCC args may be needed too, this has been tested with a old GCC 5.4.0 toolchain only.
  • Compile .so with
make
  • Copy produced .so lib to your device's features folder, usually at /lib/features
cp libohwtc.so <rootfs>/lib/features/
  • Repack your rootfs, firmware and flash to device.

Check if the Huawei entities was activated by running the following commands inside your device shell:

omcicli mib get 350
omcicli mib get 370
omcicli mib get 373

If any meaningful output is generated, they are active. Or, by running:

omcicli get tables

.. and you see entries with "ME{350,350,373}".

Sorry, no additional support for this code and/or its use is provided.

realtek-libohwtc's People

Contributors

tripleoxygen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.