PDA

View Full Version : DeviceLink -Help with UDP socket please



BM357_Hawki
11-15-2004, 02:36 PM
I have been able to use an activex socket control to connect to the DeviceLink interface in VB6 but it seems as if this control sends out the UDP string data in Unicode format ie. each character is sent out as 2 bytes instead of the ANSI 1 byte per character.

When DeviceLink is reading the incomming data from the UDP Packet does it expect the string values to be in 2 byte or 1 byte format?

Can you please post some more detailed on the information on the DeviceLink interface not covered in the DeviceLink.txt file.

Thanks for DeviceLink can't wait to use it to interface it to my planned hardware controllers for interfacing to the program.

BaldieJr
11-15-2004, 07:21 PM
Send the strings exactly as listed.

43 would be 43

Someone else used VB6 to talk to devicelink, maybe they can shed more light on the subject.

WB_Outlaw
11-15-2004, 07:34 PM
I haven't had a problem using the winsock control in VB6 with DeviceLink. I just build the query string and send it out.

Your system may be looking at some locale info to determine what character set to use.

Outlaw.

BM357_Hawki
11-16-2004, 07:10 AM
Thanks for the reply's http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

The control I am using has so many options with it that I am not sure what might be causing the DeviceLink interface not to read the packet.
Could be the programming options available like "Blocking" etc.

Back to square one, the host parameter in the [devicelink] section should that be set to the client computers IP? I am running my client on a different computer than the IL2 devicelink server.

Would love to see the connection code that you have written so that I can adapt it to my hardware, if thats ok with you.

I'll post my code tonight on this thread if I don't figure it out.Thanks again.

BBB_Hyperion
11-16-2004, 09:00 AM
Use Winsock mswinsck.ocx control for communication with it works fine did this in vb6 for the datapoller tool.

Object={248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0; mswinsck.ocx

For request dont use chr(13) chr(10) thats why i commented out the vbcrlf

Winsock1.SendData abfrage + "/20" '+ vbCrLf

Dont forget to set right protocol

Winsock1.Protocol = sckUDPProtocol
Winsock1.LocalPort = 5000
Winsock1.RemotePort = 10000
Winsock1.RemoteHost = Winsock1.LocalIP

for example .)

BM357_Hawki
11-16-2004, 05:07 PM
Just read the thread tonight thanks for the help.

It seems as I forgot to use the conversion from a unicode byte string to a ansi byte string

eg sendbuff = strconv(text3.txt, vbFromUnicode)

Now the interface is working. Thanks again for the help. To bad we don't have our own section for hardware/software interfacing.

Cheers happy Flying

larryh2013
12-03-2013, 02:17 PM
Just read the thread tonight thanks for the help.

It seems as I forgot to use the conversion from a unicode byte string to a ansi byte string

eg sendbuff = strconv(text3.txt, vbFromUnicode)

Now the interface is working. Thanks again for the help. To bad we don't have our own section for hardware/software interfacing.

Cheers happy Flying


Hi there BM357_Hawki ,

Is there any chance of getting your source code, or just part of it so I can get going in VB6. Sorry to resurrect such an old line

best
Larrybh