Linux support - Ubuntu 12.04

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

hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Linux support - Ubuntu 12.04

Post by hsiehlc »

Hello,
Does paylink support Linux Ubuntu 12.4 now? or does it still just support Linux kernel version 2.6 only?
We have development project using want to use Paylink on a Linux platform.
I have tried downloaded PaylinkSourceDist and did the "config" and "make install" on LinuxDemo directory and then when I run AESDemo at the src directory, it just prompt a window says "Error opening Paylink device"
Thanks for helping.
Richard
davebush
Posts: 490
Joined: Fri Oct 22, 2004 12:20 pm

Re: Linux support - Ubuntu 12.04

Post by davebush »

Sorry for the delay.

I suggest you start with command line programs - if you want to use Java, I suggest you try to get Tester.java in PaylinkSourceDist/PayLink/Java/Tester from PaylinkSourceDist.tar.gz working. If you're using C, then CoinRead from PaylinkSourceDist/PayLink/CoinRead.

The next part is to get the Driver program AESCDriver running.

When that has reported communications from the Paylink unit, you should then be able to run make and test CoinRead, or build.sh to create the Java interface module and then test.sh to compile and run Tester.java.

Regards

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Re: Linux support - Ubuntu 12.04

Post by hsiehlc »

Thanks for your reply, Dave.
Is there any good documentation that I can refer when I work on your suggestion?
hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Re: Linux support - Ubuntu 12.04

Post by hsiehlc »

Hi Dave, A quick question: below is what I got from following your suggestion trying to run Tester.java. Do you know what is wrong?
richard@ubuntu:~/PaylinkSourceDist/PayLink/Java$ sudo ./test.sh
.
.
.
.
Hello
java: symbol lookup error: /usr/local/lib/libAESImheiJava.so.1.2.0: undefined symbol: OpenMHEVersion
richard@ubuntu:~/PaylinkSourceDist/PayLink/Java$
and aparently, this is something similar to an error message (the OpenMHEVersion) from where I run a PaylinkTester Java program in Eclipse:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: aes.imhei.AESImhei.OpenMHEVersion(I)I
at aes.imhei.AESImhei.OpenMHEVersion(Native Method)
at aes.imhei.AESImhei.OpenMHE(AESImhei.java:542)
at com.parktron.pos.PaylinkManager.<init>(PaylinkManager.java:23)
at com.parktron.pos.PaylinkTester.<init>(PaylinkTester.java:33)
at com.parktron.pos.PaylinkTester$1.run(PaylinkTester.java:66)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
davebush
Posts: 490
Joined: Fri Oct 22, 2004 12:20 pm

Re: Linux support - Ubuntu 12.04

Post by davebush »

There's no particular documentation on building under Linux.

If you're looking fof general documentation on how the Paylink system goes together, then please refer to the system manual in the Documentation folder of the SDK, or at http://www.aardvark.eu.com/downloads/do ... Manual.pdf

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
davebush
Posts: 490
Joined: Fri Oct 22, 2004 12:20 pm

Re: Linux support - Ubuntu 12.04

Post by davebush »

I have to re-iterate that I am not any sort of Linux expert.

It looks to me as though the Java system is not finding the native AESImhei.so - which should have been installed to usr/local/lib/ by the compilation script.

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Re: Linux support - Ubuntu 12.04

Post by hsiehlc »

Thanks a lot, Dave.

I have read the document you suggested, however, not much help to resolve the problem I have on Linux.

My company is Parktron from Taiwan, we are a parking system manufacture and integrator. We buy Paylink device from Moneycontrol. Our new project would require the system software (in Java lanaugage) to work on both Windows and Linux OS system. We have successfully make the testing Java program run on Windows 7, but still have problem (what I have faced) on Linux Ubuntu. So in order to have the project continue to meet up delivery schedule, we do need some professional help on Linux part. Would you be able to suggest anyone or any party that can provide the help?

btw, I did check all the required AESImhei.so.* are installed in my /usr/local/lib

Thanks,
Richard
davebush
Posts: 490
Joined: Fri Oct 22, 2004 12:20 pm

Re: Linux support - Ubuntu 12.04

Post by davebush »

Just to confirm that the .so is correctly installed, can you try making the CoinRead program (just type the command make while in the directory) and run it, to see if it accesses the .so

This will let us know if thew problem is with java or the installation.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
LenMeakin
Posts: 3
Joined: Wed Jul 24, 2013 2:26 pm

Re: Linux support - Ubuntu 12.04

Post by LenMeakin »

Hello,

I have no knowledge of the Java library, but I was very much involved in the initial Linux Driver/Application/Library code. I may be able to offer some assistance in confirming that the main driver functions correctly with your distribution. I hope that what follows is of some use to you:

Firstly have you read the Linux Installation Guide (http://www.aardvark.eu.com/downloads/do ... rGuide.pdf) ?

At a command line enter the following command - this will start the driver process running in verbose mode:

Code: Select all

sudo AESWDriver –v 
If any errors are encountered during this process then please take a screen shot and post it here. If no errors are encountered then please continue to test the interface functions correctly using one of the example 'c' command line programs supplied, as per below:

Code: Select all

cd PaylinkSourceDist/Paylink/CoinRead
make
sudo ./CoinRead
If you encounter any errors with these commands could post these errors and also answer the questions below please?

When performing the initial installation, './Install.sh' were you prompted to rebuild either libusb or libftdi ?
Would it be at all possible for me to gain remote access to your development machine in order to further diagnose these issues?

Regards,
Len.
hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Re: Linux support - Ubuntu 12.04

Post by hsiehlc »

Hi Dave and Len,

First of all, thanks for all you help so far, and how please read my follow up:

Here is the record:

1. I downloaded and untar PaylinkSourceDist to my linux file system.

2. I followed the http://www.aardvark.eu.com/downloads/do ... rGuide.pdf and install the files using automatic install command "sudo ./install.sh":
richard@ubuntu:~/PaylinkSourceDist$ sudo ./Install.sh
[sudo] password for richard:
Copying win_types.h.....=>./usr/include/ ... [PASS]
Copying ImheiEvent.h...=>./usr/include/ ... [PASS]
Copying Aesimhei.h.....=>./usr/include/ ... [PASS]

libusb exists. Re-build required [y/n] : y
(Re)building libusb ...configure: WARNING: Documentation build components not installed. sgml docs will not be built
[PASS]

libftdi exists. Re-build required [y/n] : y
(Re)building libftdi ...configure: WARNING: Python.h header file not found. Python development files are required to build presage python binding. Pyt
hon can be obtained from http://www.python.org
[PASS]
Building AES Access Shared Library (libaes_access.so) ... [PASS]
Building AES Driver Executable (AESWDriver) ... [PASS]
Copying (showtraf command) ... [PASS]
Building Java Interface ... [PASS]
Building AES Reprogrammer Executable (USBProgram) ...USBProgram.cpp: In function ‘int main(int, char**)’:
USBProgram.cpp:123:13: warning: variable ‘r’ set but not used [-Wunused-but-set-variable]
[PASS]
After installation, one thing weird I found is that I don't have /usr/local/bin/AESWDriver, and instead I have /usr/local/bin/AESCDriver. So I can not do "AESCDriver -v".
richard@ubuntu:~/PaylinkSourceDist/PayLink$ find -name AESWDriver
richard@ubuntu:~/PaylinkSourceDist/PayLink$ find -name AESCDriver
./USB Driver/AESCDriver
3. I then cd to PaylinkSourceDist/PayLink/LinuxDemo directory and "sudo ./configure" and following is the configure message:
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PACKAGE... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating pixmaps/Makefile
config.status: creating AESDemo.desktop
config.status: creating config.h
config.status: executing depfiles commands
4. Then "/home/richard/PaylinkSourceDist/PayLink/LinuxDemo/sudo ./make" with the following message:
make all-recursive
make[1]: Entering directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo'
Making all in src
make[2]: Entering directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/i386-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -Wall -g -g -O2 -MT support.o -MD -MP -MF ".deps/support.Tpo" -c -o support.o support.c; \
then mv -f ".deps/support.Tpo" ".deps/support.Po"; else rm -f ".deps/support.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/i386-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -Wall -g -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.c; \
then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/i386-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -Wall -g -g -O2 -MT interface.o -MD -MP -MF ".deps/interface.Tpo" -c -o interface.o interface.c; \
then mv -f ".deps/interface.Tpo" ".deps/interface.Po"; else rm -f ".deps/interface.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/i386-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -Wall -g -g -O2 -MT callbacks.o -MD -MP -MF ".deps/callbacks.Tpo" -c -o callbacks.o callbacks.c; \
then mv -f ".deps/callbacks.Tpo" ".deps/callbacks.Po"; else rm -f ".deps/callbacks.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/i386-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -Wall -g -g -O2 -MT data_funcs.o -MD -MP -MF ".deps/data_funcs.Tpo" -c -o data_funcs.o data_funcs.c; \
then mv -f ".deps/data_funcs.Tpo" ".deps/data_funcs.Po"; else rm -f ".deps/data_funcs.Tpo"; exit 1; fi
data_funcs.c: In function 「DataFn_UpdateData」:
data_funcs.c:210:32: Warning: format 「%lX」 expects argument of type 「long unsigned int」, but argument 4 has type 「int」 [-Wformat]
data_funcs.c:210:32: Warning: format 「%ld」 expects argument of type 「long int」, but argument 5 has type 「int」 [-Wformat]
data_funcs.c:213:32: Warning: format 「%lX」 expects argument of type 「long unsigned int」, but argument 4 has type 「int」 [-Wformat]
data_funcs.c:213:32: Warning: format 「%ld」 expects argument of type 「long int」, but argument 5 has type 「int」 [-Wformat]
data_funcs.c: In function 「DataFn_AcceptorUpdateData」:
data_funcs.c:297:5: Warning: format 「%lX」 expects argument of type 「long unsigned int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:311:5: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:313:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c: In function 「DataFn_AcceptorChanged」:
data_funcs.c:577:3: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:579:3: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:581:3: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:583:3: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:616:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:618:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:620:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:624:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:628:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:660:5: Warning: format 「%lX」 expects argument of type 「long unsigned int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:567:14: Warning: variable 「no_coins」 set but not used [-Wunused-but-set-variable]
data_funcs.c: In function 「DataFn_SetupDispensers」:
data_funcs.c:945:5: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:947:5: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:949:5: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:958:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:959:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:979:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c: In function 「DataFn_UpdateDispensers」:
data_funcs.c:1121:5: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:1123:5: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:1125:5: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:1134:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:1135:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
data_funcs.c:1155:7: Warning: format 「%ld」 expects argument of type 「long int」, but argument 3 has type 「int」 [-Wformat]
/bin/bash ../libtool --tag=CC --mode=link gcc -Wall -g -g -O2 -o AESDemo support.o main.o interface.o callbacks.o data_funcs.o -pthread -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -laes_access -lm -lrt -lftdi -lstdc++
mkdir .libs
gcc -Wall -g -g -O2 -o AESDemo support.o main.o interface.o callbacks.o data_funcs.o -pthread -lgnomeui-2 -lSM -lICE /usr/lib/i386-linux-gnu/libbonoboui-2.so /usr/lib/i386-linux-gnu/libgnomevfs-2.so -lgnomecanvas-2 -lgnome-2 /usr/lib/i386-linux-gnu/libpopt.so -lbonobo-2 -lbonobo-activation -lORBit-2 /usr/lib/i386-linux-gnu/libart_lgpl_2.so -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 /usr/lib/i386-linux-gnu/libcairo.so -lpango-1.0 /usr/lib/i386-linux-gnu/libfreetype.so -lfontconfig -lgobject-2.0 -lglib-2.0 -laes_access -lm -lrt -lftdi -lstdc++
make[2]: Leaving directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo/src'
Making all in pixmaps
make[2]: Entering directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo/pixmaps'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo/pixmaps'
make[2]: Entering directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo'
make[2]: Leaving directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo'
make[1]: Leaving directory `/home/richard/PaylinkSourceDist/PayLink/LinuxDemo'
5. Then I tried to run AESDemo under "~/PaylinkSourceDist/PayLink/LinuxDemo/src", but it just done nothing and returns back to command line:
richard@ubuntu:~/PaylinkSourceDist/PayLink/LinuxDemo/src$ sudo ./AESDemo
richard@ubuntu:~/PaylinkSourceDist/PayLink/LinuxDemo/src$
I will come back with more details about what I done today after a meeting... Sorry...

Richard
Last edited by hsiehlc on Thu Jul 25, 2013 4:55 am, edited 2 times in total.
hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Re: Linux support - Ubuntu 12.04

Post by hsiehlc »

Okay here are what I tried just today:

Because I can't find AESWDriver, so instead I tried to run AESCDriver instead, and get the following:
richard@ubuntu:~/PaylinkSourceDist/PayLink/USB Driver$ sudo AESCDriver -v
Configuration file: Standard.cfg
25 July 2013 Driver:1.2.0.1
11:35:32.832 PC: Driver start up

11:35:33.090 Timeout: read 5000, write 5000
11:35:33.090 FT2232C end points in 2 out 129
11:35:33.090 FTDI chip type : 3
11:35:33.090 Baudrate : 9600
11:35:33.091 Bitbang mode state : 0
11:35:33.091 FT2232C interface number : 0
11:35:33.091 FT2232C index number : 0
11:35:33.091 Bitbang mode : 1
11:35:33.091 EEPROM size : 128

11:35:33.133 USB: Unknown code: ff00 (ffffffff)
11:35:33.133 USB: PC (re)started

11:35:33.181 Config: Start of download

11:35:33.434 Hopper: All Save slots cleared
11:35:33.434 Config: New @ 0
11:35:33.434 Config: New @ 3
11:35:33.434 Config: New @ 9
11:35:33.434 Config: New @ 15
11:35:33.435 Config: New @ 21
11:35:33.435 Config: New @ 27
11:35:33.435 Config: New @ 33
11:35:33.435 Config: New @ 36
11:35:33.435 Config: New @ 42
11:35:33.435 Config: New @ 48
11:35:33.435 Config: New @ 51

11:35:33.471 Config: New Config loaded from PC
11:35:33.471 Config: Paylink rebooting with new Config

11:35:33.869 ftdi_poll_modem_status failed: -1 (getting modem status failed)
11:35:33.870
11:35:33.870 Check USB Status ** FAILED **!
11:35:33.870 Device Closed
11:35:33.871 ftdi_usb_open failed: -6 (ftdi_usb_reset failed)
11:35:33.871

11:35:34.883 Timeout: read 5000, write 5000
11:35:34.883 FT2232C end points in 2 out 129
11:35:34.883 FTDI chip type : 3
11:35:34.883 Baudrate : 9600
11:35:34.883 Bitbang mode state : 0
11:35:34.883 FT2232C interface number : 0
11:35:34.884 FT2232C index number : 0
11:35:34.884 Bitbang mode : 1
11:35:34.884 EEPROM size : 128

11:35:36.135 Configuration
11:35:36.136 cctalk protocol on port 0

11:35:36.183 Hopper at 6, Value 5
11:35:36.183 DP: Hopper S/N 0, Addr 6, Value 5

11:35:36.235 Hopper at 7, Value 100
11:35:36.235 DP: Hopper S/N 0, Addr 7, Value 100

11:35:36.284 Hopper at 10, Value 10
11:35:36.284 DP: Hopper S/N 0, Addr 10, Value 10

11:35:36.364 Timeout 5

11:35:36.412 F53/F56 protocol on port 1

11:35:36.588 === End ===

11:35:36.661 SEC Meter
11:35:36.662 Port 0 - cctalk protocol
11:35:36.662 Port 1 - F56 protocol
11:35:36.662 Port 2 - Monitor protocol
11:35:36.662 Port 3 - Default protocol
11:35:36.662 USB: Wait PC
11:35:36.662 USB: Chip OK
11:35:36.662 USB: Chip Off
11:35:36.662 DP: Part: -1, Serial: 3341

11:35:36.837 Exec: DP App. task took 122 msec
11:35:36.838 Hopper @ 0/10: Taken slot 0
11:35:36.838 Exec: cctalk task took 54 msec
11:35:36.838 Config: Start of download

11:35:36.892 Config: Checked, OK
11:35:36.893 Config: Paylink Checked OK against file "Standard.cfg"
11:35:36.893 Exec: USB task took 58 msec
11:35:36.896 PC: Memory Reset - new protocol

11:35:36.984 Hopper @ 0/07: Taken slot 1
11:35:36.985 Exec: cctalk task took 57 msec
11:35:36.985 USB: PC Link Up

11:35:37.133 Failed call to delete
11:35:37.133 DP: Hopper S/N 0, Address 7, Value 100 at b90 setup

11:35:37.172 Failed call to delete
11:35:37.173 DP: Hopper S/N 0, Address 10, Value 10 at bcc
setup

11:35:37.246 Failed call to delete
11:35:37.246 DP: Hopper S/N 0, Address 6, Value 5 at c08 setup

11:35:37.576 DP: Interface memory set up
11:35:37.577
11:35:37.577 PC: *** USB unit major memory reset ***
11:35:37.577
25 July 2013 Firmware: 4.1.12.4 from Jul 13 2012 at 11:23:34 Driver:1.2.0.1
11:35:37.577 Exec: DP App. task took 590 msec
11:35:37.577 9768 bytes memory free

11:35:37.646 Hopper @ 0/06: Taken slot 2
11:35:37.647 Exec: cctalk task took 60 msec

11:35:37.806 USB: Chip OK

11:36:36.962 00:01

11:37:36.853 00:02
Then I went try the CoinRead testing:
richard@ubuntu:~/PaylinkSourceDist/PayLink$ cd CoinRead/
richard@ubuntu:~/PaylinkSourceDist/PayLink/CoinRead$ ls
CoinRead.c CoinRead.o makefile
richard@ubuntu:~/PaylinkSourceDist/PayLink/CoinRead$ sudo make
[sudo] password for richard:
cc CoinRead.o -O2 -g0 -Wall -pedantic -Wstrict-prototypes -std=c99 -pipe -fomit-frame-pointer -D_GNU_SOURCE -lm -lrt -laes_access -lstdc++ -o CoinRead
/usr/local/lib/libaes_access.so: undefined reference to `shm_open'
collect2: ld returned 1 exit status
make: *** [CoinRead] Error 1
richard@ubuntu:~/PaylinkSourceDist/PayLink/CoinRead$
Thanks,
Richard
davebush
Posts: 490
Joined: Fri Oct 22, 2004 12:20 pm

Re: Linux support - Ubuntu 12.04

Post by davebush »

Just a quick thought.

Can you confirm that you are using the latest release (At: http://www.aardvark.eu.com/downloads/so ... ist.tar.gz )

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
LenMeakin
Posts: 3
Joined: Wed Jul 24, 2013 2:26 pm

Re: Linux support - Ubuntu 12.04

Post by LenMeakin »

I have tested the latest code with gcc 4.2.x and 4.7.x and I was unable to replicate the issue you have seen above. The one thing you could try is changing the order of the libraries within the CoinRead makefile:

Code: Select all

#-- Required libraries -------------------------------------------------------

LIBS		 = -lm -lrt -laes_access -lstdc++ 
Try chaging this to the following:

Code: Select all

#-- Required libraries -------------------------------------------------------

LIBS		 = -laes_access -lm -lrt -lstdc++ 
Then recompile the test program (make clean; make). Please let me know the outcome of this (and thank you for your patience).

Also could you please let me know what version of gcc you are using.

Code: Select all

gcc -v
hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Re: Linux support - Ubuntu 12.04

Post by hsiehlc »

Hi Dave,

I download the "Complete Linux installation (source file)" from this Aardvark website: http://www.aardvark.eu.com/products/mil ... #downloads

Hi Len,

Please see my recording below.

I changed the LIBS build order as you suggested, and I was able to build CoinRead:
richard@ubuntu:~/PaylinkSourceDist/PayLink/CoinRead$ sudo make clean
[sudo] password for richard:
rm -f *.[bo]
rm -f *.err
rm -f CoinRead
richard@ubuntu:~/PaylinkSourceDist/PayLink/CoinRead$ sudo make
cc -O2 -g0 -Wall -pedantic -Wstrict-prototypes -std=c99 -pipe -fomit-frame-pointer -D_GNU_SOURCE -c -o CoinRead.o CoinRead.c
CoinRead.c: In function ‘SetCoinLevel’:
CoinRead.c:73:24: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Wformat]
cc CoinRead.o -O2 -g0 -Wall -pedantic -Wstrict-prototypes -std=c99 -pipe -fomit-frame-pointer -D_GNU_SOURCE -laes_access -lm -lrt -lstdc++ -o CoinRead
richard@ubuntu:~/PaylinkSourceDist/PayLink/CoinRead$
Then I run AESCDriver as I did before.

Then I tried to run CoinRead, and it seems work!:
richard@ubuntu:~/PaylinkSourceDist/PayLink/CoinRead$ ./CoinRead
Initial currency accepted = 0
Processing 2 change events
And my gcc is:
richard@ubuntu:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
richard@ubuntu:~$
And best of all, I then go test on the AESDemo under "PaylinkSourceDist/PayLink/LinuxDemo/src", and even without rebuild, it works!!!
But sitll not sure what was wrong last time when I ran AESCDriver and AESDemo though....
I will go try more things now.

Really appreciated your help guys!

Richard
hsiehlc
Posts: 13
Joined: Fri Jul 19, 2013 9:15 am

Re: Linux support - Ubuntu 12.04

Post by hsiehlc »

Okay, here are some more to share and searching for help too:

I then when change the LIBS order in: ~/PaylinkSourceDist/PayLink/Java/makefile

Code: Select all

#LIBS            = -lm -lrt -laes_access -lstdc++
LIBS             = -laes_access -lm -lrt -lstdc++
and do "make clean" then re-build:
richard@ubuntu:~/PaylinkSourceDist/PayLink/Java$ sudo make clean
rm -f *.[bo]
rm -f *.err
rm -f /usr/local/lib/*AESImheiJava*
rm -f libAESImheiJava.a AESImheiJava.jar libAESImheiJava.* \
aes_imhei_AESImheiJava.h 1>/dev/null 2>&1
richard@ubuntu:~/PaylinkSourceDist/PayLink/Java$ sudo ./build.sh
g++ -fPIC -g -c AESImheiJava.cpp
cc -shared -Wl,-soname,libAESImheiJava.so.1 -laes_access -lm -lrt -lstdc++ \
-o libAESImheiJava.so.1.2.0 AESImheiJava.o -lc
rm -rf aes
File directroy looks like after rebuild:
richard@ubuntu:~/PaylinkSourceDist/PayLink/Java$ ls
aes_imhei_AESImhei_AcceptorBlock.h AESImhei.jar makefile
aes_imhei_AESImhei_AcceptorCoin.h AESImhei.java Tester.class
aes_imhei_AESImhei_DispenserBlock.h AESImheiJava.cpp Tester.java
aes_imhei_AESImhei_EventDetailBlock.h AESImheiJava.o test.sh
aes_imhei_AESImhei.h build.sh
aes_imhei_AESImhei_TicketDescription.h libAESImheiJava.so.1.2.0
Then I run test.sh in the directory:
richard@ubuntu:~/PaylinkSourceDist/PayLink/Java$ sudo ./test.sh
.
.
.
.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no AESImheiJava in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at Tester.<clinit>(Tester.java:7)
Could not find the main class: Tester. Program will exit.
richard@ubuntu:~/PaylinkSourceDist/PayLink/Java$
Now this looks like Java problem. I am going to looking into it, but if anyone there have a quick fix that can share with me would be wonderful!

Richard
Post Reply