Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: HELP! What is this?
Jason123
fowlerjp@hotmail.com

From: Pittsburgh, PA USA
Posts: 5
Member Since: 04/26/03
posted April 26, 2003 10:33 AM

I consider myself a mid to advanced level VB.Net programmer and I catch on pretty quick, but this is kicking my A$$. I have been learning with the Power TCP for a month now developing a popup client notification for an internal application. That is going well I am communicating messages and I though I knew TCP “socket” programming. Then someone drops this on my desk and tells me we need to talk to this thing and here is the documentation. They provide a sample that looks like nothing I have ever programmed. Take a look at this message sample.

Hex Data                ASCII Equivalent
-----------------------------------   ------------------
ff00aa55 0000001c 00100011 32313230   |...U........2120|
00000000 00010001 55aa00ff       |........U...  |

The message breakdown is:

FF00AA55 Start Pattern
0000001C Message Length
0010 Extended Header length
0011 Function - Positive ACK
32313230 Validation Code - echoed from the input message
00000000 Data length - zero
0001 Status Code (meaningless)
0001 Destination (always 1)
55AA00FF Stop Pattern

Can anyone tell me what I am looking at here? What are they sending Hex, ASCII? There is a bunch of about stream programming and the start and end pattern. I am lost what do I need to pick to get a grasp on this?
cambler

From: Redmond, WA USA
Posts: 102
Member Since: 04/14/03
posted April 27, 2003 1:32 AM

Oh, you bring back memories :-)

What you're looking at is bytes-on-the-wire protocol. These days, of course, almost everything going across the wire is simple text. XML, even, which is bloated by comparison. But back in the day, protocols were made to be short and to the point, and to accommodate errors.

So what I see here is a protocol that has both start and stop patterns, so you can frame up a "genuine" message. So you watch for the start pattern, gather data until you see the stop pattern, and then process the data in between.

What's in between... 4 bytes (a 32-bit integer) representing the message length. 2 bytes giving "extended header length" and the 2 more bytes specifying a function. My guess is that there are many functions, and "Positive ACK" is one of them. Based on that, I'd wager there's a NAK (negative ack(nowledgement)) as well.

Next we see 4 bytes of "validation code." My guess is that when you send a message, you provide one, and they echo it to show you that they got it okay. That makes sense, given that this function is an ACK. My guess would be that these 4 bytes will correspond to whatever the command is. This might be related to the "extended header length" part... or not.

Data length of zero is bad for you, as you now have no indication of *where* the data would go, if there were any.

The next 2 bytes are meaningless (as shown), and the 2 after that are always 1. That's nice.

Then you have your stop pattern.

My guess is that this protocol is pre-1991, at the latest. It reminds me a bit of some of the old error-correcting UUCP protocols.

So what you have here is one message. Do you have a list of possible functions? From this, you can only code for the one function, and not well at that, since you don't know where data goes, if there is any. But again, this isn't a network protocol as such, this is what the *message* going over the wire looks like.

I did this stuff for, oh, gee, at least 10 years in the 80's and early 90's. I helped design some of the UUCP protocols, back when the Internet was young :-)

Christopher
Alex Gladshtein



From: Rome, NY USA
Posts: 131
Member Since: 12/27/00
posted April 27, 2003 10:51 PM

Hello,

Christopher basically descibed what you are creating. This isn't that unusual for protocols based on TCP. In fact, many of our customers work on projects similar to yours. If you require assistance with the protocol itself, you may want to consider a support package or you can even hire Dart to write the higher level protocol for you if that becomes necessary. In any case, make sure they provide you with all the commands you need and that you understand what this protocol is attempting to do from a bigger picture.

Regards,

Alex Gladshtein
Dart Communications
Jason123
fowlerjp@hotmail.com

From: Pittsburgh, PA USA
Posts: 5
Member Since: 04/26/03
posted April 28, 2003 8:41 PM

Hey,
Thanks for the responses, although I am starting to get a little woozy. Yeah, from I can tell this is a low level protocol to allow the transfer of data packages. There are a number of protocol commands (NAK,ACK,..bad message blah blah). This protocol I guess is the train and caboose around the data. Now the sales people really sold the data part and stressed that everything was in XML the great universal end all be all. I had envisioned that the ability to handle the XML processing but I guess the protocol development was over looked.

So Alex, Is this something I would use Dart TCP for? Any suggestions on how to get started. I clicked on your links and I am guessing I want the “Elite Support”? Or I may need more help hun?

Thanks
Alex Gladshtein



From: Rome, NY USA
Posts: 131
Member Since: 12/27/00
posted April 28, 2003 10:01 PM

Hello,

Basically you would use the PowerTCP products just for this sort of thing. How you want to proceed with respect to support vs. something more really depends on you. You can hire us to virtually do the whole piece that you would just take and plug in to your solution or you could get something like Elite support, and while you would be doing the work yourself, we would be answering all your questions and helping you out with code snippets and explanations of how things should be done. It really depends on your deadline, comfort level, and resources. The data that moves on top of the TCP protocol can be XML or any other format. Is there a server already out there that talks this language or are you doing both ends? If there is something out there and you can test against it, try sending it some simple messages and see how it responds. Use a sniffer, such as Ethereal, to watch the network conversation. Good luck.

Regards,

Alex Gladshtein
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX