Giter Club home page Giter Club logo

e3372-web-management's Introduction

E3372-Web-Management


Getting E3372 device information using Python Flask and AngularJs. It can display the status of Networks and post dataswtich and send sms under the Python REST interface. Tested in Raspberry Pi 3 with JESSIE Release date:2017-01-11 and Mac OS 10.12

Installation

Need to install a few python modules like flask, requests, xmltodict, json using pip. Have tested in the Raspberry Pi3 with RASPBIAN JESSIE Release date:2017-01-11 that only need to install the xmltodict.

$ pip install xmltodict

Basic Usage

python e3372Web.py

Open your browser and it is running on http://0.0.0.0:8000/

Note

Forked from https://github.com/arska/e3372, and the js template refer to the AngularJS phone's tutorials(https://github.com/angular/angular-phonecat). Enjoy and any improvements are welcome.

e3372-web-management's People

Contributors

darrenwong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

e3372-web-management's Issues

How to switch on/off the data with curl in bash?

Hi, I'm sorry if this isn't about python in the first place. I've been trying to connect and disconnect the internet on my E3372 based on your script but I'm doing in in curl. This is my curl script:

# First I obtain the cookie:
curl -sc '/tmp/E3372' 'http://192.168.8.1/html/home.html' > /dev/null
# Then I obtain the RequestVerificationToken:
token=$(curl -s http://192.168.8.1/api/webserver/SesTokInfo | awk -F "[><]" '/TokInfo/ {print $3}')
# Now I try to switch on the internet:
curl -X POST 'http://192.168.8.1/api/dialup/mobile-dataswitch' -H '__RequestVerificationToken: $token' -H 'Content-Type":"application/x-www-form-urlencoded; charset=UTF-8' --data '<?xml version="1.0" encoding="UTF-8"?><request><dataswitch>0</dataswitch></request>' --compressed

But then I get:

<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>125002</code>
<message></message>
</error>

Sorry I'm not a programmer, can you help me how to fix that ? I just want to be able to switch on / off the internet via curl. Thanks

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.