#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    18
    Rep Power
    0

    Accessing Embedded Controller


    A while back there was an app that could blink the thinklight when a new e-mail was received. This app no longer works with the new ThinkPad Systems. I have a program installed right now that can toggle the thinklight, but I would like to know how to control it myself in C++. I would eventually like to take the code and stick it in a office plugin so that it blinks upon receiving mail.

    I found the address on the embedded controller that has to do with the thinklight, but I have no idea how to use this info.

    I can post the screenshot from RW everything if need be.
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,417
    Rep Power
    1871
    I take it that there is some version of windows sitting between you and the hardware, which would prevent you from directly messing with "the address" on the controller.

    > I have a program installed right now that can toggle the thinklight,
    So why not use it then?
    All you need is a wrapper program/script to keep calling it every so often, then link that to your email - job done.

    I take it that you can't find/get the source code for this toggling program.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    18
    Rep Power
    0
    Originally Posted by salem
    I take it that there is some version of windows sitting between you and the hardware, which would prevent you from directly messing with "the address" on the controller.

    > I have a program installed right now that can toggle the thinklight,
    So why not use it then?
    All you need is a wrapper program/script to keep calling it every so often, then link that to your email - job done.

    I take it that you can't find/get the source code for this toggling program.
    The toggling program is ThinkPad fan control. It uses the embedded controller to alter tan settings. The programmer just added thunklight control to ot. Its not open source only am older version is. Yes it is on windows. Is there any way to watch what the program is doing when I activate the toggle.
  6. #4
  7. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,417
    Rep Power
    1871
    With this and this you should be able to figure out which DLL's (and symbols) the program depends on.

    If you're lucky, it'll be in some manufacturer installed DLL with an obvious API call.

    Next, you'll need windbg to control the execution of the program. You'll only have the assembler to look at, so the best thing to do would be breakpoints on likely looking DLL calls.

    Understand that this isn't for the faint of heart, or anyone who gives up easily.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper

IMN logo majestic logo threadwatch logo seochat tools logo