The DEBUG message
"Failed to get HMAC token. Device returned error code.." is not an error message but a DEBUG message stating the Ingenico device doesn't have a HMAC key or there is an issue relating to the HMAC key. This key is only relevant if you are performing Card In, Card Out functionality. More information on Card In, Card Out can be found in this article.
A HMAC token is essentially a local reference to the card itself. It is used commonly in car parks whereby you insert the payment card when you arrive, insert the card when you leave and it calculates the total amount to charge the customer.
A HMAC key needs to be injected separately by the distributor. If you're not using the functionality as described above, then there is no issue with it not being returned. The DEBUG message can be disregarded in this case.