39 AE605 Remote Control via UART
39.1 Histroy
- 2014-11-25, rayoslee, release V0.0.2
- 2014-11-25, rayoslee, release V0.0.1
39.2 FAQ
How to set server socket tool(TCP_Server.exe) in Window PC/NB ?
Follow the view- run TCP_Server.exe(IDE: c++ builder 2009) give the local ip(PC/NB) and port number.
- check on “Connect”.
- wait for AE605 connecting, you will see IPs information in “Tag” window if AE605 connected
- once AE605 connected with server, AE605 will keep waiting until the message from server coming
- now you can send message from server tool and click button “Send”. Please follow the Figure 39.1
How to configure AE605’s wifi station mode?
- prepare an AP(set it “Authentication Mode is OPEN, Encrypt Type”NONE“)
- open your NB wifi and access SSID AE605_xxxxx (xxxxx is mac address)
- give it password 12345678 and open NB’s browser to enter 192.168.100.1
- you will see AE605’s home page and give it ID/Password admin/admin to login
- don’t care about what you see and focus on “Network Config” of the left side to configure
- look for tag “SSID” of “Wireless Network” if it is empty, please give it your AP’s SSID
- then click “Save” of “Wireless Network” and “Reboot” of “Wireless Newwork”
- Now, AE605 is rebooting…
- prepare an AP(set it “Authentication Mode is OPEN, Encrypt Type”NONE“)
How to set client socket(ae605_CS_hdlc_uart_loop_arm) in AE605 demo kit?
- plug in usb-uart debug cable and link it with PC/NB
- power on AE605 and turn on putty(baud rate 115200) at PC/NB
- you will see “msloader done.” and give it “Enter” key on putty window.
- you can ifconfig to check wlan0 whether linked or not to make sure item 2 has done.
- basically, it has linked. Now, turn on ae605_CS_hdlc_uart_loop_arm
/mnt/nand1-1 #
ae605_CS_hdlc_uart_loop_arm 192.168.0.105 5100 115200 (assume your server ip/port/baud rate is it)
About communication packet as the following
HDLC packet:
7E-payload type(1Byte)-payload(n-Byte)-FCS(2-Byte)-7EServer.Send packet format: PacketType+Payload
Client.Recv packet format: PacketType+PayloadAE605.UartTX packet format: 7E-PacketType+Payload-FCS-7E
AE605.UartRX packet format: 7E-PacketType+Payload-FCS-7E
Server.Recv packet fromat: 7E-PacketType+Payload-FCS-7E
Client.Send packet format: 7E-PacketType+Payload-FCS-7E
- plug in usb-uart debug cable and link it with PC/NB
How to set server socket(serverSS) in NB(Ubuntu) or (serverSS_arm) in AE605? (default port 8000)
- only run ./serverSS or ./serverSS_arm
Log will look like the bellow
$ ./serverSS Accepting connections ... Received Bytes: 6 received from client:474F474F474F Enter payload type(0, 1, 2, 3, 80 and 99(Rand): 99 xstr[0]=0x99 Enter random len(less than 1024): 20 len=20 send_buf[1] = 0xAA send_buf[2] = 0xA8 send_buf[3] = 0xDB send_buf[4] = 0xD1 send_buf[5] = 0xF4 send_buf[6] = 0x3E send_buf[7] = 0xA6 send_buf[8] = 0x11 send_buf[9] = 0x65 send_buf[10] = 0xD4 send_buf[11] = 0xB2 send_buf[12] = 0xC0 send_buf[13] = 0x58 send_buf[14] = 0xDA send_buf[15] = 0x0A send_buf[16] = 0x88 send_buf[17] = 0x26 send_buf[18] = 0x28 send_buf[19] = 0x74 Received Bytes: 24 received from client:7E99AAA8DBD1F43EA61165D4B2C058DA0A88262874BEEE7E Enter payload type(0, 1, 2, 3, 80 and 99(Rand):