Here is the code I used to determine the power of the carrier signal:
int getSignalStrength() { void *libHandle = dlopen("/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", RTLD_LAZY); int (*CTGetSignalStrength)(); CTGetSignalStrength = dlsym(libHandle, "CTGetSignalStrength"); if( CTGetSignalStrength == NULL) NSLog(@"Could not find CTGetSignalStrength"); int result = CTGetSignalStrength(); dlclose(libHandle); return result; }
It gives me values ββfrom 60 to 100, but when I test the signal level in the device, calling this number *3001#12345#* , it showed me as -65 . Below I have attached a screenshot. Is the value coming from getSignalStrength() accurate? Then why does it always return positive values?

source share