WFS_CMD_CDM_RESET results in WFS_SYSE_HARDWARE_ERROR - cen-xfs

ATM is Wincor/Nixdorf model ProCash 1500xe USB.
i use CDM320.exe tool to test the dispense of the ATM. when i run Reset command under ExecuteAdmin menu i get the following output:
[10:23:54] WFSAsyncExecute ( WFS_CMD_CDM_RESET (321) ) returned WFS_SUCCESS (0) [ReqID: 87]
[10:24:04] Event WFS_SYSE_HARDWARE_ERROR (2) arrived
RequestID: 0
hService: 2
tsTimestamp: [MON 14.04.2014 06:54:04,156]
szLogicalName: CDM30
szPhysicalName: CDM30
szWorkstationName: ATM
szAppID: CDM320
dwAction: WFS_ERR_ACT_NOACTION (0x0000)
dwSize: 33
bDescription
StClass: 0x0000001D
StCode: 0x20001814
StWarn: 0x00000000
sDescription: CscCngReset; SCOD=14
szDescription HEX: 1D 00 00 00 14 18 00 20 00 00 00 00 43 73 63 43 6E 67 52 65 73 65 74 3B 20 53 43 4F 44 3D 31 34 00
[10:24:04] WFSAsyncExecute ( WFS_CMD_CDM_RESET (321) ) completed with WFS_ERR_HARDWARE_ERROR (-14) [ReqID: 87]
what's the problem and how can i resolve it?

This is probably a configuration issue or a genuine HW error like foreign object blocking sensor or a faulty sensor. Do you have a Wincor diagnostic software and if you do what it tells about the CDM?
PS. As I do not have experience from Wincor HW, this might be totally off the mark.

Related

Segmentation fault error while installing dynd-python in Python 2.7 environment

I am trying to install dynd-python using
conda install -c anaconda dynd-python
On Debian and getting the following error,
INFO startup-script-url: Downloading and Extracting Packages
INFO startup-script-url: Preparing transaction: ...working... done
INFO startup-script-url: Verifying transaction: ...working... done
INFO startup-script-url: Executing transaction: ...working... done
[ 232.714462] conda[6368]: segfault at 0 ip 00007f1a73d295a0 sp 00007f1a2723d6c0 error 6 in libpython2.7.so.1.0.c~ (deleted)[7f1a73c4d000+17d000]
[ 232.727548] Code: 08 4c 89 ff ff 50 30 49 83 2e 01 75 27 49 8b 46 08 4c 89 f7 ff 50 30 eb 1b 90 48 8d 50 f8 48 89 94 24 a8 00 00 00 48 8b 78 f8 <48> 83 2f 01 0f 84 29 41 00 00 48 8b 84 24 a8 00 00 00 48 39 44 24
kernel: [ 232.714462] conda[6368]: segfault at 0 ip 00007f1a73d295a0 sp 00007f1a2723d6c0 error 6 in libpython2.7.so.1.0.c~ (deleted)[7f1a73c4d000+17d000]
kernel: [ 232.727548] Code: 08 4c 89 ff ff 50 30 49 83 2e 01 75 27 49 8b 46 08 4c 89 f7 ff 50 30 eb 1b 90 48 8d 50 f8 48 89 94 24 a8 00 00 00 48 8b 78 f8 <48> 83 2f 01 0f 84 29 41 00 00 48 8b 84 24 a8 00 00 00 48 39 44 24
INFO startup-script-url: ./init_actions.sh: line 52: 3309 ***Segmentation fault conda install -c anaconda dynd-python***
INFO startup-script-url: BuildFailed: Custom Image Initialization Actions Failed. Please check your initialization script.
Using Python2.7
Any advice how to resolve this issue?
Thanks

Error `invalid distance too far back` when Inflate HTML gZIP content

I want to inflate HTML webpages. I am using zlib functions
inflateInit2(&zstream,15+32);
and then
inflate(&zstream,Z_SYNC_FLUSH);
It works for lots of webpages correctly but for "www.tabnak.ir" it does not work correctly.
invalid distance too far back is the ERROR I got for this website.
This webpage is also gzip and utf8.
How should I deal with that?
This is For Bing.com which works Fine
1f 8b 08 00 ef 8c 77 56 00 ff ec 5a eb 73 9c 46
12 ff 9e aa fc 0f 04 d5 9d ad 78 1f c0 3e b4 0b
96 52 b2 24 2b ba 73 1c 9d 2d 27 b9 8a af b6 06
This is For tabnak.ir which results in invalid distance too far back Error
1f 8b 08 00 00 00 00 00 00 03 ed fd db 73 5b d7
99 2f 8a 3e ab ab d6 ff 30 ac ae ac d8 3b 82 80
39 71 a7 6d 55 39 89 7b 75 f7 4a d2 7d 92 74 af
The zlib/gzip format performs compression saying things like "The next 22 bytes are the same as the 22 bytes we saw 1013 bytes ago.
In this case the record describing the repetition, is from before the size of the 'window'.
Given you have specified a maximum size of window, the likelihood, is that the data format has changed a bit, or the data you received is not the same as was sent.
Some things to check.
You are using the latest zlib library.
Standard utilities (e.g. gunzip, winzip) can decompress the data.
The data you are getting is not being mangled by a text filter ('rb' vs 'rt')
If that hasn't helped, try walking through the data and understanding what the failure in gzip is.
It would seem that the file you are trying to "inflate" (decompress using zlib) is not a valid zip file. Since bing.com is most likely not a zlib file, it might be pure coincidence that you found something quite early that prevented decompression.

SMPP client is adding an ¿ to the end of the message

I'm trying to make a Windows desktop smpp client, and it's connecting and sending well, aside from a bug where an extra character (¿) is added to the end of the message content that I'm receiving on my phone.
So I'm sending "test" but my phone receives "test¿". Here's the contents of the pdu object, just before it gets sent:
size :58
sequence :2
cmd id :0x4
cmd status:0x0 : No Error
00000000 00 00 00 3a 00 00 00 04 00 00 00 00 00 00 00 02 |...:............|
00000010 00 05 00 74 65 73 74 66 72 6f 6d 00 01 01 34 34 |...testfrom...44|
00000020 37 37 37 37 37 37 37 37 37 37 00 00 00 00 00 00 |7777777777......|
00000030 00 00 00 00 05 74 65 73 74 00 |.....test.|
0000003a
I'm using this c++ smpp library as a base:
https://github.com/onlinecity/cpp-smpp
I had to make some slight changes to get it working on windows, but I don't think anything was changed that could have affected this.
Someone else ran a test using a different account on the smpp server, and their test added an # symbol instead.
Any ideas what could be causing this? Thanks!
Found the problem in the end, it was due to an option in the smpp library that defaults to true, called nullTerminateOctetStrings
It was adding the 00 to the end of the message, sound slike this was required by the SMPP 3.4 standards, but our smsc didn't like it. I suppose ideally I would fix the smsc, but that's provided by a 3rd party, so I've just switched off the null terminate instead.
Someone with a similar problem and more info here: https://www.mail-archive.com/devel#kannel.3glab.org/msg06765.html

Detecting Memory Leaks in C++ Windows application

I have a C++ windows application which has some memory leak issues. Is it possible to analyze the memory leak from the dump using NTSD ? If so please guide me how to do that ?
I have also heard that we can do it using User Mode Dump. I am not very familiar with finding leaks in windows. It is very easy in Linux with Valgrind.
Is there any other better options to check this ?
see here for details about Visual Leak Detector. I have used it on Windows.
all you do in your application is to
#include <vld.h>
and you will see a report about detected leaks in terminal when debugging your program, something like this:
---------- Block 1199 at 0x04BE1058: 136 bytes ----------
Call Stack:
d:\Foobar\FooLog.cpp (26): FooLog::getInstance
d:\Foobar\FooMain.cpp (75): FooMain::init
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (578): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): WinMainCRTStartup
0x759A3677 (File and line number not available): BaseThreadInitThunk
0x770C9D42 (File and line number not available): RtlInitializeExceptionChain
0x770C9D15 (File and line number not available): RtlInitializeExceptionChain
Data:
9C 33 2D 6B 74 2A 2D 6B C8 11 BE 04 00 00 00 00 .3-kt*-k ........
00 00 00 00 70 14 BB 6C 70 14 BB 6C 00 00 00 00 ....p..l p..l....
00 00 00 00 68 14 BB 6C 68 14 BB 6C 00 00 00 00 ....h..l h..l....
00 00 00 00 6C 14 BB 6C 6C 14 BB 6C 20 12 BE 04 ....l..l l..l....
00 00 00 00 CD 00 CD CD 00 00 00 00 01 CD CD CD ........ ........
68 14 BB 6C 78 33 2D 6B 00 00 00 00 00 00 00 00 h..lx3-k ........
I've had great success tracking down memory and resource leaks with DrMemory. It works with both GCC and MSVC and it's very straight forward to use.

How to programmatically load a Java card applet ( a .cap file ) using Visual C++/PCSC

I am currentlly on a project that requires me to load a JavaCard application Applet ( a .cap ) file to a JavaCard. Our framework is based on Visual C++ and PCSC, so we need to load the same applet to a series of JavaCards. Does anyone know how this can be processed? I mean, where should I start. Thanks!
You are correct that this is not a trivial job.
There are differences between different javacards, but generally you need to do 4 things:
initialize secure communications with the card (because many javacards are "global platform" cards they require a secure channel)
send a command saying "i wanna install an applet"
send the binary data for the applet to be installed
send a command to "instantiate" the applet after the binary data is sent
I'd recommend using the eclipse plugin to install the applet initially, because you can see the APDUs generated by the plugin to do the steps above. Once you know the APDU commands you must send to install your applet, you can directly send these commands using the PCSC interface from your C++ code to automate installation on a large number of cards.
My company makes a web browser plugin called Card Boss for doing this kind of thing (card communications via pcsc) from a browser - there's a web page you can use where you can type your own APDUs and send them to the card at the follwing URL:
https://cardboss.cometway.com/content.agent?page_name=Card+Boss+Lab
If you use our tool, your applet installation script should look something like this (note that this is a script for a JCOP card using the default jcop keys)
MESSAGE BOX Installing applets...
INIT CHANNEL 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f, 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
// INSTALL CAP:
SEND 80 E6 02 00 1D 10 A0 00 00 00 09 00 03 FF FF FF FF 89 10 71 00 01 08 A0 00 00 00 03 00 00 00 00 00 00
// LOADING CAP:
SEND 80 E8 00 00 FA C4 82 01 03 01 00 25 DE CA FF (snip, I removed a bunch
of binary data representing the cap file to shorten this post, and you might
need multiple SEND commands because of limits on the size of APDUS)
// INSTANTIATING Applet
SEND 80 E6 0C 00 1E 05 63 6F 6D 65 74 07 63 6F 6D 65 74 00 01 05 00 00 00 00 00 01 00 06 C9 04 68 2C 00 03 00 00