BPI-M2 LIRC Send BPI using GPIO

Hi, has any of you manage to make LIRC work on BPI (particulary BPI-M2?) I want to use BPI as and infrared trasnmitter (rather than use the onboard receiver) using GPIO. I’ve managed to make it working under RPI following (Setting up LIRC on the RaspberryPi - alexba.in), but lirc_rpi is not available for BPI. Can you help me please? Regards Martin