GithubHelp home page GithubHelp logo

autorndis's Introduction

简介

本项目用于解决以下问题

OpenWrt路由器通过Android手机USB网络共享(RNDIS)方式联网时,手机有时会意外关闭网络共享(比如路由器断电),当种情况发生时,脚本通过定时任务发现并自动打开手机的USB网络共享。

使用方法

  1. 手机开启开发者模式

  2. OpenWrt路由器需要安装adb

    参考命令

    opkg update
    opkg install adb
  3. 手机通过USB线连接路由器,手机会提示是否信任,选择信任。

  4. 将本项目脚本文件net_check.shwan_check.sh保存到路由器并加可执行权限

    wget -O /usr/bin/net_check.sh https://raw.githubusercontent.com/ericwang2006/AutoRNDIS/master/net_check.sh
    wget -O /usr/bin/wan_check.sh https://raw.githubusercontent.com/ericwang2006/AutoRNDIS/master/wan_check.sh
    chmod +x /usr/bin/net_check.sh /usr/bin/wan_check.sh
  5. OpenWrt计划任务添加

    #如果手机没有开启USB网络共享就开启
    */5 * * * *  /usr/bin/net_check.sh
    #如果长时间断网就重启一次手机
    */50 * * * * /usr/bin/wan_check.sh

autorndis's People

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.