In this post I will show you how I connected an Arduino Uno to my TPLink TL-WR703N running OpenWrt Backfire via the USB port. One thing to note is that it is much easier to trouble shoot if you are connected to the router with a serial cable.
Setup
First we need to make sure that we have the USB drivers that we need:
|
opkg update opkg install kmod-usb-ohci |
|
Next we will install the drivers package that will support the Arduino:
|
opkg update opkg install kmod-usb-acm |
|
Now when you plug the Arduino into the TL-WR703N, you should see that it is recognized (you will only see this if you are connected to the router with the serial cable):
|
usb 2-1: new full speed USB device using ohci_hcd and address 3 usb 2-1: configuration #1 chosen from 1 choice cdc_acm 2-1:1.0: ttyACM0: USB ACM device |
|
We should be able to find a new addition for the Arduino in the following location:
Testing
Now that we have the Arduino installed, lets test it to see if we can send serial commands to it. We can use the LED example included with the Arduino software to test it. Using your computer, upload the PhysicalPixel sketch from File > Examples > Communication > PhysicalPixel to the Arduino. After you upload the sketch, plug it into the WGT634u and lets test it out. In this example when we send a “H” the LED on the Arduino will light and when we send a “L” the LED will go off.
Turn off the led:
|
echo "L" > /dev/ttyACM0 |
|
Turn on the led:
|
echo "H" > /dev/ttyACM0 |
|
Summary
So now you have successfully connected your Arduino Uno to your Tplink TL-WR703N via the USB port and demonstrated that you can communicate with it via serial commands.