mercoledì 11 maggio 2016

OPENWRT - Using Sanguinololu as USB to serial adapter USB2TTL

I had to connect to the serial interface of a router with OpenWRT, the router is Pirelli AGPF .
My old cable (a CA42 Nokia Cable) was broken, so I tryed with a crappy usb 2 serial adapter with ch340 chip with no luck.

I remeber I have a spare Sanguinololu board that I buyed to replace my old one on my 3D Printer. I have seen is possible to use an Arduino Uno to act as usb to serial interface, so I thinked the Sanguinololu could do the same.

Ok, let me explain...

IMPORTANT : To enable the serial socket we need to short the reset pin to the ground in some way, I used an old jumper to keep the board resetted.

Under the USB female port of the Sanguinololu there is a socket labelled USB2TTL , in my case nothing is soldered to it.
We will use Tx , Rx and Ground on USB2TTL socket.

Could be a good idea to test the socket firing up your favourite program (hyperterminal, putty, minicom ecc) shorting Tx with Rx and check if typing something there is a return on the console.

If you want you can solder some male pins to Rx  , Tx and GND but I found a less invasive solution.
Looking the ATMEGA pinout http://reprap.org/wiki/Sanguinololu#Pin_Assignments

I found these pins on ATMEGA socket that are connected to the corrispective pins under the USB port:
  •  ftdi Tx on pin 14
  •  ftdi Rx on pin 15 
  •  GND on pin 31
So I removed the ATMEGA chip and inserted 3 needles on that and used alligator clips to connect to my router Rx , Tx and GND.

Aggiungi didascalia

This solution seems intresting because is fully reversible without soldering nothing on Sanguinololu board.

Maybe could work in other similar platform where there is an arduino-like board.

By the way .. ther router was successfully recovered.




Nessun commento:

Posta un commento