Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send sms form vfp
Message
De
24/05/2006 10:22:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01123887
Message ID:
01124520
Vues:
18
>thanks for sending file:
>
>Joaquim i send message with this, i get message send success. But message not reache at phno.may be require some chnage can u tell me.
>I have gsm phone
>i am trying to sending comport 5 using bluetooth. send form mobile phone via blue tooth. I have more than nine no(03336311974) how to amend this in prg
>thanks


Khalid,

We can talk by mail (it’s easier than by phone :)

I think that for this program work in your country you should do the following corrections:

1)
In pdu.prg, correct function telefone_pdu. For your number(03336311974), it should look like:
function telefone_pdu
	lparameters m.telefone
	local m.telefonepdu
	m.telefone = alltrim(m.telefone)
	
	* Number must be exactly 11 digits, not more
	if len(alltrim(m.telefone)) > 11
		m.telefone = right(m.telefone,1)
	endif
	
	* Number must be at least 11 digits
	m.telefone = padl(m.telefone,11,"0")

	m.telefonepdu = substr(m.telefone,2,1) + substr(telefone,1,1) + substr(m.telefone,4,1) + substr(telefone,3,1) + ;
			substr(m.telefone,6,1) + substr(telefone,5,1) + substr(m.telefone,8,1) + substr(telefone,7,1) + ;
			substr(m.telefone,10,1) + substr(telefone,9,1) + ;
			"F" + substr(telefone,9,1) + substr(m.telefone,11,1)
return m.telefonepdu
Now the result number for the above example it should be: 3033361179F4.
You get the same result?


2)
In form method form1.met_enviar, variable m.tamanho_numero = "0B", because the length of your phone number is 12 characters ("0B" in Hexa).

3)
In this same method, If I’m trying to send the message "Hello, i'm sending this text with VFP", the variable m.pdu it should look like this:
m.pdu = "001100" + m.tamanho_numero + m.tipo_telefone + telefone_pdu(m.telefone) + "0000AA" + m.numero_septetos_mensagem + m.texto + chr(26) + chr(13) + chr(10)
where :
m.tamanho_numero = “0B” (as seen above)
m.tipo_telefone = “81” (because you don't use the international format for Pakistan, in that case it should be "91")
m.telefone_pdu = “3033361179F4” (as seen above)
m.numero_septetos_mensagem = “8E” (142 in hexa)
m.texto = C8329BFD6681D2A736685E7693D3EE33888E4ECF41F4329E0EBAA7E96890D5080581402010080402814020100804028140201008040281402010080402814020100804028140201008040281402010080402814020100804028140201008040281402010080402814020100804028140201008040281402010080402814020100804028140201008040281402010
(The result of converting the text message "Hello, i'm sending this text with VFP" to a Hexadecimal string.)
If you got this results, i think there‘s no reason to the sms do not work.

Tell me if it work, if don’t, I’ll try to help you to correct your code.

Joaquim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform