Arduino wireless programming over WiFi

From XinCheJian
Jump to navigation Jump to search
   
Arduino wireless programming

Release status: unknown [box doku]

Description Arduino wireless programming over WiFi
Author(s)  User:Edwardrf User:Spanner
Last Version  v0.01

Arduino wireless programming over WiFi

For all sorts of reasons you might want to remotely upload programs to your Arduino without having it tethered by cable to your computer.

This page is draft - incomplete and while proceedure DOES WORK - information here is not yet complete :)


How it works - overview

Connect the TPLINk WiFi device to your Arduino board via USB cable and power the TPLINK.

  • Ard GUI compiles code and runs AVRDude
  • AVRDude tries to connect to serial port and upload code
  • Local progam socat/com0com/????MAC??? - redirects serial data to remote WiFi via local computer WiFi
  • Remote WiFi devices runs script/programs to reset Arduino and upload the code via serial.
  • USB 2 hub - might be required between remote WiFi and Arduino
  • Both local computer and remote WiFi devices run socat (or com0com on Windows). This creates socket and directs the USB serial data accross the WiFi link
  • package nb... = for hostname/dhcp stuff
  • xinetd listens for incoming requests over a network and launches the appropriate service for that request
    • 1. stty resets Arduino via DTR
    • 2. socat -> tty
    • ie takes incoming data and sends to serial port of Arduino
  • more cmds go here.....
  • Connect/pair/whatever your computer to the TPLINK WiFi
  •  ????also required to hostname/DHCP/???? on remote WiFi
  •  ?? other parts of remote WiFi script??)

Scripts or instructions or something

go here

Hardware required

Arduino board TPLink - WRT703N or similar Might be able to use other Linux based bevices like the A5 - need to look into this. Computer with WiFi

Other usefull info

The default TPLINK firmware opkg configuration points to newer repo which has higher req than default tplink configuration. So the easiest way to fix this is load OpenWrt - see XinCheJian's great instructions here.

windows termnal - putty


Arduino USB 1.1 = unstable - widely known?? RESEARCH so add USB 2 hub between WiFi device and Arduino Errors are like???

USB 2 hub MAY o rmay not be required!!!! Uno failed with first one tried . tried again later - OK - so maybe was needed hub reset after tplink fw upgrade 2nd one OK error was just avrdude did not est coms - but board was reset and low level coms OK


stty -F /dev/ttyUSB0 cs8 57600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -is ig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts stty -F /dev/ttyUSB0 hupcl /usr/bin/sleep 0.1 stty -F /dev/ttyUSB0 -hupcl


busy box delay min = 1 sec - bit long for ard

tplink needs dif drivers for each arduino ?? may get issues if have Ard clone - for now we just went to real Ard Edward - 2 dif doc/scripts uno also has dif serial speed


opkg grep sleep to find....

script for opkg packages required

don't forget can use Ard gui detailed display on upload

  • Things to check out:
    • does Ard terminal work
    • Do OTHER terminal work??