Write carriage return after request to terminate string
Fix sending of carriage return at end of request string
Use strtol instead of atoi to correctly parse hex string
Remove unecessary parameter to get_data
Remove unused local variables