Can u share CODE witch API is being used by MPE??

For user who dont speak german please use this part of my forum
blackmarlincode
Beiträge: 9
Registriert: Di 3. Jul 2007, 03:08
Kontaktdaten:

Can u share CODE witch API is being used by MPE??

Beitrag von blackmarlincode »

Continue working with VB6, an in my final project for gradute of Electrical Engineering, Jember university, Indonesia.

i had problems while my program want to search device that connected to the PC, I've search entire PlanetSourceCode.com for API's that can detect this new hardware, but found nothing there.. :( :(

Ideas:
I used bruteforce method, sending AT+GMM for each COM port, the one that replies with phone model, is being used.

The problems is:
With bruteforce methods, it's take a lot of time just for searching device.
I used "gettickcount" to make it more faster, but the results is more faster, is more undetectable... :( :( :(

It tooks about 3-5 second is used to scan port that is assign by the phone

Can u share the code of API find those port automatically???


Bild
Zuletzt geändert von blackmarlincode am Sa 8. Sep 2007, 00:55, insgesamt 1-mal geändert.
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

If you press "Search device" then MyPhoneExplorer also opens every port and checks with AT-Commands. The code is not faster than yours. Or do you mean the descriptions behind COMxx ?
blackmarlincode
Beiträge: 9
Registriert: Di 3. Jul 2007, 03:08
Kontaktdaten:

Beitrag von blackmarlincode »

Same method too.. I use Hacked Mscomm32.OCX, fo fix problems with searching Device COM that being assign by Win**** X*. Now it can read COM port after COM16..
Yap, that's what i mean, i wonder how can you read the description after COM? What method being used? Or API's is being used? Or read from registry value?? :?: :?: :?:

The 2nd question is:
Why is the signal strenght which replies from my software different from yours? It's different in "dBm" but almost same in percentage "%"
How long timer being used to read and refressh this value? I used 250ms.
Because MPE is being used as valid comparator for my programs.

Thanks for your help
This is screenshoots my software called "GSM GPRS Speedtest"
Zuletzt geändert von blackmarlincode am Sa 8. Sep 2007, 23:49, insgesamt 1-mal geändert.
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

You write a software and you want to use a hacked microsoft-lib in it ? Are you crazy ? You never can distribute this software to anybody.

The source-code for the descriptions is not from me - its from a good friend. You must contact him to give the source to you (its the developer of the software s25@once)

Maybe you convert the signal with the wrong algo. You'll find the right algo in the AT-Commandrefrence of SE. The Monitor of MyPhoneExplorer refreshes every 5 seconds. Thats enought.

A tip: Remove the SE-Logo from your program. I had to do this too. You can get with it massive Copyright-Problems.
blackmarlincode
Beiträge: 9
Registriert: Di 3. Jul 2007, 03:08
Kontaktdaten:

Beitrag von blackmarlincode »

Yah i know that the wrong way, using hacked mscomm32, that's because mscomm32.ocx original licenced from VB6 my only read untill COM Port 16... Only few device can be connected at same time. My bluetoohh device "eat" a lot COM port ( about 8 COM Port is being used only for bluetooth )
Any solution? or i should email your friends? What is the email address?

Thx about info, i'will remove any SE logo on it 8) 8)

I've use command reference from SE,

Code: Alles auswählen

    Dim Sinyal As Integer
    Dim Desibel As String
         'the parsing methode to get exacly value 
        Sinyal = ParseSignalStrength(RunATCommand("AT+CSQ"))
        Select Case Sinyal
        Case 0
            Desibel = "-113"
        Case 1
            Desibel = "-111"
        Case 2 To 30
            Desibel = Str(-109 + (Sinyal - 2) * 2)
        Case 31
            Desibel = "-51"
        Case 99
            Desibel = "Tidak Terdeteksi"
    End Select

    'methode for put those detected value into inputbox.text 
    SignalDBM.Text = Desibel + "dBm"
    SignalPercent.Text = FormatNumber(Sinyal / 31 * 100, 1, vbUseDefault, vbUseDefault, vbUseDefault) + "%"
Is that wrong???
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

My algo:

Code: Alles auswählen

Dim val as Integer

   Select Case val
    Case 0: dbm = -113
    Case 1: dbm = -111
    Case 2 To 30: dbm = -49 - (2 * val)
    Case 31: dbm = -51
   End Select
   percent = Round(100 / 31 * val)
Long time ago i wrote this piece of code, but i think the algo is correct.
Antworten