From: https://github.com/hardwario/bch-gateway/pull/17 Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>