查看: 5477|回复: 0

局域网协议

[复制链接]

该用户从未签到

1

主题

13

积分

0

精华

新手上路

Rank: 1

积分
13
发表于 2016-1-1 10:25:50 | 显示全部楼层 |阅读模式
本帖最后由 recover 于 2016-1-1 10:27 编辑

SendHexData("HF-A11ASSISTHREAD");
public void sendDataATQ()
    throws IOException, InterruptedException
  {
    this.sBuffer = "AT+Q\n".getBytes(this.currentSCodes);
    System.out.println("@@@@@@@@@@@@@@@@----" + "AT+Q\n" + "---@@@@@@@@@@@@@@@@@");
    this.sPacket = new DatagramPacket(this.sBuffer, this.sBuffer.length, InetAddress.getByName(this.remoteIp), 48899);
    this.sUdp.send(this.sPacket);
  }
  
  public void sendDataATZ()
    throws IOException, InterruptedException
  {
    this.sBuffer = "AT+Z\n".getBytes(this.currentSCodes);
    this.sPacket = new DatagramPacket(this.sBuffer, this.sBuffer.length, InetAddress.getByName(this.remoteIp), 48899);
    System.out.println("@@@@@@@@@@@@@@@@----AT+Z---@@@@@@@@@@@@@@@@@");
    this.sUdp.send(this.sPacket);
  }
  
  public void sendDataChuanKou()
    throws IOException
  {
    this.sBuffer = "AT+EPHY=off\n".getBytes(this.currentSCodes);
    this.sPacket = new DatagramPacket(this.sBuffer, this.sBuffer.length, InetAddress.getByName(this.remoteIp), 48899);
    System.out.println("@@@@@@@@@@@@@@@@----AT+EPHY=off---@@@@@@@@@@@@@@@@@");
    this.sUdp.send(this.sPacket);
  }
  
  public void sendDataHf()
    throws IOException, InterruptedException
  {
    if (this.sUdp == null) {
      this.sUdp = new DatagramSocket();
    }
    this.sBuffer = "HF-A11ASSISTHREAD".getBytes(this.currentSCodes);
    this.sPacket = new DatagramPacket(this.sBuffer, this.sBuffer.length, InetAddress.getByName(this.remoteIp), 48899);
    int i = 0;
    for (;;)
    {
      if (i >= 5) {
        return;
      }
      System.out.println("@@@@@@@@@@@@@@@@----" + "HF-A11ASSISTHREAD" + "---@@@@@@@@@@@@@@@@@");
      Thread.sleep(100L);
      this.sUdp.send(this.sPacket);
      i += 1;
    }
  }
  
  public void sendDataHfAllShow()
    throws IOException, InterruptedException
  {
    this.sBuffer = "AT+FAPSTA=on\n".getBytes(this.currentSCodes);
    this.sPacket = new DatagramPacket(this.sBuffer, this.sBuffer.length, InetAddress.getByName(this.remoteIp), 48899);
    System.out.println("@@@@@@@@@@@@@@@@----AT+FAPSTA---@@@@@@@@@@@@@@@@@");
    this.sUdp.send(this.sPacket);
  }
  
  public void sendDataOk()
    throws IOException
  {
    this.sBuffer = "+ok".getBytes(this.currentSCodes);
    this.sPacket = new DatagramPacket(this.sBuffer, this.sBuffer.length, InetAddress.getByName(this.remoteIp), 48899);
    System.out.println("@@@@@@@@@@@@@@@@----" + "+ok" + "---@@@@@@@@@@@@@@@@@");
    this.sUdp.send(this.sPacket);
  }
  
  public void sendDataWmodeApSta()
    throws IOException, InterruptedException
.........................保密 ..............
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

官网|社区

GMT+8, 2023-1-28 20:57 , Processed in 0.050205 second(s), 22 queries .

Powered by Discuz! X3.1

Copyright © 2014 Reco4Life All Rights Reserved.

快速回复 返回顶部 返回列表