Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Send Data using SRP_TcpClient

Hi,

I want to communicate with EDC Machine (Credit Card Machine) from OI using SRP_TcpClient.
Below is my code but when I run nothing happened.
Can I use SRP_TcpClient to send data to EDC Machine or Do I miss something ?
My SRP Uilities.dll version is 2.0.2

Data = \0201500130313030303030303031303030303030303030303030303030302020202020202020202020202020202020202020202020303030303030303020202020202020204E2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020031D\
EncodedData = SRP_Encode(Data, "HEX")

TcpClientHandle = 0
If SRP_TcpClient(TcpClientHandle, "CONNECT", "192.168.10.88", "80") Then

SRP_TcpClient(TcpClientHandle, "SEND", EncodedData)

SRP_TcpClient(TcpClientHandle, "CLOSE")
End



Thank and Regards,


Albert K

Comments

  • I presume by "nothing happened," you mean to say that the machine didn't react. I can't really troubleshoot with this information because I can't determine if nothing happened because the machine didn't like what you sent or if the machine never got what you sent. And if it didn't get what you sent, I can't say if that's because SRP_TcpClient did something wrong or if the network failed. There is a lot to diagnose before I can give you a good idea as to what went wrong.
  • How about starting with some basics. Do you get a valid TcpClientHandle from the CONNECT service?
  • oops, sorry. It's my mistake. I shouldn't convert the data to HEX, because the data already in HEX.
    Now the SRP_TcpClient works perfectly. Thanks. Awesome tool.
Sign In or Register to comment.