Pregunta

necesito para generar y enviar SMS SyncML OTA. Tengo proveedor de SMS que puede enviar SMS binario. Pero estoy un poco atascado en la especificación de la OTA y seré muy feliz si usted me punto a cualquiera de los siguientes:

  1. una herramienta de código abierto que puede generar OTA sms de algunas propiedades proporcionadas.
  2. Una buena visión general o un tutorial sobre cómo hacer OTA SMS (espec OTA parece no se puede leer en absoluto)

Gracias de antemano!

¿Fue útil?

Solución

que necesita para producir siguiente documento XML OMA-DP y enviarlo a su proveedor de servicios de puerta de enlace. Debe seguir estrictamente el formato para el mensaje que se identifica como mensaje de configuración por parte del teléfono. También en contacto con su proveedor de servicio y preguntarles si pueden convertir una presentación XML para SMS sobre la marcha. Ellos tendrán que codificar el XML en WBXML y luego reenviar el mensaje en modo PDU.

<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
  <characteristic type="BOOTSTRAP">
    <parm name="NAME" value="SYNCSETTINGS" />
  </characteristic>
  <characteristic type="APPLICATION">
    <parm name="APPID" value="w5" />
    <parm name="TO-NAPID" value="INTERNET" />
    <parm name="NAME" value="SYNCSETTINGS" />
    <parm name="ADDR" value="http://syncserver/sync" />
    <characteristic type="RESOURCE">
      <parm name="URI" value="pb" />
      <parm name="NAME" value="Contacts DB" />
      <parm name="AACCEPT" value="text/x-vcard" />
    </characteristic>
    <characteristic type="RESOURCE">
      <parm name="URI" value="cal" />
      <parm name="NAME" value="Calendar DB" />
      <parm name="AACCEPT" value="text/x-vcalendar" />
    </characteristic>
    <characteristic type="RESOURCE">
      <parm name="URI" value="notes" />
      <parm name="NAME" value="Notes DB" />
      <parm name="AACCEPT" value="text/plain" />
    </characteristic>
    <characteristic type="APPAUTH">
      <parm name="AAUTHNAME" value="username" />
      <parm name="AAUTHSECRET" value="password" />
    </characteristic>
  </characteristic>
</wap-provisioningdoc>

Aquí está la función en C # para producir por encima mencionado documento XML.

public string CreateOTAXmlFile(string Username, string Password)
    {
        var ota = new XDocument(
                    new XElement("wap-provisioningdoc",
                        new XElement("characteristic", new XAttribute("type", "BOOTSTRAP"),
                            new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "SYNCSETTINGS"))
                                    ),
                        new XElement("characteristic", new XAttribute("type", "APPLICATION"),
                            new XElement("parm", new XAttribute("name", "APPID"), new XAttribute("value", "w5")),
                            new XElement("parm", new XAttribute("name", "TO-NAPID"), new XAttribute("value", "INTERNET")),
                            new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "SYNCSETTINGS")),
                            new XElement("parm", new XAttribute("name", "ADDR"), new XAttribute("value", "http://syncserver/sync")),
                            new XElement("characteristic", new XAttribute("type", "RESOURCE"),
                                new XElement("parm", new XAttribute("name", "URI"), new XAttribute("value", "pb")),
                                new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "Contacts DB")),
                                new XElement("parm", new XAttribute("name", "AACCEPT"), new XAttribute("value", "text/x-vcard"))
                                        ),
                            new XElement("characteristic", new XAttribute("type", "RESOURCE"),
                                new XElement("parm", new XAttribute("name", "URI"), new XAttribute("value", "cal")),
                                new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "Calendar DB")),
                                new XElement("parm", new XAttribute("name", "AACCEPT"), new XAttribute("value", "text/x-vcalendar"))
                                        ),
                            new XElement("characteristic", new XAttribute("type", "RESOURCE"),
                                new XElement("parm", new XAttribute("name", "URI"), new XAttribute("value", "notes")),
                                new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "Notes DB")),
                                new XElement("parm", new XAttribute("name", "AACCEPT"), new XAttribute("value", "text/plain"))
                                        ),
                            new XElement("characteristic", new XAttribute("type", "APPAUTH"),
                                new XElement("parm", new XAttribute("name", "AAUTHNAME"), new XAttribute("value", Username)),
                                new XElement("parm", new XAttribute("name", "AAUTHSECRET"), new XAttribute("value", Password))
                                        )
                                    )
                                )
                            );

        ota.Save(Server.MapPath("~/OTA/") + Username + ".xml");
        return (ota.ToString());

    }
  

[PS: Créeme, esto se puede hacer a través de incluso   un módem GSM también!]

Gracias.

Ruchit S.

Otros consejos

Tenga una mirada aquí . Es bastante viejo, pero creo que el href="https://redmine.kannel.org/projects/kannel/repository/show/trunk/gw" rel="nofollow noreferrer"> código fuente debe mostrar una poco cómo crear y enviar SMS de OTA.

scroll top