jcbiznoff / iso8583py

Automatically exported from code.google.com/p/iso8583py
0 stars 0 forks source link

ISO8583 -TPDU problem #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Q1:ISO8583 structure problem
  ISO8583 is the structure : msg-len+TPDU+MSG
  I test your module. I do not find it(TPDU).  

Q2: ISO8583 sending message:
1.msg_len  is nible  type
2.MTI is nible type also. e.g MTI='0200'
3.F41/F42 is char type.e.g F41='12345678'
So,After  the step ,message = iso.getNetworkISO().
If I use binascii.b2a_hex(message),
 MTI is 0200, F41 should be 31323435363738.

Original issue reported on code.google.com by yehrayyeh on 2 Sep 2009 at 2:59

GoogleCodeExporter commented 8 years ago
Hi, 

About Question 1:

By default ISO8583 ASCII TCP/IP dosen't have TPDU.
If you want to add this funcionality, you can work with "getRawIso" and build 
your
msg-len+TPDU+rawIso

About Question 2:

ISO8583py only work with ASCII ISO8583.
If you see a "number" inside the bit, it will be interpreted as ASCII. By 
example, 1
is \x31 always. 
Please read the documentation in
http://www.vulcanno.com.br/python/ISO8583.ISO8583.html to see details.

The method binascii.b2a_hex(): "Return the hexadecimal representation of the 
binary
data." 
(http://docs.activestate.com/activepython/3.1/python/library/binascii.html)
but ISO8583 is ASCII and not binary.... So this use was not correct.

Original comment by igo...@gmail.com on 2 Sep 2009 at 11:23