elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Mensajes
Páginas: 1 [2]
11  Comunicaciones / Hacking Mobile / C# System.IO.Port SerialPort en: 1 Mayo 2006, 01:52 am
Estoy haciendo una mini aplicacion en C# para hacer una consola de comandos AT para enviar a mi telefono por el puerto com, pero solo e logrado conectarme al equipo. pero este no atiene los comandos que le envio, alguien ya ah hecho esto?

public partial class Form1 : Form
    {
        private SerialPort port = new SerialPort("COM7", 96000, Parity.None, 8, StopBits.One);

        public Form1()
        {
            InitializeComponent();
            port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
        }

        private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            this.Invoke(new EventHandler(DoUpdate));
        }

        private void DoUpdate(object s, EventArgs e)
        {
            txtLog.AppendText("----------------\n");           
            txtLog.AppendText(port.ReadExisting());
        }

        private void btnConectar_Click(object sender, EventArgs e)
        {
            if (port.IsOpen == false)
            {
                try
                {
                    port.Open();
                    txtLog.AppendText("Conectado COM7\n");
                }

                catch (Exception oex)
                {
                    MessageBox.Show(oex.ToString());
                }
            }
        }

        private void btnDesconectar_Click(object sender, EventArgs e)
        {
            if (port.IsOpen)
            {
                port.Close();
                txtLog.AppendText("Cerrada la conexion...\n");
            }
        }

        private void btnEnviar_Click(object sender, EventArgs e)
        {
            try
            {
                port.WriteLine(txtCmd.Text);

            }
            catch (Exception wex)
            {
                MessageBox.Show(wex.ToString());
            }
        }
    }
12  Comunicaciones / Hacking Mobile / AT via bluetooth mouse move en: 29 Abril 2006, 03:24 am
He estado revisando el codigo fuente de fma.sf.net, ya que me parecio excelente las opciones que tiene, especialmente la de mover el mouse con el joystick,  en el fuento no encontre mucho, ya que por lo visto se basa en puros scripts, mi intencion es hacer mi propia implementacion de esa funcionalidad, pero escrita en C/C++, alguien que me pueda ayudar?

pseudo idea:

while(1)
{
     direccionJoystick = mandarAT()
     case direccion
     {
         derecha:
          winapi.drawmouseXY(winapi.getmousePos().x++,winapi.getMousePos().y)
        //etcetera
      }
}

PD: no se burlen de lo horrendo del codigo....es solo una idea..


saludos
Páginas: 1 [2]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines