Announcement

Collapse
No announcement yet.

serial port shutdown signal

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      Google's cached DSchmidt AutoOff site
      and
      The cached FAQ for the product
      You're welcome
      ~m
      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!!!

      Comment


      • #4
        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

        Comment


        • #5
          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!!

          Comment


          • #6
            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

            Comment


            • #7
              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

              Comment


              • #8
                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

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      Here is a snippet of code on the serial port side of things:

                      MSComm.Settings = "9600,s,8,1"
                      MSComm.PortOpen = True

                      If MSComm.PortOpen &lt;&gt; True Then MsgBox "Port failed to open"

                      If Not MSComm.DSRHolding Then ' data set ready low (car power is off), shut down PC when timeout occurs
                      shutdownCtr = shutdownCtr + 1
                      shutdownStatus = playing
                      WinAmpPause
                      If shutdownCtr &gt;= 5 Then
                      Shutdown EWX_SHUTDOWN 'shut down the computer
                      shutdownCtr = 0 'clear counter so we don't shutdown again
                      End If
                      End If

                      Comment


                      • #12
                        I'm going to be developing a hardware/software system in the next month or so to do this via the game port, as well as to control WinAmp. Keep your eyes open for it.

                        Also, any feedback on this system, or what I could possibly control on the computer with it would be kewl. Check out my other post in this forum about it.

                        Scott--
                        -=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-
                        97 Firebird Formula Convertable - Project R/T
                        Project R/T SoundDomain Page
                        -=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-

                        Comment


                        • #13
                          Opps... My bad... General Hardware forum
                          http://www.mp3car.com/cgi-bin/ultima...c&f=2&t=002713
                          -=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-
                          97 Firebird Formula Convertable - Project R/T
                          Project R/T SoundDomain Page
                          -=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-=~=-

                          Comment

                          Working...
                          X