Added check_net() function + moved send_string(dbgain) before gain setting