Coder Social home page Coder Social logo

samsung_ctl_py's Introduction

samsung_ctl_py

Python implementation of a Windows-based Samsung BIOS control package

When windows (inevitably) crapped the bed on a Samsung laptop, I was left without certain control over hardware features that the laptop contained. Some of these features are mapped to the fn-keys on the laptop. I have since owned a later iteration of that same laptop, and once again windows crapped the bed. To fix this, I had some bash scripts that echoed directly into files under /sys and the scripts ran as root. This is an updated client/server version, written in python, where the server needs to be able to write into these files (the server will be ran as root out of laziness and not wanting to screw up permissions on kernel-mapped files). The client will simply need write permissions on a socket, and to send a valid command.

A control is a hardware 'control'. Currently the software knows of the wifi rfkill, bluetooth rfkill, performance level, and the usb-charge controls. These controls are known respectively as wifi, bt, cpu, and usb. Some of the other features of the Samsung motherboard have been adopted into GUI platforms, and are not solved for here.

The architecture of the server will be such that: anyone can change a hardware control, but nobody can bypass the command set to do something naughty.

The command set is simple: {get, set, cyc} control [parameter]. Parameter is unused for get and for cyc. Get simply hands back the current value of the control, cyc will rotate through the valid values for the control in a pre-defined order (using the current value as the, you guessed it, current value), and set resolves a control to a fixed value.

The paths file in this directory points a 'control' (currently: cpu, wifi, usb, or bt) to a file that the kernel uses to control that hardware.

actions.py is where the command set is generated from the intersection of: the controls in actions.py and the controls mapped in the paths file.

The test_{read,write} files are scripts to validate that the logic is working.

samsung_ctl_py's People

Contributors

melsabae avatar

Watchers

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