UART USB Linux Setup & Detection

View previous topic View next topic Go down

UART USB Linux Setup & Detection

Post by jamied_uk on 21st June 2017, 16:34

Vid

UART:


Remember to wire UART from TX To RX and RX To TX & Ground To Ground



Forum Link:

jnet.forumn.biz/t1518-uart-usb-linux-setup-detection#2256


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Software:

askubuntu.com/questions/285539/detect-and-mount-devices

stackoverflow.com/questions/9183880/how-to-find-out-which-usb-rs232-device-is-on-which-tty





Code:
ls /sys/bus/usb-serial/devices/ -ltrah




Ouputs:


ttyUSB0 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/ttyUSB0
drwxr-xr-x 2 root root 0 Jun 21 16:27 .


to confirm USB0




 

Code:
lsusb


 
 

Code:
lsblk




Code:
lshw | less




 
 
Code:
sudo apt install -y screen lshw


 
Code:
screen /dev/ttyUSB0 115200





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mounting:
Code:

mkdir /media/usbstick

mount -t vfat /dev/sdb1 /media/usbstick

mount /dev/hda1 /home/user/Desktop/whereEver

sudo mount /dev/hda1 /home/user/Desktop/whereEver



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Code:
    dmesg
    sudo fdisk OR sudo fdisk -l
    sudo blkid
    lsblk
    mount
    lsusb
    usb-devices
    df -h






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


 4
down vote
   
Manually Mount a USB Drive

A USB storage device plugged into the system usually mounts automatically, but if for some reasons it doesn't automount, it's possible to manually mount it with these steps.

    Press Ctrl+Alt+T to run Terminal.
    Enter
Code:
sudo mkdir /media/usb

to create a mount point called usb.
    Enter
Code:
sudo fdisk -l

to look for the USB drive already plugged in, let's say the drive you want to mount is /dev/sdb1.

    To mount a USB drive formatted with FAT16 or FAT32 system, enter:

Code:
sudo mount -t vfat /dev/sdb1 /media/usb -o uid=1000,gid=100,utf8,dmask=027,fmask=137



    OR, To mount a USB drive formatted with NTFS system, enter:

Code:
sudo mount -t ntfs-3g /dev/sdb1 /media/usb



To unmount it, just enter sudo umount /media/usb in the Terminal.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stackoverflow.com/questions/9183880/how-to-find-out-which-usb-rs232-device-is-on-which-tty


Code:
cat /etc/udev/ftdi.rules





SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTDEN97D", SYMLINK+="ttyFTDI0"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A600b30P", SYMLINK+="ttyFTDI1"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A600bexU", SYMLINK+="ttyFTDI2"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTFMSA54", SYMLINK+="ttyFTDI3"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTFMUW4A", SYMLINK+="ttyFTDI4"
avatar
jamied_uk
Admin

Posts : 2193
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: UART USB Linux Setup & Detection

Post by jamied_uk on 21st June 2017, 16:43

More


encrypted.google.com/search?q=usb+on+linux#q=10+common+things+that+use+uart


encrypted.google.com/search?biw=1366&bih=573&q=uart+tutorial&sa=X&ved=0ahUKEwi42N36oM_UAhVhJcAKHWiGBxkQ1QIIYygB
avatar
jamied_uk
Admin

Posts : 2193
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum