Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
bjr,
Sur un appli client-serveur logistique en pb9 nous souhaiterions envoyer un sms au client sur son te.
quelqu'un a-t-il un script pb?
que peux-t-on utiliser comme utilitaire ou site?
Dernière modification par thiboulou (07-10-2008 01:01:40)
Hors ligne
tr1l0b1t:
Using MSComm32.ocx ...you must send AT GSM commands to the modem.
This page will be useful to get the basics : http://www.traud.de/gsm/sms.htm
Full list & specifications of AT GSM commands are at ETSI page :
(http://webapp.etsi.org/key/key.asp?GSMS … cPart2=005)
...an extract :
SMS Commands SMS Text Mode
---------------------------------------
AT+CSMS Select Message Service
AT+CPMS Preferred Message Storage
AT+CMGF Message Format
AT+CSCA Service Centre Address
AT+CSMP Set Text Mode Parameters
AT+CSDH Show Text Mode Parameters
AT+CSCB Select Cell Broadcast Message Types
AT+CSAS Save Settings
AT+CRES Restore Settings
AT+CNMI New Message Indications to TE
AT+CMGL List Messages
AT+CMGR Read Message
AT+CMGS Send Message
AT+CMSS Send Message from Storage
AT+CMGW Write Message to Memory
AT+CMGD Delete Message
PB source code should be something like this (just pseudocode):Code: pb
String ls_data OLEObject ole_1 ole_1 = create OLEObject ole_1.ConnecttoNewobject("MScommlib.Mscomm") // Configure the communication's port ole_1.object.CommPort = 1 ole_1.object.Settings = "9600, N, 8, 1" ole_1.object.InputLen = 0 // Open it ole_1.object.PortOpen = True // Send data ole_1.object.Output = "AT " + char (13) // Wait for "OK" response Do ls_data += ole_1.object.Input LOOP Until (Pos (ls_data, "OK") > 0) // Close port ole_1.object.PortOpen = FALSE ole_1.DisconnectObject()
As you see, it's a very extensive subject but I hope
you got the idea. I reccommend you to test AT commands with
Hyperterminal, then code the working sequence in PB.
Regards
Hors ligne
Bonjour,
thiboulou si ton souci est règlé, merci de préciser le résolu dans le titre de ta demande
Hors ligne
bjr,
merci pour ta réponse rapide, je vais tester et te tiens au courant...
Hors ligne