Anyone have RS232 plugin?

Xlobby plugin development

Anyone have RS232 plugin?

Postby billberet on Tue Nov 04, 2008 8:12 pm

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
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby lpg on Wed Nov 05, 2008 2:32 am

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
lpg
 
Posts: 314
Joined: Thu Apr 14, 2005 8:17 pm
Location: Chicago

Re: Anyone have RS232 plugin?

Postby billberet on Wed Nov 05, 2008 3:24 pm

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.
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby billberet on Wed Nov 05, 2008 6:16 pm

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
Last edited by billberet on Wed Nov 05, 2008 6:24 pm, edited 1 time in total.
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby Jay on Wed Nov 05, 2008 6:22 pm

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?
Jay
 
Posts: 950
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Re: Anyone have RS232 plugin?

Postby billberet on Wed Nov 05, 2008 6:25 pm

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.
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby billberet on Wed Nov 05, 2008 7:38 pm

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
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby dalanik on Thu Nov 06, 2008 8:28 am

Why not just use Girder with RS232 plugin instead? Don't you already use Girder for remote cotrol?
dalanik
 
Posts: 886
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Re: Anyone have RS232 plugin?

Postby billberet on Thu Nov 06, 2008 2:55 pm

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
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby Marbles_00 on Thu Nov 06, 2008 7:40 pm

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.
Image
Mayhem Creations
where my:
    -Music Distribution
    -HTPC
    -MediaPVR
    -UnRAID box
    -OTA
are all discussed.

Xlobby Free Zone
Marbles_00
 
Posts: 1882
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Anyone have RS232 plugin?

Postby billberet on Thu Nov 06, 2008 8:28 pm

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
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby sharp_1 on Sat Nov 08, 2008 3:07 pm

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.
sharp_1
 
Posts: 633
Joined: Tue Jan 31, 2006 1:01 am
Location: Wisconsin

Re: Anyone have RS232 plugin?

Postby billberet on Mon Nov 10, 2008 4:20 pm

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
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Re: Anyone have RS232 plugin?

Postby Marbles_00 on Mon Nov 10, 2008 5:21 pm

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.
Image
Mayhem Creations
where my:
    -Music Distribution
    -HTPC
    -MediaPVR
    -UnRAID box
    -OTA
are all discussed.

Xlobby Free Zone
Marbles_00
 
Posts: 1882
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Anyone have RS232 plugin?

Postby billberet on Mon Nov 10, 2008 5:27 pm

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.
Image
billberet
 
Posts: 738
Joined: Mon Sep 29, 2008 9:26 pm
Location: NYC

Next

Return to Plugins

Who is online

Users browsing this forum: No registered users and 2 guests

cron