This is from Bluetooth Specification: "a friendly host name can be up to 248 bytes in length, hence the response packet will be in excess of this value"
sorry for not enumerating this fact earlier
--edit, FYI the fucntion cuts of the 248th byte if it exists, replacing it with a null character
this is a modified if statement:
Code:if(q == 248 && resp[q+9] != 0x00){ host_fname[y][q-1] = resp[q+9]; host_fname[y][q] = 0x00; break; }