Sample Page
Lifestyle BloggerThis is an example page. It’s different from a blog post because it will stay in one place and will
All devices connected to USB are allotted different identity /dev/ttyUSB* which can change depending upon various factors resulting in error while executing python scripts for mmWave radar orrs485 to USB convertor. In order to uniquely identify USB connected devices we need to define rules.
Step1 Connect all USB devices to companion computer and use the below command to identify unique identifiers.
udevadm info --name=/dev/ttyUSB0 --attribute-walk
Similarly do for udevadm info –name=/dev/ttyUSB1 –attribute-walk, udevadm info –name=/dev/ttyUSB2 –attribute-walk, udevadm info –name=/dev/ttyUSB3 –attribute-walk and so on
Step2 Add the rules as given below to uniquely identify USB connected devices-
sudo nano /etc/udev/rules.d/99-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="usb2uart"
SUBSYSTEM=="tty", ATTRS{interface}=="Standard Com Port", ATTRS{bInterfaceClass}=="ff", SYMLINK+="data"
SUBSYSTEM=="tty", ATTRS{interface}=="Enhanced Com Port", ATTRS{bInterfaceNumber}=="00", SYMLINK+="config"
SUBSYSTEM=="tty", ATTRS{idVendor}=="2109", ATTRS{bDeviceClass}=="09" ,ATTRS{version}==" 2.10", SYMLINK+="rs485"
Step3 Update the rules
sudo udevadm control --reload-rules && udevadm trigger
Now for example in my case instead of /dev/ttyUSB0 for a convertor (RS485 to USB), I can use /dev/usb2uart in python script and it won’t change.
We require to take backup of SD card to save our OS with configuration from any SD card failure and the ability to quickly restore the configuration incase of SD card failure. I have used Win32DiskImager. This application can take backup of SD card of Beagle Bone Blue or Raspberry Pi 4but not for Jetson Nano. The process is explained in the photo below. Need to provide the directory path for backup including the destination filename i.e backup file name. The extension of backup must be .img (image file). We click Read to begin the backup process as SD card is auto detected unless working on more than two SD cards simultaneously. The backup generated is the replica of the original SD card containing the OS with all configurations done till now and can be readily used.
Backup of Jetson Nano SD Card The backup of Jetson Nano SD card is quite different from the process above. We need a Linux machine to take backup. We will use the dd command which is the oldest disk imaging tool on Linux.
Step 1 Use Disks GUI application to check for the SD card details still in use.
Step 2 Make sure the SD card is unmounted.sudo umount /dev/sdX
where X is SD card name
Step 3 Now we create backup in the home directorysudo dd if=/dev/sdX conv=sync,noerror bs=64K | gzip -c > ~/backup_image.img.gz
Step 4. Now we can move this backup to windows and use any SD card flashing tool to flash SD card as discussed in earlier chapters.
Step 5 If we wish to restore back on SD card in Linux itselfsudo su
$ gunzip -c ~/backup_image.img.gz | dd of=/dev/sdX bs=64K
Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) .It allows GUI based system access. We login to Raspberry Pi and run the below mentioned commands to install Pixel desktop:
Update systemsudo apt update
sudo apt-get install raspberrypi-ui-mods xinit xserver-xorg
sudo reboot
As Xrdp package is available in the default Raspbian Buster repositories, we can install it right awaysudo apt install xrdp
After installation process is completed, the Xrdp service will automatically start. We verify it bysystemctl show -p SubState --value xrdp
Now we need to add the user to the groupsudo adduser xrdp ssl-cert
To access Raspberry Pi 4 through remote session
Open RDP client on Windows, add IP address and establish connection.
Put user and password for remote connection