Wednesday, 7 March 2018

Tinkering OpenWRT (6) : Connect Raspberry Pi to Computer with TTL-USB Converter FTDI

It must be frustrating to use a Pi as a new computer and give it all the peripherals like mouse and keyboards and most annoying one, an extra monitor. We can simply use the serial port to connect the Pi with Computer. Here is how.

Step 1:
Plug in the FTDI module and do:
       ls /dev/ttyUSB*
usually FTDI is mounted at ttyUSB0.

Step 2:
Conncet FTDI with your PI, I am using B+ model.




Step 3:
      screen /dev/ttyUSB0 115200

And voila!

BusyBox v1.23.2 (2016-01-31 10:28:42 CET) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (15.05.1, r48532)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/# [   19.795613] random: nonblocking pool is initialized

root@OpenWrt:/# 

Step 4: Blinky
root@OpenWrt:/# ls -1 /sys/class/leds/
led0

root@OpenWrt:/# echo 1 > /sys/class/leds/led0/brightness     // ? just blink?
root@OpenWrt:/# echo 1 > /sys/class/leds/led0/brightness     // ? just blink?
root@OpenWrt:/# echo 1 > /sys/class/leds/led0/brightness     // ? just blink?
root@OpenWrt:/# echo 0 > /sys/class/leds/led0/brightness     // off
root@OpenWrt:/# echo 1 > /sys/class/leds/led0/brightness     // NOW KELP ON ??!!!


ref:
http://caoyudong.com/2015/10/03/%E9%80%9A%E8%BF%87USB%E8%BD%AC%E4%B8%B2%E5%8F%A3%E6%A8%A1%E5%9D%97%E8%BF%9E%E6%8E%A5%E6%A0%91%E8%8E%93%E6%B4%BE/
http://ediy.com.my/index.php/tutorials/item/131-openwrt-control-led-manually
http://hacklabos.org/2014/04/playing-with-gpio-and-sensors-on-openwrt/

No comments:

Post a Comment