Hi,
I have tried to use the code below,
low& = KSyMachineUID&
high&=SyGetHAL&😞KSyHALAttributeValid&,low&😉
to obtain the IMEI number returned in the variables "low&" and "high&".
But I just get low&=1 and high&=0 when running on a real Nokia 92xx machine.
Does anybody have some clue to solve this issue ?
Regards,
Roberto Colistete Jr.
I've tried and tried to get anything working with the SyGetHAl& but nothing works :s
I think something went wrong in that procedure.
But you're not using the right one anyway 😊 To get the IMEI, use System OPX:
PRINT "Serial Number (IMEI):",SyGetPhoneInfo$😞KPhoneInfoSerialNumber%)
not the HAL functions. For the HAL functions, also make sure you have the latest OPX and OXH header (0.30 version SIS file for the OPX and the OXH from the latest SDK on the DevNet site). In the first beta release, I made an error and the CONSTants were out of order, which caused problems. This is fixed in the current beta...
Regards,
Phil
...the HAL function works like this:
PRINT "Memory info using HAL calls"
SyGetHAL&😞KSyMemoryRAM&,Value&😉
PRINT "Total RAM (KB):","","",Value&/1024
where the long integer returned by SyGetHAL&: is an error code. The Value& long int is passed BYREF (look at the OXH header) and the data you want (as specified by the constant in the first argument of the function call) is returned inside Value&.
That MachineUID constant is for the range of device types (also specified in the OXH), e.g.
SyGetHAL&😞KSyMachineUid&,Value&😉
IF Value&=KSyMachineUid_Linda&
PRINT "9210"
ENDIF
Regards,
Phil
thx Phil! 😊
No I can see if I get my phone reception strength and battery strenght 😊
I used the same code to get the battery stat but it did't seem to work ...
And I'm using ver 0.30 😉
Hi,
Well, thank you very much, Phil Spencer who explained the details to obtain the IMEI number, and Dazler who tested the "Register Smuggers..." dialog.
As the Nokia emulator for Windows freezes when "SyGetPhoneInfo$😞KPhoneInfoSerialNumber%)" is called, I use the code below :
SyGetHal&😞KSyMachineUID&,low&😉
IF low& = KSyMachineUID_Linda&
imei$=SyGetPhoneInfo$😞KPhoneInfoSerialNumber%)
ELSE
imei$="000000000000000"
ENDIF
so only when the code runs on a real Nokia 92xx machine, the IMEI number is read.
Regards,
Roberto Colistete Jr.