--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/02f6bccf-d8cf-4591-a5d9-7e6fe82cd692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You need to read your spec… Sending the message might be easy, receiving it might be another story altogether. Your protocol might depend that upon receiving a data frame, you calculate the incoming lrc and acknowledge (ACK) or reject (NAK) the message, where the sending device might retry for a couple of times and if the decoding fails (maybe because of a bad line!), it will end the transmission (EOT) and hangup! So you need to tune in to your protocol spec, and figure out if you’ll need to respond with ACK,NAK and manage enqueues (ENQ) and “end transmissions” (EOT).
If it’s just simple framing (STX/ETX at send), you can override sendMessageLength/sendMessageTrailler. BTW, you’re overriding the wrong method.. you want to override the method with signature:
protected void sendMessageTrailler(ISOMsg m, byte[] b) throws IOException
so you can calculate the lrc from the packed message in “b”.
/V
--
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/39bf4498-6710-4eda-a196-c28b2ba9bb13%40googlegroups.com.
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/14ee0125-c409-4aaf-ab9a-50127abc48ab%40googlegroups.com.
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/02f6bccf-d8cf-4591-a5d9-7e6fe82cd692%40googlegroups.com.
June 26, 2015 at 3:16 AM
Hi,I followed Victor's class (https://gist.github.com/vsalaman/b02f9794a7bcc7f7b36d) and found the custom streamReceive() method should be invoked to read the response containing STX and ETX.Below is the code from receive method of BaseChannel and flow went into readHeader() everytime, however I think, it should not go into it.int len = getMessageLength();int hLen = getHeaderLength();if (len == -1 ) {if (hLen > 0) {header = readHeader(hLen);}b = streamReceive();}Please suggest.
On Tuesday, June 23, 2015 at 12:35:37 PM UTC+5:30, rahul singh wrote:
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/4078e176-006d-4292-b9e9-a145d7b27353%40googlegroups.com.
June 23, 2015 at 3:05 AM
My message format is given below:02 +2 bytes BCD(body length) + body + 03 +LRCFor example02012760008000000200 7038040000CB10111686 21380000000024290000 0000000001000010781628451504150210303137 31303036373838303530 30303030303030313731 0530303030350006303030303032000630303031 3037AFC5A3C312A0BAD4 00203030303030303030 3030303030303030303030309334B2D4B0DAFFB5 03FFCan anybody please help me how to send this message?Initial attempt I have made, i have overridden following 2 methodsprotected void sendMessageLength(int len) throws IOException {serverOut.write (2); //TO SEND 02 mentioned at start of message.serverOut.write (len >> 8);serverOut.write (len);}protected void sendMessageTrailler(ISOMsg m, int len) throws IOException{serverOut.write (3);serverOut.write (255); // TO SEND 03 FF at the end of message}However, these seems not working. Any suggestion will be highly appreciated.Thanks,Manoj
June 26, 2015 at 5:28 AM
Thanks Victor, It helped.I have not defined any explicit header and it seems working now. However I have message like below:60 00 00 00 80 02 10 30 20 00 00 02 80 00 19Initial 5 bytes are TPDU followed by MTI and bimap.After reading the entire message, jpos started parsing the message including TPDU as well, however I need to exclude the TPDU value (60 00 00 00 80 ) and then parse.How should I do this, please suggest.Thanks,
On Tuesday, June 23, 2015 at 12:35:37 PM UTC+5:30, rahul singh wrote:
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/c0aac7c5-99f8-4cd2-bc3e-46cacf91bac5%40googlegroups.com.
June 23, 2015 at 3:05 AM
My message format is given below:02 +2 bytes BCD(body length) + body + 03 +LRCFor example02012760008000000200 7038040000CB10111686 21380000000024290000 0000000001000010781628451504150210303137 31303036373838303530 30303030303030313731 0530303030350006303030303032000630303031 3037AFC5A3C312A0BAD4 00203030303030303030 3030303030303030303030309334B2D4B0DAFFB5 03FFCan anybody please help me how to send this message?Initial attempt I have made, i have overridden following 2 methodsprotected void sendMessageLength(int len) throws IOException {serverOut.write (2); //TO SEND 02 mentioned at start of message.serverOut.write (len >> 8);serverOut.write (len);}protected void sendMessageTrailler(ISOMsg m, int len) throws IOException{serverOut.write (3);serverOut.write (255); // TO SEND 03 FF at the end of message}However, these seems not working. Any suggestion will be highly appreciated.Thanks,Manoj