Paylink with Debian (Linux)

Support for the Milan Intelligent interface, sold by Money Controls as the Paylink USB unit and for the earlier PCI card version.

Moderators: aardvark, davebush, Admin

Post Reply
Tony
Posts: 7
Joined: Wed Jul 18, 2007 1:23 pm

Paylink with Debian (Linux)

Post by Tony »

Hello,
We are setting up your paylink system with Debian Linux. Well all went fine and we’ve finally got round to working on the video system full time.

However We’ve hit a couple of snags which I hope you can help talk us around. First when I try to compile using Aesimei.h I get a conflict with type “BOOL” which is first defined in the /usr/include/x11/xmd.h and file /usr/include/wintypes.h, X11 is used by Debian (linux) for screen draw etc. I’ve got round this by commenting out the wintypes.h define, which I presume will cause no errors? With that commented out code will compile.
I run the demo and it works fine.

So on to my first test. I start the aeswdriver, then run a bit of test code where I open the mei and enable the interface first, I then read the dispensers and print the findings. I’ve got a single azkyone cc talk hoper on cc tslk id 3, so it should be a pound? However when I read out the dispenser structure values it appears to be mixed up, it shows in print out (and through a debugger)
OK open
Unit 16909313
InterfaceNumber 1
UnitAddress 2
Value 3
Count 100
Inhibit 0
Currency 0
Coin count 0
Coin Count st 0

>From the code
for (i=0,serial=0; ReadDispenserDetails(serial, &Dispenser); serial++,i++)
{

printf("Unit %ld \n",Dispenser.Unit);
printf("InterfaceNumber %ld \n",Dispenser.InterfaceNumber);
printf("UnitAddress %ld \n",Dispenser.UnitAddress);
printf("Value %ld \n",Dispenser.Value);
printf("Count %ld \n",Dispenser.Count);
printf("Inhibit %ld \n",Dispenser.Inhibit);
printf("Currency %ld \n",Dispenser.Currency);
printf("Coin count %ld \n",Dispenser.CoinCount);
printf("Coin Count st %ld \n",Dispenser.CoinCountStatus);
}

The first thing which strikes me is shouldn’t the unit value be 100 and unit address be 3? It seems mixed up.
Also if I try to read the status variable I get an error using using printf("Status %ld \n",Dispenser.Status);

Gives Source/PayLinkSystem.c:170: error: syntax error before "int"


We’re really keen to use your system but are under real time constraints now, can you give me some pointers on the above.
davebush
Posts: 492
Joined: Fri Oct 22, 2004 12:20 pm

Post by davebush »

At first glance it looks as though the string Status is #defined as something else which manages to compile in the definition (so it doesn't allocate space), but not in the printf.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
Tony
Posts: 7
Joined: Wed Jul 18, 2007 1:23 pm

Post by Tony »

Just let you know it’s defiantly a library problem. If I take out all my graphics stuff (not shown) and the X11 and OpenGL libraries the the uncomment the define of BOOL from it all works fine.
So it seems either one of your libraries -lm -lrt -laes_ftdi -laes_access -lftd2xx -lstdc++ confilits with the X11 or OpenGL libary. It looks like BOOL is defined as different sizes in both? So if I leave your define my graphics are wrong if I use the X system define paylink tables are shifted to wrong places.
Tony
Posts: 7
Joined: Wed Jul 18, 2007 1:23 pm

Post by Tony »

Have any of you developers had the chance to check this out yet?
Were really keen to use your product, but I need to write the low level drivers ASAP our graphics artist start next month so I’d like to have most of this coin stuff out of the way by then.

Is it possible to have a chat with yourself or any development engineers about compatibility with Debian Etch? I’ve got it working (well when no OpenGL graphics are involved) however there’s a couple of compatibility issues Which I’m sure would be would be easy to sort out.
davebush
Posts: 492
Joined: Fri Oct 22, 2004 12:20 pm

Post by davebush »

First a disclaimer - I am not a "Linux developer" - the Linux support was written for us by a 3rd party and so a) it's not easy for me to try anything and b) I can't say anything about the difference between Distros.

To the best of my knowledge, the #include of wintypes.h is not necessary for the compilation of a user program. You could therefore comment out the line in Aesimei.h and compile user programs without a problem. Please try this and see if it's true.

So far as I know you don't have to compile anything else to make the system work - which means that wintypes.h will then not be necessary for anything.

Going back to your original test, what happens if you add a diagnostic of the value of "Status" after "Unit":
printf("Status%ld \n",Dispenser.Status);
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
Tony
Posts: 7
Joined: Wed Jul 18, 2007 1:23 pm

Post by Tony »

I tried commenting out wintypes from aesimei but get another problem, basically the compiler complains about a link error saying the library is compiled using libstdc++.so.5 while linker and openGL is trying to run libstdc++.so.6. On checking on the net this is a problem reported for other software which has to be changed. Basically I think in windows terms the Dll is compiled with VC6 and your software is running on .net. So there is a chance of problems. I think this comes down to having to use libstdc++.so.5 to compile the library with, you may remember I had a couple of problems doing this. It will all work fine until you need to link your code with another library which uses libstdc++, which the openGL and X11 libraries do, the problem is these are compiled with the latest version, version 6+.
Is it possible your third party can mod the software to be compatible with newer libraries, this would be useful for anyone developing in Linux.


As for my other problem with status this is simply to do with bool having two different definitions, if I don’t call the opengl or x11 libaries it works fine Unfortunately I need to use both of these as my game graphics are 3d.

Thanks any advise is appreciated.
Tony
Posts: 7
Joined: Wed Jul 18, 2007 1:23 pm

Post by Tony »

I removed win_types from Aesimhei.h and tried to recompile, I still got:
gcc -Wall -pedantic -g common/ModelLoader.c common/Error_Handler.c common/Task_Manager.c common/Test_Control.c ReelDriver/Video_16Step.c Source/HardwareConfig.c Source/main.c Source/VideoReel_Driver.c Source/ReelBands.c Source/PayLinkSystem.c -o PayLink -l3ds -lgame -lGL -lGLU -lXxf86vm `sdl-config --libs` -lSDL_image -lSDL_mixer -lm -lrt -laes_ftdi -laes_access -lftd2xx -lstdc++
/usr/bin/ld: warning: libstdc++.so.6, needed by /usr/lib/libGLU.so, may conflict with libstdc++.so.5
I tracked this down to the fact that all the paylink examples call a set of libraries in the makefile, at the end of this list it calles lstdc++, this is not needed and causes the c++ version errors. Just take this out of the makefiles for all the examples and it will work fine.
Post Reply