473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

WinLirc problem, Sends stuff two time???

I am using winLirc to receive date from my Packard Bell Fast media IR
remote. The problem I have is that Winsock1_DataArrival(ByVal bytesTotal As
Long) Is called two times almost every time I press a button on my
remote.Way is it doing that???
This is the code I am using but I don't know how has made it...
It works fine and i can make WinAmp5 play, stop, Next and back etc with a
few adds to it. The problem is that the Winsock1_DataArrival some times, not
always, think that I have pressed a button on my remote two times... This
makes WinAmp Next and back not that good...

WinLirc shows with a green button when I press the remote and it blink green
ones each time I press a button.

Is it something in WinLirc or is it how WinLirc translate my remote that is
wrong?
Or is it in this code???

Plz help me I wold be so happy if I could program my remote with the use of
winLirc

Option Explicit
Dim Counter As Integer

Private Sub Form_Load()
Counter = 1
Dim strLocalIP As String

strLocalIP = Winsock1.LocalIP
Winsock1.Protocol = sckTCPProtocol
Winsock1.RemoteHost = strLocalIP
Winsock1.RemotePort = 8765
Winsock1.Connect

End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)

Dim strData As String
Dim strRemoteHex, strRemoteName, strRemoteKey As String
Dim intRemoteIdx, intSeperatorOne, intSeperatorTwo As Integer

Winsock1.GetData strData, vbString
Text1.Text = strData 'Messagestring from WinLirc

strRemoteHex = Left(strData, 16)
intRemoteIdx = Val(Mid$(strData, 18, 2))

intSeperatorOne = InStr(21, strData, " ", vbBinaryCompare)
strRemoteKey = Mid$(strData, 21, intSeperatorOne - 21) 'Code of the Key
from Remote Control

intSeperatorTwo = InStr(intSeperatorOne, strData, Chr(10),
vbBinaryCompare)
strRemoteName = Mid$(strData, intSeperatorOne + 1, (intSeperatorTwo -
intSeperatorOne) - 1) 'Name of the Key - defined in WinLircServer

Text2.Text = "KEY:" & strRemoteKey & " Control:" & strRemoteName

End Sub

Yours, Jonas
Jul 17 '05 #1
1 3886

There was a repeat in the WinLirc Config file that I deleted to solve that
problem...

But I need to be able to hold down the Volume button on my remote so it will
repeat but sens I have deleted the repeat from the config file it will of
cause not work... :(

Instead I need to have the repeat in the config file and be able to just
take out the Initial signal from the remote and not the repeat signal.

How do I do that?
"BadOmen" <ba*******@hotmail.com> skrev i meddelandet
news:vN********************@newsc.telia.net...
I am using winLirc to receive date from my Packard Bell Fast media IR
remote. The problem I have is that Winsock1_DataArrival(ByVal bytesTotal As Long) Is called two times almost every time I press a button on my
remote.Way is it doing that???
This is the code I am using but I don't know how has made it...
It works fine and i can make WinAmp5 play, stop, Next and back etc with a
few adds to it. The problem is that the Winsock1_DataArrival some times, not always, think that I have pressed a button on my remote two times... This
makes WinAmp Next and back not that good...

WinLirc shows with a green button when I press the remote and it blink green ones each time I press a button.

Is it something in WinLirc or is it how WinLirc translate my remote that is wrong?
Or is it in this code???

Plz help me I wold be so happy if I could program my remote with the use of winLirc

Option Explicit
Dim Counter As Integer

Private Sub Form_Load()
Counter = 1
Dim strLocalIP As String

strLocalIP = Winsock1.LocalIP
Winsock1.Protocol = sckTCPProtocol
Winsock1.RemoteHost = strLocalIP
Winsock1.RemotePort = 8765
Winsock1.Connect

End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)

Dim strData As String
Dim strRemoteHex, strRemoteName, strRemoteKey As String
Dim intRemoteIdx, intSeperatorOne, intSeperatorTwo As Integer

Winsock1.GetData strData, vbString
Text1.Text = strData 'Messagestring from WinLirc

strRemoteHex = Left(strData, 16)
intRemoteIdx = Val(Mid$(strData, 18, 2))

intSeperatorOne = InStr(21, strData, " ", vbBinaryCompare)
strRemoteKey = Mid$(strData, 21, intSeperatorOne - 21) 'Code of the Key from Remote Control

intSeperatorTwo = InStr(intSeperatorOne, strData, Chr(10),
vbBinaryCompare)
strRemoteName = Mid$(strData, intSeperatorOne + 1, (intSeperatorTwo -
intSeperatorOne) - 1) 'Name of the Key - defined in WinLircServer

Text2.Text = "KEY:" & strRemoteKey & " Control:" & strRemoteName

End Sub

Yours, Jonas

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nigo | last post by:
Hi there Is it posible to make a link (to a php-file on a server) in an email that, when you click on it, sends info about who the reciver of the email is? Lets say I send out an email thru...
2
by: Tim Simmons | last post by:
I am stumped. I encoded the action = of my form using GET and I can't seem to get the property/value stuff from it using a JavaScript script I got from the web. I want to create a trivia game...
3
by: ferbar | last post by:
Hello all, This may sound pretty basic stuff.. but I'm working on a socket example whose client seems to work fine, but the server doesn't send to the client the expected result. The problem is...
7
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate...
4
by: Sačo Zagoranski | last post by:
Hi! I'm writing a simple 3D First person shooter game. It is a multiplayer game, where all the players connect to one server.
14
by: Jim Michaels | last post by:
mysql_query("START TRANSACTION", $link2); $q2=mysql_query("SELECT pictures.pid AS pid FROM pictures,counter WHERE pictures.pid>counter.pid LIMIT 1", $link2); if ($row2=mysql_fetch_assoc($q2)) {...
102
by: hug | last post by:
www.webmaster, was suggested that this ng could be a better place.] I've updated my test server to handle if-modified-since. I've noticed that the (old copies I run of) IE and Netscape seem...
20
by: Pete Marsh | last post by:
Wondering if anyone can see an error with this script. I get a server configuration error. THat could mean a module is not being loaded, but maybe there's a syntax error here, can anyone spot it?...
7
by: Peter Laan | last post by:
Is there a simple way to encapsulate the functionality to redo a method call a second time in case a specific exception is thrown? We are sending commands to an external system and if the sessionId...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.