Sven's {b}logbuch

Themen rund um die Informationstechnik

  • Home
  • Kategorien
    • DIY
    • Hardware
      • Laptop
      • Monitor
      • PC
      • Server
      • Tablet
      • Other
    • Linux
      • Application
      • Bash
      • Gnome Shell Extension
      • Python
      • Other
    • Windows
      • Application
      • Powershell
      • Other
  • Über Mich
  • Kontakt
  • Impressum

EC-Control Database

Other
8. Juni 2016

Erweiternd zum EC-Control und EC-Control Gnome Shell Extension Artikel, möchte ich hier die Erstellung einer eigenen Datenbank erklären.

Es ist möglich eigene Datenbanken zu erstellen um weitere Geräte bzw. Laptops zu unterstützen. Es gibt mehrere Wege, mögliche Werte aus einem EC auszulesen und anschließend auszuwerten.

  • Der Fenster Weg: unter Windows mittels RW-Everything
  • Der Freie Weg: unter Linux mittels od, xxd und dd
  • ACPI Tabellen durchforsten, siehe im NBFC Wiki

Ich gebe es ungerne zu, aber einfacher ist es über dem Fenster Weg, die ACPI Tabellen waren mir leider keine große Hilfe. Dazu habe ich in meinem Falle einfach das Gigabyte Tool geöffnet, in dem ich sämtliche Optionen setzen kann.

Parallel dazu RW-Everything gestartet, siehe Bild rechts, kann man sich dazu die Innereien des EC’s anschauen. Dazu klickt ihr auf dem EC Symbol (siehe im Bild rechts die grüne Markierung) im RW-Everything, ein Fenster öffnet sich in dem der EC Register mit seinen Werten sichtbar wird. Beobachtet nun den EC Register und aktiviert/deaktiviert innerhalb euer Steuersoftware (bei mir das Gigabyte Tool) beispielsweise das Bluetooth.

So wie ihr es bewerkstelligt, sollte sich im EC etwas rühren. Wiederholt den Vorgang einfach bis ihr sicher seit, dass es dieser sich verändernder Wert ist den ihr sucht. Schreibt euch den gefundenen Wert auf, klickt auf ihm, dann seht ihr oben links im EC Fenster, in roter Schrift auf gelben Hintergrund, den so genannten OffSet. Der ist wichtig um den Ort des Wertes im Register zu bestimmen. Am besten notiert ihr euch den wie im folgenden Beispiel:

Bluetooth:

OffSet 1 : 42 Aus - C2 An

Das Spiel könnt ihr nun mit jeder Funktion die ihr innerhalb eures Linux haben möchtet wiederholen.

Das schwierige dabei ist, wenn zum Beispiel in einem Offset gleich mehrere Funktionen bedient werden. War bei mir der Fall mit Bluetooth und Webcam. Außerdem unterschied er auch noch ob im Batterie Modus oder am Stromnetz. Das sah dann wie folgt aus:

#########################################################################################################
# Device:       Laptop / Notebook
# Manufacturer: Gigabyte
# Modell:       P57 / P57W
# Year:         2016
# BIOS:         FB0B
# EC:           F00B
#########################################################################################################
# Version:      1.0.1
# Maintainer:   Sven Kramer
#########################################################################################################
#   NAME        |   STATE   |   VALUE   |   TARGET  |   OFFSET  |   COMMENT
#########################################################################################################
Bluetooth       |   ON      |   C2      |   42      |   1       |   Bluetooth On (Camera On) (Battery)
Bluetooth       |   ON      |   82      |   02      |   1       |   Bluetooth On (Camera Off) (Battery)
Bluetooth       |   OFF     |   42      |   C2      |   1       |   Bluetooth Off (Camera On) (Battery)
Bluetooth       |   OFF     |   02      |   82      |   1       |   Bluetooth Off (Camera Off) (Battery)
Bluetooth       |   ON      |   C3      |   43      |   1       |   Bluetooth On (Camera On)
Bluetooth       |   ON      |   83      |   03      |   1       |   Bluetooth On (Camera Off)
Bluetooth       |   OFF     |   43      |   C3      |   1       |   Bluetooth Off (Camera On)
Bluetooth       |   OFF     |   03      |   83      |   1       |   Bluetooth Off (Camera Off)

Datenbank:

Kommen wir zur Datenbankerstellung. Schnappt euch einen Texteditor eurer Wahl, bei mir war es der GEdit, unter Windows empfehle ich Notepad++.

Vorab: In der Datenbank können beliebige Kommentare eingefügt werden, jedoch stets beachten dass die betroffene Zeile immer als erstes Zeichen mit einem # anfängt. 

Ein Datenbankeintrag wird immer in folgender Reihenfolge gemacht:

#   NAME    |   STATE   |   VALUE   |   TARGET  |   OFFSET  |   COMMENT
  • NAME: Beliebiger Name der Funktion
  • STATE: Schaltstatus wie ON oder OFF, oder wenn mehrere Stufen zu schalten sind 0, 1, 2, 3 etc.
  • VALUE: Der Wert der dazu geschrieben werden muss
  • TARGET: Der Wert der als nächstes geschrieben wird
  • OFFSET: Der zum Wert gehörige OffSet
  • COMMENT: Beliebiger Text, wird beim schalten im Gnome Panel so angezeigt

Wir machen ein Beispiel:

Bluetooth      |    ON       |   C2      |   42      |   1       |   Bluetooth On (Camera On) (Battery)
Bluetooth      |    OFF      |   42      |   C2      |   1       |   Bluetooth Off (Camera On) (Battery)

Wir nehmen an, die erste Zeile ist der IST Zustand und Ihr löst nun in der Gnome Extension ein klick auf dem „Bluetooth ON“ Menü aus. Anhand des TARGET Wert schreibt die Extension nun im Offset 1 ein Wert 42.

Datenbanknamen:

Als Datenbank Namen bitte den eures Rechners nehmen, um den Namen zu ermitteln gebt in der Konsole mit Administrationsrechten „su“ folgendes ein:

su
echo "`dmidecode -s system-manufacturer`_`dmidecode -s system-product-name`.db"

Oder mittels „sudo„:

echo "`sudo dmidecode -s system-manufacturer`_`sudo dmidecode -s system-product-name`.db"

Bei meinem Gigabyte Laptop ergibt dies „GIGABYTE“ und „P57„. Also setzt sich der Datenbank Name aus den beiden werten zusammen: „GIGABYTE_P57.db„.

Sollte der ein oder andere eine Datenbank erstellt haben, so würde ich mich freuen die hier publizieren zu dürfen.

Sollten noch Fragen offen sein, schreibt mir eine Mail oder nutzt die Kommentarfunktion.


Schreibe einen Kommentar Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Sven’s {b}logbuch by S. Kramer

Diese Website verwendet Cookies um Dienste anzubieten und Zugriffe zu analysieren. Deine IP-Adresse und dein User-Agent werden zusammen mit Messwerten zur Leistung und Sicherheit freigegeben. So können Nutzungsstatistiken generiert, Missbrauchsfälle erkannt und behoben und die Qualität des Dienstes gewährleistet werden.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
immer aktiv
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDauerBeschreibung
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SPEICHERN & AKZEPTIEREN