Giter Club home page Giter Club logo

cl-compal-ch7465lg's Introduction

Compal CH7465LG tools in Common Lisp

Part of my personal home automation efforts.

Done mostly by manual reverse-engineering of the protocol, but I also took a look at Python tools for this modem line.

NOTE this code is UGLY AS HELL and full of hacks. In particular, it abuses a security vulnerability in modem’s firmware as a login mechanism. The project is meant to work reliable enough for my personal use and is of low enough priority that it will be improved pretty much only if needed.

Status

I’m just starting to work on it. The goal is to implement the following set of functionality:

  • [ ] fetching basic information about the modem and status info
  • [X] fetching a list of all devices connected to the network
  • whatever else I’ll end up needing for my home automation setup

How to use

To get a list of devices with IP leases on the modem/router, after adding this repo to your Quicklisp’s local projects, run this:

(ql:quickload :cl-compal-ch7465lg)

(compal:list-devices)

;;; Example output:
;; ((:ETHERNET
;;   ((:INTERFACE . "Ethernet 4") (:IPV4ADDR . "192.168.0.123/24") (:INDEX . "0")
;;    (:INTERFACEID . "2") (:HOSTNAME . "Some Ethernet-plugged device")
;;    (:MACADDR . "00:11:22:33:44:55") (:METHOD . "1")
;;    (:LEASETIME . "00:00:45:26") (:SPEED . "100")))
;;  (:WIFI
;;   ((:INTERFACE . "SOME-PROVIDER-DEFINED-THING") (:IPV4ADDR . "192.168.0.124/24") (:INDEX . "1")
;;    (:INTERFACEID . "3") (:HOSTNAME . "android-somehash")
;;    (:MACADDR . "00:11:22:33:44:55") (:METHOD . "1")
;;    (:LEASETIME . "00:00:34:15") (:SPEED . "39"))
;;   ((:INTERFACE . "SOME-PROVIDER-DEFINED-THING") (:IPV4ADDR . "192.168.0.125/24") (:INDEX . "2")
;;    (:INTERFACEID . "3") (:HOSTNAME . "your laptop")
;;    (:MACADDR . "00:11:22:33:44:55") (:METHOD . "1")
;;    (:LEASETIME . "00:00:52:53") (:SPEED . "104"))
;;   ((:INTERFACE . "SOME-PROVIDER-DEFINED-THING") (:IPV4ADDR . "192.168.0.126/24") (:INDEX . "3")
;;    (:INTERFACEID . "3") (:HOSTNAME . "android-someotherhash")
;;    (:MACADDR . "00:11:22:33:44:55") (:METHOD . "1")
;;    (:LEASETIME . "00:00:38:19") (:SPEED . "39"))))

Contributions

Pull requests always welcome :). Especially the kind that make this code not such a big pile of hacks.

License

MIT. See LICENSE file.

cl-compal-ch7465lg's People

Contributors

temporal avatar

Watchers

James Cloos 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.