Giter Club home page Giter Club logo

neatgear's Introduction

neatgear

This is a tool for patching the SPI flash contents present on Netgear GS108v4 switches to make them 802.1Q-VLAN-capable. See this blog post for technical details.

Prerequisites

First, you need some way to dump the current flash contents from your switch. My recommendation is to get a SOIC-8 clip, put stm32-vserprog on a Bluepill board and then use Flashrom for reading and writing the flash.

You can of course use any other tool that accomplishes the same goal, but this will probably give you the best experience for the least amount of money. Please note that all flashrom commands in this document are specific to stm32-vserprog and might need modification if you use some other interface.

Dumping the flash

Important: Make sure the switch is disconnected from it's power supply before attaching the programmer. Otherwise, the ASIC and the programmer will interfere when accessing the flash.

Attach the SOIC-8 clip to the flash chip. Make sure the orientation is correct: Pin 1 of the cable is usually marked in some way, pin 1 of the flash has a circular indentation on the body of the chip and a dot on the PCB next to the pin.

SOIC-8 clip attached to flash in the switch

Then run:

flashrom -p serprog:dev=/dev/ttyACM0:115200 -r original.img

This should give you the current contents of the switch's flash. Make sure not to lose it so that you can revert to the original state if necessary.

Creating a config

Create a VLAN config file. example.cfg provides an example how to do so.

Generate a new flash image based on that config

Run ./apply.py original.img my-vlan.cfg modified.img. The tool will print a table representing the generated VLAN config. Check to make sure it matches your expectations.

If the tool reports an unknown flash image, please consider creating an issue and attach your image file.

Flash the new image

Flash the new image using flashrom -p serprog:dev=/dev/ttyACM0:115200 -w modified.img.

Test your configuration

Disconnect the programmer and power up the switch. Test your configuration to make sure it behaves as expected.

If you encounter any problems, feel free to create an issue or send a pull request. Thanks!

neatgear's People

Contributors

florolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

droid-max

neatgear's Issues

2 Questions

Repo & File name misspell! neatgear -> netgear

GS108v3 can use this Tool? Do you have a backup firmware for it? thx.

D-Link DGS-1008P

Here is a firmware for similar broarcom-based model. Hash "f655d517209c88832aa60946b03e0564762324fa9ca41e6270c4ac537c0ac88c" - is unknown. Tried offsets 0x4000 and 0x6000 (where data is seen) but no success. Please add this model.
DGS-1008P_FM25F005.zip

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.