Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: serial port shutdown signal

  1. #1
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017

    Post serial port shutdown signal

    Does anyone know how to send signal through the serial port to shutdown a PC running WinMe?? perhaps someone could reverse engineer the dschimdt shutdown controller which works with APC's powerchute software.
    another problem I have is that winMe on my machine is not responding to power off when power button pressed. It works with standby though...anyone know why this might be? does ACPI O/S support on BIOS have to be off?
    04 Acura TL w/ core2duo 2ghz laptop w/ 1gb RAM on a docking station.

    Fast car, fast PC. ;)

    http://www.arcdesigns.net/carpc/

    My TL CarPC ver2

    FSR Flash Skin w/ moving weather maps

  2. #2
    Constant Bitrate
    Join Date
    May 2001
    Posts
    128

    Post

    I believe this was on the dschimdt site. I know it's now taken down..but let me check google's cached version of the page...well...i guess he didn't say...but I'm pretty sure it's Pin 8 that you need to communicate with...as to what you need to send it...i have no idea....anyone else???
    Athlon 500, 128 MB, ATI Xpert 4MB AGP TV-Out, Sound Blaster Live! Value, 8.4 GB, 2x20 Backlit LCD, Keypower 250 Watt ATX DC-DC, DSchmitd Startup/Shutdown Controller, IRMan + Backlit IR Remote, Custom Keypad, 5.6" NTSC LCD, In-Dash Slot Loading DVD, all installed in an '87 Honda Accord LX-i

  3. #3
    Variable Bitrate
    Join Date
    Aug 2000
    Location
    Abbotsford, BC, Canada
    Posts
    441

    Post

    PII 266, 512 MB RAM, 10 Gig, 36x CD-ROM, 16x DVD, DeLorme GPS, 5.6" LCD Screen, Dschmidt power controller, Keypower ATX DC-DC Supply, PowerAmp Macro controller, Dauphin mini-Kbd.
    Sony Head Unit, Sony Unilink input selector, rear deck Kenwood 6x9's, stock door spkrs... All in my '96 Civic, of course :}
    BC ROCKS!!!

  4. #4
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017

    Post

    they dont seem to help much still... i tried to look for info on the web but without any success =(
    04 Acura TL w/ core2duo 2ghz laptop w/ 1gb RAM on a docking station.

    Fast car, fast PC. ;)

    http://www.arcdesigns.net/carpc/

    My TL CarPC ver2

    FSR Flash Skin w/ moving weather maps

  5. #5
    Variable Bitrate
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    307

    Post

    I could help you, if you would permit a signal on the parallel port... the serialport is kinda hard to interface, the LPT port on the other hand is very easy, using visual basic or something like that it would be very easy...
    So if you wouldn't mind using the LPT port, let me know....
    If at first you don't succeed.........
    destroy all evidence you tried

    for info on t6369c LCD or Presslab's powersupply check:
    http://www.namms.tk <=updated!!

  6. #6
    Variable Bitrate
    Join Date
    Feb 2001
    Location
    louisville,ky,usa
    Posts
    259

    Post

    Here's a circuit for the serial port that I just happened upon...
    http://www.wolfsource.org/route66/
    I cheat, I own an empeg.
    Meskimen's Law: There's never time to do it right, but there's always time to do it over.
    http://civic.mp3car.com

  7. #7
    mpt
    mpt is offline
    Constant Bitrate
    Join Date
    Jun 2000
    Location
    Setubal, Portugal - Europe
    Posts
    119

    Post

    Itīs not a bad circuit, itīs based for Unix/linux but it think itīs easy to someone to make a simple program to send the signal trough the serial port, just has to many relays (3).
    mpt

  8. #8
    Variable Bitrate
    Join Date
    Feb 2001
    Location
    louisville,ky,usa
    Posts
    259

    Post

    Originally posted by mpt:
    <STRONG>Itīs not a bad circuit, itīs based for Unix/linux but it think itīs easy to someone to make a simple program to send the signal trough the serial port, just has to many relays (3).</STRONG>
    well.. it's designed to work with UPSd.. UPSd was written when there was not a UPS shutdown software for linux.. it works with APC and other ups'es. This circuit would probably work with powerchute or some other windows software.
    I cheat, I own an empeg.
    Meskimen's Law: There's never time to do it right, but there's always time to do it over.
    http://civic.mp3car.com

  9. #9
    FLAC
    Join Date
    Aug 1999
    Location
    Upper Marlboro, MD 20772
    Posts
    1,311

    Cool

    With parrallel port, i can write that code for you easily. Infact CobraII/III uses 5button control which is hooked up to the parrallel port. If you guys really want it let me know. I can even write the code to hibernate/shutdown/restart, take ur pic.
    abcd-1
    Author of CobraI,II,III and now CobraIV.
    You can contact me on AOL instant messenger....nick is cenwesi or cenwesi3

  10. #10
    Newbie
    Join Date
    Jun 2001
    Location
    Sebastopol, CA
    Posts
    55

    Post

    You can just directly hook the +12V ACC line to the DSR, DCD, CTS, and then create a little software to shut down the computer if the DCD is low for 15 minutes. I have some VB code for shutting down, works with NT/2000 too:


    Attribute VB_Name = "modShutdown"
    '//*********************************//'
    Private Const STANDARD_RIGHTS_REQUIRED = &HF0000
    Private Const READ_CONTROL = &H20000
    Private Const STANDARD_RIGHTS_READ = (READ_CONTROL)
    Private Const STANDARD_RIGHTS_WRITE = (READ_CONTROL)
    Private Const STANDARD_RIGHTS_EXECUTE = (READ_CONTROL)

    Public Enum TokenRights
    TOKEN_ASSIGN_PRIMARY = &H1
    TOKEN_DUPLICATE = &H2
    TOKEN_IMPERSONATE = &H4
    TOKEN_QUERY = &H8
    TOKEN_QUERY_SOURCE = &H10
    TOKEN_ADJUST_PRIVILEGES = &H20
    TOKEN_ADJUST_GROUPS = &H40
    TOKEN_ADJUST_DEFAULT = &H80
    TOKEN_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or TOKEN_ASSIGN_PRIMARY Or TOKEN_DUPLICATE Or TOKEN_IMPERSONATE Or TOKEN_QUERY Or TOKEN_QUERY_SOURCE Or TOKEN_ADJUST_PRIVILEGES Or TOKEN_ADJUST_GROUPS Or TOKEN_ADJUST_DEFAULT)
    TOKEN_READ = (STANDARD_RIGHTS_READ Or TOKEN_QUERY)
    TOKEN_WRITE = (STANDARD_RIGHTS_WRITE Or TOKEN_ADJUST_PRIVILEGES Or TOKEN_ADJUST_GROUPS Or TOKEN_ADJUST_DEFAULT)
    TOKEN_EXECUTE = (STANDARD_RIGHTS_EXECUTE)
    End Enum

    Public Enum PrivilegeAttributes
    SE_PRIVILEGE_ENABLED_BY_DEFAULT = &H1
    SE_PRIVILEGE_ENABLED = &H2
    SE_PRIVILEGE_USED_FOR_ACCESS = &H80000000
    End Enum

    Public Enum ExitOptions
    EWX_LOGOFF = 0
    EWX_SHUTDOWN = 1
    EWX_REBOOT = 2
    EWX_FORCE = 4
    End Enum

    Public Enum TokenAccess
    TokenUser = 1
    TokenGroups = 2
    TokenPrivileges = 3
    TokenOwner = 4
    TokenPrimaryGroup = 5
    TokenDefaultDacl = 6
    TokenType = 8
    TokenImpersonationLevel = 9
    TokenStatistics = 10
    End Enum

    Type LUID
    lowPart As Long
    HighPart As Long
    End Type

    Type LUID_AND_ATTRIBUTES
    pLuid As LUID
    Attributes As PrivilegeAttributes
    End Type

    Type PTOKEN_PRIVILEGES
    PrivilegeCount As Long
    Privileges(0) As LUID_AND_ATTRIBUTES
    End Type

    Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
    Private Declare Function OpenProcessToken Lib "advapi32" (ByVal ProcessHandle As Long, ByVal DesiredAccess As TokenRights, ByRef TokenHandle As Long) As Long
    Private Declare Function LookupPrivilegeValueA Lib "advapi32" (ByVal lpSystemName As String, ByVal lpName As String, ByRef lpLuid As LUID) As Long
    Private Declare Function AdjustTokenPrivileges Lib "advapi32" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, ByRef NewState As PTOKEN_PRIVILEGES, ByVal BufferLength As Long, ByRef PreviousState As Long, ByRef ReturnLenght As Long) As Long
    Private Declare Function AdjustTokenPrivilegesOld Lib "advapi32" Alias "AdjustTokenPrivileges" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, ByRef NewState As PTOKEN_PRIVILEGES, ByVal BufferLength As Long, ByRef PreviousState As PTOKEN_PRIVILEGES, ByRef ReturnLenght As Long) As Long
    Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As ExitOptions, ByVal dwReserved As Long) As Long

    Public Function Shutdown(Operation As ExitOptions) As Long

    Dim lngProcess As Long
    Dim lngReturn As Long
    Dim lngToken As Long
    Dim udtLUID As LUID
    Dim lngTokenPrivileges As TokenRights
    Dim udtTokenPrivNew As PTOKEN_PRIVILEGES

    lngProcess = GetCurrentProcess()
    lngTokenPrivileges = TOKEN_ADJUST_PRIVILEGES

    lngReturn = OpenProcessToken(lngProcess, lngTokenPrivileges, lngToken)
    lngReturn = LookupPrivilegeValueA(vbNullString, "SE_SHUTDOWN_NAME", udtLUID)

    udtTokenPrivNew.PrivilegeCount = 1
    udtTokenPrivNew.Privileges(0).Attributes = SE_PRIVILEGE_ENABLED
    udtTokenPrivNew.Privileges(0).pLuid = udtLUID

    lngReturn = AdjustTokenPrivileges(lngToken, 0, udtTokenPrivNew, 0&, 0, 0&)

    Shutdown = ExitWindowsEx(Operation, 0)

    End Function

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •