mbed gatekeeper code