All pages
Powered by GitBook
1 of 1

Loading...

How to Set Up the MTUSDK Libraries

How to Install Dependencies

  1. Install libjsoncpp-dev for json api

sudo apt install libjsoncpp-dev
  1. Install libcurl for http/https access.

sudo apt install libcurl4-openssl-dev
  1. Install restclient-cpp.

git clone https://github.com/mrtazz/restclient-cpp 
sudo apt install libtool
cd restclient-cpp
./autogen.sh

(installs to usr/local/lib)

sudo make install
  1. Install libusb.

  1. Install lissl-dev for base64 encoding/decoding.

  1. Cryptopp from Cryptopp is automatically downloaded during the make build of mtusdk static library. Cryptopp is a static library to implement hash sha256.

  1. To build libraries:

    1. Extract mtusdk_linux.zip.

    2. Run the make command.

  2. The libraries are built and sent to the mtusdk_test folder.

  • libmtmms.so (shared object)

  • libmtscra.so (shared object)

  • libmtusdk.a (static library)

  1. To rebuild the MTUSDK Test app after any modifications to main.cpp.

    1. Navigate to mtusdk_test folder.

    2. Modify main.cpp.

    3. Run the make command for DynaFlex devices.

  1. Run the make command for DynaFlex devices.

  1. To run the MTUSDK Test app:

  1. The response is similar as below:

  1. If the command is not successful but is similar to:

then send the following command to link the shared object file. Retry after this.

  1. For details on running and modifying the test console see UNIVERSAL SDK FOR MMS DEVICES TEST CONSOLE MANUAL ( LINUX )

How to Build

Build libraries

Rebuild MTUSDK Test Console

Run the MTUSDK Test Console

https://github.com/weidai11/cryptopp.
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libusb-1.0-0-dev
make -f makefile.mms
make -f makefile
sudo ./mtusdk_test.mms
SDK version 118 
    Model:
    Name: B62CA5F0
<- (Connection State) connected
<- (Operation Status) operation_done,0000D101,Operation Done,00000000
<- (Device Response) AA... 
    Serial Number: B62CA5F0
Select an operation :
1.	Transaction (Quick Chip)
2.	Transaction (Full)
3.	Send configuration file
4.	Update firmware
5.	Display a message
6.	Send an image and display
9. Enable event driven transaction
a. Disable event driven transaction
0. Quit
librestclient-cpp.so cannot open shared object file no such file or directory.
sudo /sbin/ldconfig