Pirania Voucher Issue

Hola

I am unable to setup the voucher system in Pirania as shown here by @luandro


The problem is there is no “Access” option in the lime-app (thisnode.info)
How do I get that version of lime-app or activate this “Access” option?

As recommended by @nicopace, I updated the firmware of my librerouter to the latest: https://gitlab.com/librerouter/librerouteros/-/releases/
(Is there a command to check what version of firmware and other packages that are currently installed in the router?)

Hey @alemaree!

Lime-App with Pirania support has not yet been merged, so still not shipping with LibreRouter OS. You can create a build yourself from this branch.

Let us know if you need any help setting it up.

Cheers!

thanks for your reply @luandro

is there an another way to generate vouchers other than through lime-app?
am asking because pirania is there in my LRos and captive portal loads when enabled. just don’t know how to issue and manage vouchers. is there a command line option to do this?

Yes!

Sorry they are still not documented. But you can check the code here and see all the commands and their parameters.

If it’s too confusing let me know and I’ll take some time to document.

Oi Luandro, Boa!
I’m trying to add new vouchers using “voucher” commando on cli, but i don’t succes…
it’s like captive_portal.auth_voucher (mac,code) ??
I tryed:
captive_portal.add_voucher (“xx:…:xx:xx”,“cara”)
-ash: syntax error: unexpected word (expecting “)”)
-ash: syntax error: unexpected “)”
voucher add xx:…:xx:xx, cara
/usr/bin/lua: /usr/bin/voucher:148: attempt to call field ‘?’ (a nil value)
stack traceback:
/usr/bin/voucher:148: in main chunk
[C]: ?

…and many other combinations…

(xx:…:xx) is Mac address
Thanks!!

i was finally able to create a voucher using cli. thanks to @luandro sharing this link
to summarize,

  1. ssh into librerouter
  2. start pirania -
    captive_portal start or
    uci set pirania.base_config.enabled=1 && uci commit
  3. add voucher -
    voucher add_voucher test voucher123 1617062399 10 10 2
    test - is a name to identify the voucher (not seen the use of it yet)
    voucher123 - is the voucher code / coupon code used to log in on the pirania portal
    1617062399 - is the epoch time for end of day tomorrow (29 Mar 2021). (one can use this site for generating epoch times)
    10 10 - are upload and download limits (not sure if they work)
    2 - number of devices that this voucher can be used with
2 Likes