MEI BNR Paylink configuration on 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
dcabru
Posts: 7
Joined: Tue May 29, 2018 1:52 pm

MEI BNR Paylink configuration on Linux

Post by dcabru »

Hi.
I am using a Paylink on a Linux Debian 9 "Stretch" machine. I have finally managed to compile PaylinkBNR executable since I need a MEI BNR to work with Paylink, now the problem is with the paylink configuration file.
The configuration file that I'm trying has the following:

Code: Select all

DRIVER
        LOGFILE "/app/paylink.log"

PROTOCOL CCTALK ON CONNECTOR CCTALK
        COIN ACCEPTOR AT 02
        HOPPER AT 03 VALUE 10
        HOPPER AT 04 VALUE 50
        HOPPER AT 05 VALUE 5
        HOPPER AT 06 VALUE 100
        HOPPER AT 07 VALUE 20

PROTOCOL MEIBNR ON CONNECTOR USB
According to Paylink System Manual, MEIBNR is a valid protocol and USB is a valid connector.
When I try to run PaylinkBNR, the following error is displayed:

Code: Select all

root@mavproves:~# PaylinkBNR /app/paylink-config.cfg 
Paylink driver, [v4.1.12.81], Mar  7 2018 13:35:02, Configuration file: /app/paylink-config.cfg
[AESCDriver] ERROR: problem with configuration file:
        Unknown port "USB" at line 12
I have tried with Genoa and Innova v4.1.12.81 firmwares but both give me the same error.
Without the last line of the configuration file, PaylinkBNR launches without errors.

How can I make MEI BNR to work with Paylink? Thank you.
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: MEI BNR Paylink configuration on Linux

Post by davebush »

Sorry for the delay.

Obviously the manual is not clear in this area. The BNR in fact interfaces via a shared library (DLL in Windows speak), and the configuration line is:

Code: Select all

Protocol MEIBNR from DLL
In fact with Linux the configuration is built into the application, and no entry is actually needed - running PaylinkBNR automatically implies the fact that you are using the BNR.

I will check out the manual and error messages in this area and clarify it.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
dcabru
Posts: 7
Joined: Tue May 29, 2018 1:52 pm

Re: MEI BNR Paylink configuration on Linux

Post by dcabru »

Hi.
Thanks for your reply. Unfortunately I couldn't make the BNR work with Paylink yet.

I tried to run PaylinkBNR both by connecting the MEI BNR with the USB that is connected directly to the board and with the front USB type B. The BNR is detected by Linux in either way as I can see "0bed:0a00 MEI" in the output of lsusb:

Code: Select all

root@mavproves:~# lsusb
Bus 003 Device 002: ID 04b3:3025 IBM Corp. NetVista Full Width Keyboard
Bus 001 Device 008: ID 0bed:0a00 MEI 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0eef:c000 D-WAV Scientific Co., Ltd 
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 062a:0003 Creative Labs 
Bus 001 Device 006: ID 0403:de50 Future Technology Devices International, Ltd 
Bus 001 Device 113: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
In Paylink log I can't see any signs of the BNR being recognised, even when unplugging and plugging again the paylink USB cable:

Code: Select all

10:46:55.179 PC: Driver start up
10:46:55.183 FTDI Open        : Genoa
10:46:55.183 FTDI VID PID     : 0403 de50
10:46:55.183 FTDI chip type   : 3
10:46:55.183 Timeout: read 5000, write 5000
10:46:55.293 Config: Start of download
10:46:55.336 Config: Checked, OK
10:46:55.336 Config: Paylink Checked OK against file "/app/paylink-config.cfg"
10:46:55.336 Exec: USB task took 42 msec
10:46:55.354 PC: Memory Reset - new protocol
10:46:55.649 DP: ccCoin acceptor 2020000 at ba0 and 8 coins setup
10:46:56.142 DP: h2 nano Hopper S/N 13224963, Address 6, Value 100 at de0 setup
10:46:56.243 DP: h2 nano Hopper S/N 13224995, Address 4, Value 50 at e30 setup
10:46:56.344 DP: h2 nano Hopper S/N 13224980, Address 7, Value 20 at e80 setup
10:46:56.445 DP: h2 nano Hopper S/N 13224962, Address 3, Value 10 at ed0 setup
10:46:56.554 DP: h2 nano Hopper S/N 13224986, Address 5, Value 5 at f20 setup
10:46:56.980 DP: Interface memory set up
10:46:56.980 Exec: DP task took 1587 msec
10:46:59.966 8764 bytes memory free
When unplugging and plugging again the Paylink USB cable:

Code: Select all

10:51:37.727 Retrying following failure....
10:51:38.752 PC: Driver start up
10:51:38.759 FTDI Open        : Genoa
10:51:38.759 FTDI VID PID     : 0403 de50
10:51:38.759 FTDI chip type   : 3
10:51:38.759 Timeout: read 5000, write 5000
10:51:40.548 Configuration
10:51:40.548 cctalk protocol on port 0
10:51:40.596    Coin Acceptor at 2
10:51:40.596 DP: ccCoin Pre reg, Addr 2
10:51:40.656    Hopper at 3, Value 10
10:51:40.656 DP:  Hopper S/N 0, Addr 3, Value 10
10:51:40.703    Hopper at 4, Value 50
10:51:40.703 DP:  Hopper S/N 0, Addr 4, Value 50
10:51:40.750    Hopper at 5, Value 5
10:51:40.750 DP:  Hopper S/N 0, Addr 5, Value 5
10:51:40.797    Hopper at 6, Value 100
10:51:40.797 DP:  Hopper S/N 0, Addr 6, Value 100
10:51:40.843    Hopper at 7, Value 20
10:51:40.843 DP:  Hopper S/N 0, Addr 7, Value 20
10:51:40.874 === End ===
10:51:40.945 SEC Meter
10:51:40.945 Port 0 - cctalk protocol
10:51:40.945 Port 1 - unused
10:51:40.945 Port 2 - defaulted to monitor
10:51:40.945 Port 3 - unused
10:51:40.945 DP: Part: -1, Serial: 13649
10:51:41.069 Exec: DP task took 124 msec
10:51:41.069 ccHopper @ 0/07: Save slot 0 found. Coin 0, paid 274, count 0, stage 0
10:51:41.070 Config: Start of download
10:51:41.116 Config: Checked, OK
10:51:41.116 Config: Paylink Checked OK against file "/app/paylink-config.cfg"
10:51:41.116 Exec: USB task took 43 msec
10:51:41.116 ccHopper@7: *** Type <h2 nano> unrecognised
10:51:41.133 PC: Memory Reset - new protocol
10:51:41.430 DP: ccCoin acceptor 2020000 at ba0 setup
10:51:41.483 DP:  Hopper S/N 0, Address 6, Value 100 at bdc setup
10:51:41.587 DP:  Hopper S/N 0, Address 4, Value 50 at c1c setup
10:51:41.695 DP: h2 nano Hopper S/N 13224980, Address 7, Value 20 at c5c setup
10:51:41.747 DP:  Hopper S/N 0, Address 3, Value 10 at c9c setup
10:51:41.850 DP:  Hopper S/N 0, Address 5, Value 5 at cdc setup
10:51:42.295 DP: Interface memory set up
10:51:42.295 Exec: DP task took 1116 msec
10:51:42.295 8880 bytes memory free
10:51:42.367 ccHopper@7: Hopper count 274 OK
10:51:42.367 DP: h2 nano Hopper S/N 13224980, Address 7, Value 20 at c5c  updated
10:51:42.492 ccHopper @ 0/06: Save slot 1 found. Coin 0, paid 1841, count 0, stage 0
10:51:42.492 ccHopper@6: *** Type <h2 nano> unrecognised
10:51:42.632 ccHopper@6: Hopper count 1841 OK
10:51:42.632 DP:  Hopper S/N 13224963, Address 6, Value 100 at bdc  updated
10:51:42.760 ccHopper @ 0/05: Save slot 2 found. Coin 0, paid 340, count 0, stage 0
10:51:42.760 ccHopper@5: *** Type <h2 nano> unrecognised
10:51:42.903 ccHopper@5: Hopper count 340 OK
10:51:42.903 DP:  Hopper S/N 13224986, Address 5, Value 5 at cdc  updated
10:51:43.033 ccHopper @ 0/04: Save slot 3 found. Coin 0, paid 151, count 0, stage 0
10:51:43.033 ccHopper@4: *** Type <h2 nano> unrecognised
10:51:43.177 ccHopper@4: Hopper count 151 OK
10:51:43.177 DP:  Hopper S/N 13224995, Address 4, Value 50 at c1c  updated
10:51:43.309 ccHopper @ 0/03: Save slot 4 found. Coin 0, paid 216, count 0, stage 0
10:51:43.310 ccHopper@3: *** Type <h2 nano> unrecognised
10:51:43.453 ccHopper@3: Hopper count 216 OK
10:51:43.453 DP:  Hopper S/N 13224962, Address 3, Value 10 at c9c  updated
10:51:44.745 cctalk: Device @ 2 does not handle message 96
10:51:45.921 cctalk: Device @ 2 does not handle message 145
10:51:45.995 ccCoin: Selftest OK
10:51:45.995 DP: ccCoin Status to 4
10:51:45.995 ccCoin:  1 <EU005A>, = value 5
10:51:45.995 ccCoin:  2 <EU010A>, = value 10
10:51:46.129 ccCoin:  3 <EU020A>, = value 20
10:51:46.129 ccCoin:  4 <EU050A>, = value 50
10:51:46.129 ccCoin:  5 <EU100A>, = value 100
10:51:46.129 ccCoin:  6 <EU200A>, = value 200
10:51:46.129 ccCoin:  7 <TM000A>, = a name
10:51:46.129 ccCoin:  8 <TM000A>, = a name
10:51:46.509 ccCoin:  9 <......>, = not valid
10:51:46.509 ccCoin: 10 <......>, = not valid
10:51:46.509 ccCoin: 11 <......>, = not valid
10:51:46.509 USB: No response
10:51:46.509 PC: USB Checkpoint fault 206<>0 69<>69 (1)
10:51:46.509 PC: USB Resend from 68
10:51:46.509 ccCoin: 12 <......>, = not valid
10:51:46.509 ccCoin: 13 <......>, = not valid
10:51:46.509 ccCoin: 14 <......>, = not valid
10:51:46.509 ccCoin: 15 <......>, = not valid
10:51:46.509 ccCoin: 16 <......>, = not valid
10:51:46.509 ccCoin: 1 paths, main: 3 secondary: 4
10:51:46.509 ccCoin: 2 paths, main: 3 secondary: 4
10:51:46.509 ccCoin: 3 paths, main: 3 secondary: 4
10:51:46.509 ccCoin: 4 paths, main: 3 secondary: 4
10:51:46.510 ccCoin: 5 paths, main: 3 secondary: 4
10:51:46.510 ccCoin: 6 paths, main: 3 secondary: 4
10:51:46.510 ccCoin: 7 paths, main: 3 secondary: 4
10:51:46.510 USB: No response
10:51:46.510 ccCoin: 8 paths, main: 3 secondary: 4
10:51:46.510 ccCoin: coin validator <~~12.06~>, S/N 2873003 found!
10:51:46.510 DP: ccCoin acceptor 2020000 at ba0 and 8 coins updated
10:51:46.951 Exec: cctalk task took 449 msec
10:51:47.191 ccCoin: Inhibit all coins
10:51:47.654 ccHopper@7: Selftest OK
10:51:47.749 ccHopper@6: Selftest OK
10:51:47.799 Exec: DP task took 46 msec
10:51:47.954 8820 bytes memory free
10:51:47.954 ccHopper@5: Selftest OK
10:51:48.062 ccHopper@4: Selftest OK
10:51:48.170 ccHopper@3: Selftest OK
When executing

Code: Select all

AESImhei.ReadAcceptorDetails(acceptorId, acceptorBlock); 
or

Code: Select all

AESImhei.ReadDispenserDetails(dispenserId, dispenserBlock);
from my application I can see the coin acceptor and the hoppers being recognized but no signs of the MEI BNR...

Any hints?
Thank you very much.
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: MEI BNR Paylink configuration on Linux

Post by davebush »

It appears the information I gave is wrong.

Sometimes the BNR is automatically part of the configuration, but not always.

To guarantee the BNR is checked for, please include the line:

Code: Select all

Protocol MEIBNR from DLL
in Standard.cfg.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
dcabru
Posts: 7
Joined: Tue May 29, 2018 1:52 pm

Re: MEI BNR Paylink configuration on Linux

Post by dcabru »

Hi.
I finally managed to make it work!

Apart from including the line in the configuration, I had to set the LD_LIBRARY_PATH variable in /etc/environment to /usr/local/lib/i386/lib making sure that this path is the first in the list.

For example:

Code: Select all

root@mavproves:~# echo $LD_LIBRARY_PATH
/usr/local/lib/i386/lib:/usr/lib/jni:/usr/local/lib:$LD_LIBRARY_PATH
Now i have the following error when starting PaylinkBNR:

Code: Select all

** Error ** BNR Interface so is 1.13.2, but Paylink is compiled for 1.10.0
In the PaylinkCodeDist the highest MEIBNR.odll version is for 1.10.0, and MEI provided me the same odlls that are included in the Paylink package, is that normal? Would I lose functionality for using 1.10.0?

Thank you very much.
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: MEI BNR Paylink configuration on Linux

Post by davebush »

You will definitely not lose any facilities by using 1.10.0 - Paylink only uses facilities that are in 1.6.1, later version will presumably only have fault fixes.

I will consult with MEI as to the differences between 1.10.0 and try to see if we need a separate Paylink version for 1.13.2

You are probably best using 1.10.0 if you have it - that way there can't be any incompatibilities, if you don't have 1.10.0 then 1.13.2 will probably work - it depends if any of the control structures have changed layout between the versions.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
Post Reply