Page 1 of 2

Anyone have RS232 plugin?

PostPosted: Tue Nov 04, 2008 8:12 pm
by billberet
hey,
time to move from IR to 232

i was looking around but i cannot find the RS232 plugin (if their is such a thing),
does anyone have this working on their xlobby? sending rs232 commands.

thanks
-bb

Re: Anyone have RS232 plugin?

PostPosted: Wed Nov 05, 2008 2:32 am
by lpg
I did alot of work on one but did not finish it off. Where I left off was wanting to install a script language to process the return information. I also need to finish the input of hex information. If someone would like to work with me on it I would be up for that. I developed it in C#.

Larry

Re: Anyone have RS232 plugin?

PostPosted: Wed Nov 05, 2008 3:24 pm
by billberet
how about another route then
since xlobby can execute files, and rs232 commands can be done thru straight dos.
what if we run a straight dos batch file.

i'm thinking

Set communications port COM1 to 9600 Baud, with no parity, 8 databits, 1 Stop Bit, and with XON/XOFF (These are the default settings).
typing: MODE COM1:9600,N,8,1,P

then redirect printing mode LPTn[:]=COMm[:]
then pipe the output to LPT1
just open up a dos prompt and do a mode /?
there you will see the redirect printing command
by piping the output to lpt1, that has been redirected to the com port, it should blast out the 232 connection
put all the batch files in a directory of the component being controlled. then run the batch files thru lobby.

i'll have to test this out.

Re: Anyone have RS232 plugin?

PostPosted: Wed Nov 05, 2008 6:16 pm
by billberet
i am successful rerouting my lpt port to com port.
i created a file and piped it thru the lpt port which spit out the com port.

now i don't want to loose my printing, so i'm going to start with lpt10 and send it to com3
i have a usb dongle to serial.
then i go serial to my gefen video matrix

the video matrix has 16 descrete codes, hex of 1-9 then a-g
i have created files each with one of those codes, so i have 16 small files.
now all i have to do is tell xlobby to execute one of those files, and there is your rs232 command.
i'll have xlobby execute dos command
type {filename}>lpt10:
or send the text directly from xlobby
echo a >lpt10:

i'm not sure about the echo, but it should work, been a while since i worked with DOS101,
lol

Re: Anyone have RS232 plugin?

PostPosted: Wed Nov 05, 2008 6:22 pm
by Jay
Don't know whether these actual work but there are some RS-232 events that come with XL (at least the commercial ver).

Example HDMI switch group, Input 1 event>send string >Com port >com3:9600:none:8:one > String to send> Port 1 \r

Anything like that in FreeLobby?

Re: Anyone have RS232 plugin?

PostPosted: Wed Nov 05, 2008 6:25 pm
by billberet
i didn't find anything, i was looking for that support in the free version.
but as long as i can access dos, i'm golden.
i can echo all my commands directly to the lpt port that gets redirected to the com port.
the whole trick is the lpt to com redirect at the hardware level, outside of xlobby.
essentually i'm printing to my com port.

i'll test it out tonight when i get out of work.
i made the configuration here on my work machine, and it was successful, the com port was sending a signal from the file i created.
but if i can use the echo, then i can bypass the files totally.

Re: Anyone have RS232 plugin?

PostPosted: Wed Nov 05, 2008 7:38 pm
by billberet
ok,

outside of xlobby, i forwarded lpt5 to com3 with the following command
MODE LPT5: = COM3:

you will get the following output;
Status for device LPT5:
-----------------------
Printer output is being rerouted to serial port COM3


in dos I created a batch file called A.bat
inside the bat file is one line of code, which is the 232 command
echo a >lpt5:
what this command does is print the letter 'a' to the printer port5 (which is redirecting to the com port 3)
on my gefen matrix, the letter 'a' is the command to send video1_input to video_3 output

in xlobby i created an event group called RS232
i added an event called Send_a ('a' is the letter i need to pipe thru com port)
in the Send_a event i added the OS/Execute file command and put a.bat as the filename and minimized as the window type
when i run the send_a event, the rs232 port of com3 gets 'a' sent to it.


now i have a directory full of rs232 command bat files.
i hope this helps anyone that needs to have rs232 connections

Re: Anyone have RS232 plugin?

PostPosted: Thu Nov 06, 2008 8:28 am
by dalanik
Why not just use Girder with RS232 plugin instead? Don't you already use Girder for remote cotrol?

Re: Anyone have RS232 plugin?

PostPosted: Thu Nov 06, 2008 2:55 pm
by billberet
you know,i never thought of using girder
i have usb-uirt for all the IR and my gefen was the first component i was converting over to rs232

i guess i could use girder, i will give it a try and see which is faster.
a straight blast from the bat file is very fast, no middleware to worry about.
just straight execute.

i have a question
i install the girder plugin in xlobby and it has rs232 support, now when i call the rs232 command does it query girder and girder runs the actual command, or does xlobby execute the plugin within xlobby straight to the rs232 port?
I'm just looking for the fastist route

just trying to understand how each plugin works.
thanks

Re: Anyone have RS232 plugin?

PostPosted: Thu Nov 06, 2008 7:40 pm
by Marbles_00
If I recall, in xlobby all your doing is sending message events, meaning, your sending the name of the girder command. So in girder you have your profile loaded with a list of all the commands and it just calls on the name and executes the actual command in girder.

I'm not the best with .bat files, but don't you have to contend with the dos window popping open breifly when executing a bat file? Or is there a way of executing the DOS window, without it flashing on the screen. I would think that alone would be pretty irritating over time.

Re: Anyone have RS232 plugin?

PostPosted: Thu Nov 06, 2008 8:28 pm
by billberet
sort of,
you can run the bat file minimized
this puts it in the task bar, but that is always hidden because of the xlobby window.
and it's just a flash, you see nothing if your machine is fast enough.

i don't see a thing and the bat files are executed before i release the button i pressed.
in xlobby when you execute a file, there is a place for window type, you just type 'minimized'


there is no reason to install and run girder for a simple serial command.
i can't justify the overhead of the entire program just to send serial commands. If you are using it for other things as well, then it's ok.
it's been working great for me

Re: Anyone have RS232 plugin?

PostPosted: Sat Nov 08, 2008 3:07 pm
by sharp_1
billberet wrote:i don't see a thing and the bat files are executed before i release the button i pressed.
in xlobby when you execute a file, there is a place for window type, you just type 'minimized'

You can also use the "hidden" command in the place for window type. Then you really wont see the DOS window pop up.

Re: Anyone have RS232 plugin?

PostPosted: Mon Nov 10, 2008 4:20 pm
by billberet
thanks,
that works great
even better than minimized.

now i wish all my components had serial connections, just makes things easier when you have a distinct code for on/off
as opposed to an IR blast which is just a toggle.

thanks for the info

Re: Anyone have RS232 plugin?

PostPosted: Mon Nov 10, 2008 5:21 pm
by Marbles_00
Sorry to hijack this thread, but...

8)...Because of this discussion, I found some .vbs scripts to run bat files silently. Now I've been able to expand the Hauppauge's remote capabilities by running these script/bat combinations in the irremote.ini file, so I can now press the "Video" button to take me directly to the movies screen, "Photo" to pictures, "Menu" to main menu, etc. on my MediaPVR.

Thanks guys for all the tips.

Re: Anyone have RS232 plugin?

PostPosted: Mon Nov 10, 2008 5:27 pm
by billberet
why not just use the hidden command and run file.
then you don't have to go thru the vbs script.
xlobby will execute the bat file directly.
i'm just always looking for the shortest easiest method, makes debugging easier.