Announcement

Collapse
No announcement yet.

SerialSwitch Version 5

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

  • SerialSwitch Version 5

    SerialSwitch from The Garage
    Version 5.0
    Recommended to uninstall old versions first!
    This is a complete rewrite, Uninstall old version first!

    SerialSwitch is a serial port control application developed with the Ride Runner VB6 SDK.
    It supports Hibernation and Resume from Hibernation.

    It controls the selected serial port DTR(Data Terminal Ready) and RTS(Ready to Send) lines.
    This is used for delayed Amplifier start or anything else that you want to control.
    You can run a small relay (on some computers) or a transistor circuit with SerialSwitch.

    It detects the serial port CD(Carrier Detect), CTS(Clear to Send), and DSR(Data Set Ready) lines.
    This is used for physical button input to control Road Runner.
    The best way to power the buttons is to use the RTS(Ready to Send)line for power to buttons.
    This way you will be safe in not sinking too much current to the port.
    This way you do not need any other parts other than some momentary buttons.
    This way you could disable the button input when not needed.

    Warning!!! If you power your buttons externally:
    You should not sink more than 20 milliamps on any one line
    Therefore you must use a resistor on the input lines if you power your buttons externally.

    Warning!!! If you do not know how to do any of this, RESEARCH how to, or get help from someone who does.
    Warning!!! I am not responsible for your BLOWN serial port!

    Note: Windows enumerates the serial ports on boot up.
    This will cycle the DTR and RTS pins from low to high a few times.
    There is a registry setting to disable this on the port you want to use. XP and later.
    Warning!!! I am not responsible for yor registry setting changes.
    Here is a good link to RESEARCH. http://dast.freeshell.org/ or Search Google.

    The DTR and RTS pins are Output Control Pins.
    The CTS, DCD, and DSR pins are Input Control Pins.

    OUTPUTS:
    DTR is pin #4
    RTS is pin #7
    Ground is pin #5

    INPUTS:
    CD is pin #1
    CTS is pin #8
    DSR is pin #6

    This is looking at the COMPUTER SERIAL PORT

    Installation Note:
    Be sure of the folder path you want to install SerialSwitch to!
    It defaults to C:\Program Files\SerialSwitch.
    After installation go to your SerialSwitch Folder and Run the SerialSwitch executable once.
    It will give you a MessageBox telling you that the Com Port is Not Set!
    It will tell you to check the SerialSwitch.ini file.
    SerialSwitch will check ports 1 thru 16 and write the Com Port Avaiability to SerialSwitch.ini
    SerialSwitch.ini will tell you what Com Ports are Available to Control on your Computer.

    Change [Settings] --To-- [Settings] ----- Or whatever Com Port you will use.
    ------- Port=Not Set ---- Port=1

    You must use the Com Port that you have your relays, circuit, ect... set up on.
    You can then use SerialSwitch by itself, with the checkboxes to test your circuits.
    After testing close SerialSwitch.
    Both serial line outputs are now saved in the SerialSwitch.ini for startup and shutdown.
    You can use SerialSwitch by itself or with Ride Runner.

    -----------------------------------------------------------------------------------------
    Ride Runner Setup:
    ------------------Begin ExecTBL.ini--------------------------------------

    /EXAMPLE Commands to OPEN SerialSwitch on Ride Runner Start
    /You must make these ExecTBL.ini changes to at least Start SerialSwitch with Ride Runner.

    "OnSkinStart","RELAYS" /in any skin
    OR
    "ExtraPrograms","RELAYS" /in DFX skin
    THEN
    "RELAYS","RUN;$RRPATH$SerialSwitch\SerialSwitch.ex e" /Your folder Path may be different.

    /EXAMPLE Command to CLOSE SerialSwitch on Ride Runner Exit
    /You must make these ExecTBL.ini changes to at least Stop SerialSwitch with Ride Runner.

    "QUIT","CLOSEWINDOW;SerialSwitch||ENDIT"
    "ENDIT","QUIT"

    /SerialSwitch Output Commands
    /You must make these ExecTBL.ini changes to at least use Buttons/Labels to control Outputs.

    "DTRON","SENDMSG;SerialSwitch;DTR_ON"
    "DTROFF","SENDMSG;SerialSwitch;DTR_OFF"

    "RTSON","SENDMSG;SerialSwitch;RTS_ON"
    "RTSOFF","SENDMSG;SerialSwitch;RTS_OFF"

    --------------------End ExecTBL.ini--------------------------------------

    -------------------------------------------------------------------------
    These are now the Skin Commands to control the Output lines - see above
    -------------------------------------------------------------------------
    DTRON
    DTROFF

    RTSON
    RTSOFF
    -------------------------------------------------------------------------
    These are the Events from the Input lines to do stuff in Ride Runner
    -------------------------------------------------------------------------
    ONDTR_ON
    ONDTR_OFF

    ONRTS_ON
    ONRTS_OFF

    ONCD_ON
    ONCD_OFF

    ONCTS_ON
    ONCTS_OFF

    ONDSR_ON
    ONDSR_OFF
    -----------------------------------------------------------------
    These are the Custom Labels to display Text = ON or OFF
    -----------------------------------------------------------------
    !DTR_Status
    !RTS_Status
    !CD_Status
    !CTS_Status
    !DSR_Status
    ------------------------------------------------------------------
    These are the Custom Indicators to display Images = ON or OFF
    -----------------------------------------------------------------
    !DTR_Ind
    !RTS_Ind
    !CD_Ind
    !CTS_Ind
    !DSR_Ind
    -----------------------------------------------------------------
    These are the Variables to act upon = True(1) or False(0)
    -----------------------------------------------------------------
    DTR_Var
    RTS_Var
    CD_Var
    CTS_Var
    DSR_Var
    --------------------------------------------------------------
    Use SkinTool to test with Ride Runner.
    Enjoy! No donations necessary!

    SerialSwitch was tested and works on Win2k. Use at your own Risk!
    Please provide Feedback
    Attached Files

  • #2
    I've been meaning to make a plugin like that for ages...

    If may I suggest, add label codes to display the CTS, DSR and DCD signals in a label, so it can be used in variables, and similarly, create events like ONCTSCOM1, OFFCTSCOM1.. or something to that effect... so you can execute commands in RR based on states changed on the inputs of the serial port.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

    Comment


    • #3
      Well, I'll take that as a compliment, being it's coming from you. I wish to thank you for your abilities and producing such a fine program. I found RR to be a breeze to set up to my liking. Your foresight in the design of RR is refreshing, and guarantees it's place at the top of the list for CarPC Front Ends.
      I will take your suggestions and implement them into my little plugin.
      ....JJG

      Comment


      • #4
        Bump:
        Updated to Version 2
        New features!
        ...JJG

        Comment


        • #5
          Hi Jebus, If I wanted to run this on startup rather than when Roadrunner starts, is there a way (maybe a command line switch) where I can get the DTR and RTS to default to on automatically when I run the app?

          i.e. if I still want to run my amps while playing a game and I'm not in Roadrunner.

          Comment


          • #6
            Assault,

            Just change the code to close the SerialSwitch when RR closes in EXecTBL.ini.

            From

            "QUIT","CLOSEWINDOW;SerialSwitch||ENDIT"
            "ENDIT","QUIT"

            TO

            "QUIT","SHOWWINDOW;SerialSwitch;TRUE||ENDIT"
            "ENDIT","QUIT"


            Make sure the Switch you are using is on when you close RR and the Amp will stay on.
            You will have to close SerialSwitch Manually


            Note that I had forgotten to add some code in the above EXecTBL.ini lines.

            "RELAYS","RUN;$RRPATH$SerialSwitch\SerialSwitch.ex e||SHOWWINDOW;SerialSwitch;FALSE"

            Note the addition to hide SerialSwitch on Road Runner Startup

            Comment


            • #7
              Thanks Jebus, its an awesome little tool, works perfectly with my hardware:



              I dont actually run a RR on start up I have the icon on my desktop so I can choose other apps if need be. So far I've been using XxAndyxX's volume amp control app but it only allows you to use com port 1 so being able to use other com ports with your app is awesome!

              I take it there's no way to default the DTR and RTS to on before RR runs then?

              I can run SerialSwitch on Windows startup no problem, it just always starts with everything off. It would be good to be able to put something in the SerialSwitch.ini or run with a switch (/d or /r or someting) to be able to have them start on as default.

              Comment


              • #8
                Well That would be easy, I'll see what I can do. Might be a couple o days. That four letter word called "work" takes up my weekdays.
                ...JJG

                Comment


                • #9
                  Originally posted by Jebus View Post
                  Well That would be easy, I'll see what I can do. Might be a couple o days. That four letter word called "work" takes up my weekdays.
                  ...JJG
                  Awesome! much appreciated Jebus!

                  Comment


                  • #10
                    Bump:
                    Updated to Version 3
                    More New features!
                    ...JJG

                    Comment


                    • #11
                      No idea what I did wrong but the first time I installed it and it didn't make a directory in my road runner directory. Then I looked and realized that by default my roadrunner installed to RoadRunner (no space) and your app installed to Road Runner. So I tried to uninstall it. There wasn't an uninstall but when I hit exit/cancel the install it said "removing install files". Then I re-installed it using the custom directory path and pointed it to RoadRunner and it created a folder in the RoadRunner folder but it only had a .log file. So I copied/pasted all the files from the old directory to the new one. Whew.

                      Ok, so running the app works. I added the lines to the execTBL.ini file as per the readme.txt but when I load up roadrunner nothing happens. Nothing meaning it doesn't seem to load the program, doesn't turn on the serial. Only if I run the app manually. I am using DigitalFX3.0 skin if that matters.

                      What I'd like to do, since I might want to use sound outside of RR is just do what others asked and drop the app into startup. Or make a shortcut and put the shortcut into startup folder.

                      I was using amp control but as previously stated it only uses com1. My serial is on com2.

                      Very cool program you have here. I very much like it.

                      Comment


                      • #12
                        Jesus this is good, Jebus! - Looks like a cool little app.
                        I'm currently still bulding my carPC, but the PSU I'm using has a line for the amp remote, so I have no need for that function.

                        What I finally intend to do, is to have my car keyfob boot up my PC, set the car ignition to ON and then have a USB fingerprint reader start my engine and launch RR/windows in true 007 style.

                        What I would need to use this app for, would be to trigger a relay via COM2 (onboard) for the third point of ignition (turning your key to start the engine) and ideally to monitor the ECU tachometer signal to determine wether the car is started or not, to avoid constantly turning over the engine once already running.

                        Does the input signal measure the voltage ? or how does this work ?
                        Does version 2 include the labels update that Guino suggested ?
                        Do you think that any of this will be possible based on software restrictions ?

                        Many thanks, and good work,
                        Phil

                        Comment


                        • #13
                          Does the input signal measure the voltage ? or how does this work ?
                          The input signal goes high or positive voltage to generate the event in MSCOMM control. Keep in mind you can't apply just any old voltage to the pins. You should use the serial ports own voltage to drive the pin high. Like one of the two output pins.
                          Does version 2 include the labels update that Guino suggested ?
                          Version 2 adds the input pins and custom labels.
                          Version 3 adds custom indicators and a configurable timer control to update SerialSwitch status into RR.
                          Do you think that any of this will be possible based on software restrictions ?
                          No, I would get a remote start kit and work it into my setup from that angle.
                          ...JJG

                          Comment


                          • #14
                            Originally posted by Jebus View Post
                            The input signal goes high or positive voltage to generate the event in MSCOMM control. Keep in mind you can't apply just any old voltage to the pins. You should use the serial ports own voltage to drive the pin high. Like one of the two output pins.

                            Version 2 adds the input pins and custom labels.
                            Version 3 adds custom indicators and a configurable timer control to update SerialSwitch status into RR.

                            No, I would get a remote start kit and work it into my setup from that angle.
                            ...JJG
                            I think I will likely get a fusion brain and try and work it through that, it's just space is a constraint in my setup and I also want to know it's possible before I take the plunge, so a little more researching required.

                            Thanks very much for your quick response, and keep up the good work!
                            Phil

                            Comment


                            • #15
                              On install when I select for it to install to c:\program files\RoadRunner it still installs to \Road Runner (with the space). My RoadRunner has no space.

                              Also no matter what I try I can not get roadrunner to load it up. Here is my ExecTBL.ini

                              "QUIT","SendMsg;RRCDRip;showplugin||bye"
                              "BYE","QUIT"

                              /, Set Bellow the Path to the CDRip plugin (if used)
                              "CDRIP","PLUGIN;RRCDRip;D:\VBStuff\Road Runner\CDRip\CDRip.exe"

                              /, You can add commands to execute before suspend
                              /, and after resume, using the codes bellow:

                              "ONSUSPEND",""
                              "ONRESUME",""
                              "ONFILECLICK",""
                              "ONDIRCLICK",""
                              "ONPLCLICK",""
                              "ONDLCLICK",""
                              "ONPBCLICK",""


                              /,ADDED BY CONFIG
                              "IGPAUSE","!PRESET;IG3;WINAMP||SETVOL;WINAMP;1 00"
                              "IGRESUME","PRESET;IG3;WINAMP"

                              "ExtraPrograms","RELAYS"
                              "RELAYS","RUN;$RRPATH$SerialSwitch\SerialSwitch.ex e||SHOWWINDOW;SerialSwitch;FALSE"


                              I just can't get it to load up. I need it to load with RR instead of startup folder because I want it to be hidden.

                              I have tried to uninstall and re-install a few times but I think it still has something in the registry that makes it see it in a different folder or .. I don't know.

                              Can someone help?

                              Update: There is no space in the .exe as it is displayed in the post. I don't know why it puts that there.

                              Update2: I did some testing and still can not get it to load up. I changed the line to

                              "ExtraPrograms","RELAYS"
                              "RELAYS","RUN;C:\Program Files\RoadRunner\SerialSwitch\SerialSwitch.exe||SH OWWINDOW;SerialSwitch;TRUE"
                              to see if it would load it and maybe there was an error but since the window was hidden I didn't know.

                              Reloaded RR and still nothing. So I went into the serialswitch folder and manually ran it. It loaded no problem.

                              Comment

                              Working...
                              X