steptail.com

If I try to fail, but succeed, which one did I do?

User Tools

Site Tools


guides:virtual_modem:section_4:changing_the_serial_port

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
guides:virtual_modem:section_4:changing_the_serial_port [2018-09-23 01:43]
omolini
guides:virtual_modem:section_4:changing_the_serial_port [2019-08-22 18:24] (current)
omolini [Finding out the name of the serial device]
Line 1: Line 1:
-====== How to change the serial port on the vmodem.sh script ​=======+====== How to change the serial port =======
  
-**Please skip this part ** if your serial port is called ​''/​dev/​ttyUSB0''​. Only proceed if this is not the case.+If you did not see ''/​dev/​ttyUSB0'' ​in the device list, and you could not see anything matching your device, you will need to make sure the serial device is connected and supported by LinuxThen try the following:
  
-  * To update the **vmodem.sh** script stored in **/​boot/​vmodem/​**,​ do the following: + 
-  * Edit **/​boot/​vmodem/​vmodem.sh** by running ''​sudo nano /​boot/​vmodem/​vmodem.sh''​ +===== Finding out the name of the serial ​device ​===== 
-  * Find the line ''​serport=ttyUSB0''​ and update it to reflect the correct serial device. For example, if your USB device is called "​ttyAMA0",​ then type in ''​serport=ttyAMA0''​. Do not enter the full path to the device, the file name is enough. +If you do not know what your serial device is called, you can do the following. 
-  ​* ​If you do not see your serial device, or you do not know what it is called, you can do the following. + 
-    * Disconnect the serial device and run ''​**ls** /​dev/​tty*''​. Did you notice something missing compared to the previous printout?  +  * Make sure the USB serial adapted is connected. Then run ''​**ls** /​dev/​tty*''​.  
-      * Now connect the serial device, wait 5-10 seconds and run ''​**ls** /​dev/​tty*''​ again. Do you see a new device in the list?  +  ​* Disconnect the serial device and run ''​**ls** /​dev/​tty*'' ​again. Did you notice something missing compared to the previous printout?  
-      * If you do not see a new serial device, the device may not be compatible with Linux. Run ''​**dmesg**''​ to see if it is detected. In my case it is detected, and is named **ttyUSB0**:​ +  * Now connect the serial device, wait 5-10 seconds and run ''​**ls** /​dev/​tty*''​ again. Do you see a new device in the list?  
-{{ :​guides:​pics:​vmodem_raspberry_serial_dmesg.png?600 |}}+  * If you do not see a new serial device, the device may not be compatible with Linux. Run ''​**dmesg**''​ to see if it is detected. In my case it is detected, and is named **ttyUSB0**:​ 
 +{{ :​guides:​pics:​vmodem_raspberry_serial_dmesg.png |}} 
 +//Ignore the under-voltage error on my screenshot. You shouldn'​t be getting that error.// 
 +===== Update vmodem.sh script ===== 
 +  * To change the serial port used in the **vmodem.sh** script, do the following:​ 
 +  * Run ''​sudo nano /​boot/​vmodem/​vmodem.sh''​ 
 +  * Find the line ''​serport=ttyUSB0''​ and update it to reflect the correct serial device.  
 +    * For example, if your USB device is called "/​dev/​ttyAMA0",​ then make sure the line says ''​serport=ttyAMA0''​.  
 +  * Save file by pressing **CTRL + o**, then ENTER to save under the same name.  
 +  * Exit editor with **CTRL + x**.
  
 | [[guides:​virtual_modem:​section_4|Go back to the main article]] | | [[guides:​virtual_modem:​section_4|Go back to the main article]] |
guides/virtual_modem/section_4/changing_the_serial_port.1537666990.txt.gz · Last modified: 2018-09-23 01:43 by omolini