Tapi Help - Windows Mobile Development and Hacking General

Dim CanRat As LINEHSCSDCODING = LINEHSCSDCODING.CODING_4800
Dim Ekip As LINEEQUIPSTATE = LINEEQUIPSTATE.FULL
ret = CellTSP.lineGetCurrentHSCSDStatus(BuHat.hLine, Ekip, System.Runtime.InteropServices.Marshal.ReadInt32(iki), System.Runtime.InteropServices.Marshal.ReadInt32(uc), System.Runtime.InteropServices.Marshal.ReadInt32(dort), CanRat)
what is wrong

Related

SetDevicePower questions

i have this code:
<DllImport("coredll")> _
Private Shared Function SetDevicePower(ByVal pvDevice As String, ByVal dwDeviceFlags As Integer, ByVal DeviceState As devicepowerstate) As Integer
End Function
Public Enum devicepowerstate : int
Unspecified = -1
D0 = 0
D1 = 1
D2 = 2
D3 = 3
D4 = 4
End Enum
Const POWER_NAME As Integer = &H1
SetDevicePower("BKL1:", POWER_NAME, devicepowerstate.D3)
when i use D3, my backlight goes DIM (which is what i am aiming for) but when my LCD goes off (idle mode) and then i click on any key to reactivate my DIMMED backlight, the LCD does TURN ON but my backlight stays OFF.
im using it on my T-Mobile SDA WM5.

Sick dev req : AllDevMgr vs NLED Api

I'm currently using the code below to manage LEDs on the TyTN. We can't manage all LEDs with the NLED api so we need to use the AllLedMgr driver instead by writing the IOCTL 0x80020008. Unfortunately, as soon as I successfully set a LED, the normal LED behavior is lost (e.g. amber no longer lights up while charging). So it seems like the AllLedMgr interferes with the nled api, how can I avoid this ?
Code:
typedef enum tLEDS{LED_RED, LED_GREEN, LED_BLUE, LED_L_GREEN, LED_AMBER}eLED;
unsigned long out[32] = {0};
unsigned long read = 0;
unsigned long inBuffer[5] = {0, 0, LED_RED, 1, 0};
HANDLE hLED = CreateFile(L"LED1:", GENERIC_WRITE | GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
DeviceIoControl(hLED, 0x80020008, inBuffer, 0x14, out, sizeof(out), &read, NULL);
CloseHandle(hLED);

Help with POOM(Pocket Outlook contacts) code in VB .NET (SOLVED)

What I am trying to do is create code that will cycle through all my contacts and add the same category to each one until it reaches the last contact.
Here is my code:
Code:
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.WindowsMobile.PocketOutlook
In my Form Load:
Code:
Dim outlookSession As New OutlookSession()
Dim intCount As Integer
Dim myContact As ContactCollection = outlookSession.Contacts
For intCount = 0 To myContacts.Count - 1
contact.categories = "Holiday"
contact.update
myContact = myContacts.Item(intCount)
Next
outlookSession.Dispose()
Any idea's why its failing? Thanks.
jdiperla said:
What I am trying to do is create code that will cycle through all my contacts and add the same category to each one until it reaches the last contact.
Here is my code:
Code:
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.WindowsMobile.PocketOutlook
In my Form Load:
Code:
Dim outlookSession As New OutlookSession()
Dim intCount As Integer
Dim myContact As ContactCollection = outlookSession.Contacts
For intCount = 0 To myContacts.Count - 1
contact.categories = "Holiday"
contact.update
myContact = myContacts.Item(intCount)
Next
outlookSession.Dispose()
Any idea's why its failing? Thanks.
Click to expand...
Click to collapse
In which row it fail?
Give me what you want do!
Bye
Try this instead. I've never used it before, but it should work
Dim outlookSession As New OutlookSession()
Dim myContacts As ContactCollection = outlookSession.Contacts
Dim myContact As Contact (***check this for correct object type***)
For each myContact in myContacts
myContact.categories = "Holiday"
myContact.update
Next
outlookSession.Dispose()
OK, I figured it out. I had it backwards:
Code:
Dim outlookSession As New OutlookSession()
Dim intCount As Integer
Dim myContacts As ContactCollection = outlookSession.Contacts.Items
Dim session As OutlookSession = New OutlookSession()
Dim contacts As ContactCollection = session.Contacts.Items
Dim contact As Contact = contacts.AddNew
For intCount = 0 To myContacts.Count - 1
contact = myContacts.Item(intCount)
contact.Categories = myContacts.Item(intCount).Categories & ",Holiday"
contact.Update()
Next
MsgBox("Done")
outlookSession.Dispose()
Me.Dispose()

InTheHand Bluetooth - Weird stream problems

I am currently working on my "SciLor's WiMoBlue". The new protocol is ready. Everything works fine, until I send much data at the same time.
For example if I try to send an image in that way:
Code:
Public Sub SendImage(ByVal Image As Bitmap, ByVal Position As Point, ByVal Format As ImageFormat)
Dim PosX, PosY, Width, Height As Byte()
Dim ImageStream As New IO.MemoryStream
Dim ImageLength As Integer
Dim ImageLengthBytes As Byte()
Dim ImageBuffer(MaxChunkSize - HeaderSize - 1) As Byte
PosX = BitConverter.GetBytes(Position.X)
PosY = BitConverter.GetBytes(Position.Y)
Width = BitConverter.GetBytes(Image.Width)
Height = BitConverter.GetBytes(Image.Height)
Image.Save(ImageStream, ImageFormat2ImagingFormat(Format))
ImageStream.Seek(0, SeekOrigin.Begin)
ImageLength = ImageStream.Length
ImageLengthBytes = BitConverter.GetBytes(ImageLength)
SendData(BuildCommand(BaseProtocol.Image, ImageProtocol.Initiate, CombineBytes(PosX, PosY, Width, Height, ImageLengthBytes)))
Thread.Sleep(2000)
Dim DataPos As Integer
For DataPos = 0 To ImageStream.Length - MaxChunkSize - HeaderSize - 1 Step MaxChunkSize - HeaderSize
ImageStream.Read(ImageBuffer, 0, MaxChunkSize - HeaderSize)
SendData(BuildCommand(BaseProtocol.Image, ImageProtocol.Data, ImageBuffer))
'WaitForNextChunk = True
'Do While WaitForNextChunk = True
'Loop
'Thread.Sleep(2000)
Next
ImageBuffer = New Byte(ImageLength - DataPos - 1) {}
ImageStream.Read(ImageBuffer, 0, ImageBuffer.Length)
SendData(BuildCommand(BaseProtocol.Image, ImageProtocol.End, ImageBuffer))
End Sub
SendData:
Code:
If Data.Length > MaxChunkSize Then
MsgBox("Data to long... " & vbNewLine & "SendSize:" & Data.Length & vbNewLine & "MaxSize:" & MaxChunkSize)
Else
If btClient.Connected = True And isRecieving = True Then
btStream.Write(Data, 0, Data.Length)
btStream.Flush()
End If
End If
Recieving Part:
Code:
While isRecieving = True
If btStream IsNot Nothing And btStream.DataAvailable = True Then
Try
Recieved = btStream.Read(myHeader, 0, myHeader.Length)
If myHeader(0) = HeaderIdentifier And myHeader(1) = OtherModeHeader Then
btStream.Read(myDataSize, 0, 2)
DataLength = BitConverter.ToInt16(myDataSize, 0)
myBuffer = New Byte(DataLength - 1) {}
Recieved = 0
Do Until Recieved = DataLength
If btStream.DataAvailable = True Then
Recieved += btStream.Read(myBuffer, Recieved, DataLength - Recieved)
End If
Loop
ExecuteCommand(myHeader(2), myHeader(3), myBuffer)
Else
Debug.WriteLine("WrongData")
Exit While
End If
Catch ex As Exception
Debug.WriteLine(ex.Message)
If Recieved = 0 Then
Exit While
End If
End Try
End If
End While
If I send the image, without Thread.Sleeps (huighe ones). The recieving stream gets weird. The gets btStream.DataAvailable = False forever. If I remove that ckeck, it hangs at the btStream.Read.
I also tried to fix that with waiting for the answer of the server, but the problem doesn't get solved.
Do you have any idea how to fix that problem?. In that speed the image sending is worthless
SciLor

[REF] secret code for sgs

‎*#*#4636#*#* for battery and other general setttings like GSM/CDMA
‎*#*#8255#*#* for Gtalk service monitor
‎*#*#7780#*#* for factory data reset
‎*#*#34971539#*#* for information about phone camera (be very careful hitting options ‎here)
‎*#*#7594#*#* change the "Power" button action in your phone.
‎*#*#197328640#*#* service mode
‎*#197238640# service mode
‎*#0*# testing mode
‎*#06# view IMEI number
‎*#1234# display phones current firmware
‎*#*#1472365#*#* gps test
‎*#0011# network mode/cell info/power info
‎*#*#0*#*#* screen test menu
‎*#7465625# engineering mode
‎*#9900# Sysdump screen.. some sort of way to dump ram and other logs to sd card
sgs global:
‎
‎*#1234# = Firmware Version.
‎*#2222# = H/W Version.
‎*#8999*8376263# = All Versions Together.
‎*#8999*8378# = Test Menu.
‎*#4777*8665# = GPSR Tool.
‎*#8999*523# = LCD Brightness.
‎*#8999*377# = Error Menu.
‎*#8999*327# = EEP Menu.
‎*#8999*667# = Debug Mode.
‎*#92782# = PhoneModel. (Wap)
‎#*5737425# = JAVA Mode.
‎*#2255# = Call List.
‎*#232337# = Bluetooth MAC Adress.
‎*#5282837# = Java Version.
‎#*4773# = Incremental Redundancy.
‎#*7752# = 8 PSK uplink capability bit.
‎#*7785# = Reset wakeup & RTK timer cariables/variables.
‎#*7200# = Tone Generator Mute.
‎#*3888# = BLUETOOTH Test mode.
‎#*7828# = Task screen.
‎#*#8377466# = S/W Version & H/W Version.
‎#*2562# = Restarts Phone.
‎#*2565# = No Blocking? General Defense.
‎#*3353# = General Defense, Code Erased.
‎#*3837# = Phone Hangs on White screen.
‎#*3849# = Restarts Phone.
‎#*3851# = Restarts Phone.
‎#*3876# = Restarts Phone.
‎#*7222# = Operation Typ: (Class C GSM)
‎#*7224# = !!! ERROR !!!
‎#*7252# = Operation Typ: (Class B GPRS)
‎#*7271# = CMD: (Not Available)
‎#*7274# = CMD: (Not Available)
‎#*7337# = Restarts Phone. (Resets Wap Settings)
‎#*2787# = CRTP ON/OFF.
‎#*2886# = AutoAnswer ON/OFF.
‎#*3737# = L1 AFC.
‎#*5133# = L1 HO Data.
‎#*7288# = GPRS Detached/Attached.
‎#*7287# = GPRS Attached.
‎#*7666# = White Screen.
‎#*7693# = Sleep Deactivate/Activate.
‎#*7284# = L1 HO Data.
‎#*2256# = Calibration info? (For CMD set DEBUGAUTONOMY in ‎cihard.opt)
‎#*2286# = Databattery.
‎#*2527# = GPRS switching set to (Class 4, 8, 9, 10)
‎#*2679# = Copycat feature Activa/Deactivate.
‎#*3940# = External looptest 9600 bps.
‎#*4263# = Handsfree mode Activate/Deactivate.
‎#*4700# = Please use function 2637.
‎#*7352# = BVMC Reg value (LOW_SWTOFF, NOMINAL_SWTOFF)
‎#*2558# = Time ON.
‎#*3370# = Same as 4700.
‎#*3941# = External looptest 115200 bps
‎#*5176# = L1 Sleep.
‎#*7462# = SIM Phase.
‎#*7983# = Voltage/Freq.
‎#*7986# = Voltage.
‎#*8466# = Old Time.
‎#*2255# = Call Failed.
‎#*5187# = L1C2G trace Activate/Deactivate.
‎#*5376# = DELETE ALL SMS!!!!.
‎#*6837# = Official Software Version: (0003000016000702)
‎#*7524# = KCGPRS: (FF FF FF FF FF FF FF FF 07)
‎#*7562# = LOCI GPRS: (FF FF FF FF FF FF FF FF FF FF FF FE FF 01)
‎#*2337# = Permanent Registration Beep.
‎#*2474# = Charging Duration.
‎#*2834# = Audio Path. (Handsfree)
‎#*3270# = DCS Support Activate/Deactivate.
‎#*3282# = Data Activate/Deactivate.
‎#*3476# = EGSM Activate/Deactivate.
‎#*3676# = FORMAT FLASH VOLUME!!!
‎#*4760# = GSM Activate/Deactivate.
‎#*4864# = White Screen.
‎#*5171# = L1P1.
‎#*5172# = L1P2.
‎#*5173# = L1P3.
‎#*7326# = Accessory.
‎#*7683# = Sleep variable.
‎#*8465# = Time in L1.
‎#*2252# = Current CAL.
‎#*2836# = AVDDSS Management Activate/Deactivate.
‎#*3877# = Dump of SPY trace.
‎#*7728# = RSAV.
‎#*2677# = Same as 4700.
‎#*3728# = Time 2 Decod.
‎#*3725# = B4 last off.
‎#*7372# = Resetting the time to DPB variables.
‎#*7732# = Packet flow context bit Activate/Deactivate.
‎#*6833# = New uplink establishment Activate/Deactivate.
‎#*3273# = EGPRS multislot. (Class 4, 8, 9, 10)
‎#*7722# = RLC bitmap compression Activate/Deactivate.
‎#*2351# = Blinks 1347E201 in RED.
‎#*4472# = Hysteresis of serving cell: 3 dB
‎#*2775# = Switch to 2 inner speaker.
‎#*9270# = Force WBS.
‎#*7878# = FirstStartup. (0=NO, 1=YES)
‎#*3757# = DSL UART speed set to. (LOW, HIGH)
‎#*8726# = Switches USBACM to Normal.
‎#*8724# = Switches USBACM to Generator mode.
‎#*8727# = Switches USBACM to Slink mode.
‎#*8725# = Switches USBACM to Loop-back mode.
‎#*3838# = Blinks 3D030300 in RED.
‎#*2077# = GPRS Switch.
‎#*2027# = GPRS Switch.
‎#*0227# = GPRS Switch.
‎#*0277# = GPRS Switch.
‎#*8370# = Tfs4.0 Test 0.
‎#*8371# = Tfs4.0 Test 1.
‎#*8372# = Tfs4.0 Test 2.
‎#*8373# = Tfs4.0 Test 3.
‎#*8374# = Tfs4.0 Test 4.
‎#*8375# = Tfs4.0 Test 5.
‎#*8376# = Tfs4.0 Test 6.
‎#*8377# = Tfs4.0 Test 7.
‎#*8378# = Tfs4.0 Test 8.
‎#*8379# = Tfs4.0 Test 9.
‎#*7878# = FirstStartup. (0=NO, 1=YES)
‎#*3838# = Blinks 3D030300 in RED.
‎#*2077# = GPRS Switch.
‎#*2027# = GPRS Switch.
‎#*0227# = GPRS Switch.
‎#*0277# = GPRS Switch.
‎#*22671# = AMR REC START.
‎#*22672# = Stop AMR REC. (File name: /a/multimedia/sounds/voice ‎list/ENGMODE.amr)
‎#*22673# = Pause REC.
‎#*22674# = Resume REC.
‎#*22675# = AMR Playback.
‎#*22676# = AMR Stop Play.
‎#*22677# = Pause Play.
‎#*22678# = Resume Play.
‎#*77261# = PCM Rec Req.
‎#*77262# = Stop PCM Rec.
‎#*77263# = PCM Playback.
‎#*77264# = PCM Stop Play.
‎#*22679# = AMR Get Time.
‎*#8999*364# = Watchdog ON/OFF.
‎*#8999*427# = WATCHDOG signal route setup.
‎*2767*226372# = Camera Reset. (deletes photos)
‎*2767*3855# = E2P Full Reset.
‎*2767*2878# = E2P Custom Reset.
‎*2767*927# = E2P Wap Reset.
‎*2767*226372# = E2P Camera Reset.
‎*2767*688# = Reset Mobile TV.
‎#7263867# = RAM Dump. (On or Off)
‎
‎
wap / mms code:
‎ ‎*2767*73738927# = WAP Settings Reset.
‎
‎ ‏email code:
‎
‎#*36245# Turns Email TestMenu on.
‎*2767*22236245# Email EPP set (....)!
‎*2767*837836245# Email Test Account!
‎*2767*29536245# Email Test2 Account!
‎*2767*036245# Email EPP reset!
‎*2767*136245# Email EPP set (1)!
‎*2767*736245# Email EPP set (7)!
‎*2767*3036245# Email...
‎*2767*3136245# Email...
‎*2767*3336245# Email...
‎*2767*3436245# Email...
‎*2767*3936245# Email...
‎*2767*4136245# Email...
‎*2767*4336245# Email...
‎*2767*4436245# Email...
‎*2767*4536245# Email...
‎*2767*4636245# Email...
‎*2767*4936245# Email...
‎*2767*6036245# Email...
‎*2767*6136245# Email...
‎*2767*6236245# Email...
‎*2767*6336245# Email...
‎*2767*6536245# Email...
‎*2767*6636245# Email...
‎*2767*8636245# Email...
‎*2767*85236245# Email...
‎
‎
lock code:
‎ ‎*#7465625# = Check the locks.
‎*7465625*638*Code# = Enables Network lock.
‎#7465625*638*Code# = Disables Network lock.
‎*7465625*782*Code# = Enables Subset lock.
‎#7465625*782*Code# = Disables Subset lock.
‎*7465625*77*Code# = Enables SP lock.
‎#7465625*77*Code# = Disables SP lock.
‎*7465625*27*Code# = Enables CP lock.
‎#7465625*27*Code# = Disables CP lock.
‎*7465625*746*Code# = Enables SIM lock.
‎#7465625*746*Code# = Disables SIM lock.
‎*7465625*228# = Activa lock ON.
‎#7465625*228# = Activa lock OFF.
‎*7465625*28638# = Auto Network lock ON.
‎#7465625*28638# = Auto Network lock OFF.
‎*7465625*28782# = Auto subset lock ON.
‎#7465625*28782# = Auto subset lock OFF.
‎*7465625*2877# = Auto SP lock ON.
‎#7465625*2877# = Auto SP lock OFF.
‎*7465625*2827# = Auto CP lock ON.
‎#7465625*2827# = Auto CP lock OFF.
‎*7465625*28746# = Auto SIM lock ON.
‎#7465625*28746# = Auto SIM lock OFF.‎
Pretty extensive list. I believe the codes change from firmware to firmware.
Definately a sticky material.
PS : Please put a [REF] in your title, Otherwise this thread has a chance of getting kicked off to nowhere.
And all/most present in sgs tools...
dupel said:
And all/most present in sgs tools...
Click to expand...
Click to collapse
Which I believe is not available unless your phone is rooted.
Sgs tools works without root. At least as far as using its magic code functions.
Sent from my GT-I9000 using XDA App
And all/most present in sgs tools...
Load more in this list than on my SGS Tools .
jje

Categories

Resources