Arduino Voucher Code Generator of MikroTik

Roebenhood:
So I have a unit of WiFi Vendo Machine (I did not make this or programmed this, it just happened that I have one). As I observed its flow/process:

  1. Insert a coin, and then the LCD will show how much you inserted a coin and the equivalent duration of rent.
  2. If you're satisfied with the duration you want, you'll have to push a button.
  3. After pushing a button, I see this message on LCD screen and it says
  • SD Write: Passed - this generate a voucher code from the Arduino I guess? I has a 5 character-long of username and password
  • Coin Counter: Update - number of total coins inserted (including past transactions)
  • Sending Data: Success - This one registers the voucher code on router using a command line that will execute on router's terminal
  1. Then after adding/registering the voucher code on the router, the voucher code (user/pass) will now display in LCD

As I opened the unit, there's a MEGA, Ethernet Shield, a button and a universal coin slot. I noticed that there's an SD card on Ethernet Shield so I tried opening it to see what is inside.

What I found in the SD are 3 text files (sometimes 2, I'll explain it later how it works)

  1. Rate.txt - this is the rate of 1 peso coin. In my case 1 peso coin = 9 minutes
  2. Hotspot.txt - this is where the command line is stored

example:
This text file will disappear if the unit or the arduino is connected to the router through ethernet cable. If not, the text file remains and the voucher code on it.

  1. Counter.txt - this is where you find the coins inserted per transactions. example:
    So if you restart/reboot the unit, the arduino will get the sum of these transaction and display it on LCD.

My main problem is that, how does the arduino send the data to the router? How does the arduino execute the command line to add user/pass (voucher code)? And before executing the command line, you have to log in to the routerOS then execute the command in Terminal.

Please send me a private message