in reply to Re^2: Aci Base24-eps (on IBM AIX)
in thread Aci Base24-eps (on IBM AIX)

Try setting  $/ = \1;, that will cause your code to get 1 character at a time and at least show you that it is receiving something (or not).

Once you see that you're receiving stuff, you can try adjusting it (say: $/ =\4;) and maybe it'll allow you to work out how the packets are delimited.

Mind you, you ought to be able to work that out from the wireshark traces you mentioned.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^4: Aci Base24-eps (on IBM AIX)
by naija_coder (Initiate) on Mar 02, 2010 at 17:58 UTC
    Thanks BrowserUK, your code works like charm, however, I now have this knotty problem - socket headers. How can I force the socket NOT to send header information? The Base24-eps trace log is capturing the header info sent by the socket and junking my iso8583 messages. The socket headers are being sent by the socket captures the destination, my ip, sending port and other info.

      Glad to have helped--but I'm not sure if I can be of much further help. All I know of your problem is what I've just read as a result of your mentioning ISO-8583.

      How can I force the socket NOT to send header information? The Base24-eps trace log is capturing the header info sent by the socket and junking my iso8583 messages.

      I think you may have some quite deep misunderstandings of what you are dealing with. (Or they could just be my misunderstandings! Consider yourself warned:)

      Sockets don't "send header information". Tcpip wraps data sent via sockets into 'packets', which include headers that carry your IP. But there is no way to turn these off, because without them, your data would never reach its destination. Consider those wrappers like the envelope in which you put a note to your mother: "Dear Mum, I won't be home until friday. Love Naija". Post that note in a postbox without an envelope carrying your mother's address, and there's no way she's ever going to get it.

      But the point is, you don't need to prevent the headers being transmitted, because they will be stripped away by the tcpip stack at the other end, before your server ever sees them!.

      I think the reason your "Base24-eps trace log" (which you alternatly referred to as "the runtrc log" in a /msg), is because whatever that tool is, it is running at one level (or more) below the socket layer of the tcpip stack on the server. Essentially, you are looking in the wrong place to see what your server is actually receiving via the socket at it's end.

      It would be useful (ie. might get you more responses from those that know), if you posted the (few lines) of code where you first construct, and then send the packet to the server. This might allow someone to diagnose your problem further.


      As an aside, if you are not already locked in to Perl for the work you are doing, you might consider using another language. At the bottom of the wikipedia page I linked above, there is a list of links to language binding to ISO-8583, unfortunately Perl is conspicuous by its absence. But python, Ruby and PHP all show up there, along with the heavyweights of Java and .NET

      Alternatively, if you have the skills, or the money to purchase them, you might consider writing a Perl wrapper package around the OSS C implementation listed there, and contribute it to CPAN so other Perlers don't face the same dilemma.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Actually I've successfully used JPOS (a Java based ISO8583 library) to connect to the BASE24-eps. Am just trying to work on a 'lightweight' iso8583 encoder/decoder in Perl (which I love so much).

        When sending from JPOS the header info are stripped off, so I 'thought' there should be a way in Perl to either strip off the headers or send the headers in a way that the Base24-eps server will 'understand' the headers and strip them off without junking my message.

        Look at it this way, when sending letters to my mum I always fold the paper in a special way and sign the envelope in such a way that my mum can trust the letter is actually from me.

        While Wireshark successfully reconstructs my message, Base24-eps on the other hand is junking the same messaging. am not giving up, but I may as well continue with JPOS while trying to figure out what is NOT happening.