This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
guides:virtual_modem:section_4:changing_the_serial_port [2018-09-23 01:47] omolini [How to change the serial port] |
guides:virtual_modem:section_4:changing_the_serial_port [2018-09-23 01:52] omolini [Update vmodem.sh script] |
||
---|---|---|---|
Line 7: | Line 7: | ||
If you do not know what your serial device is called, you can do the following. | If you do not know what your serial device 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*''. |
+ | * Disconnect the serial device and run ''**ls** /dev/tty*'' again. Did you notice something missing compared to the previous printout? | ||
* Now connect the serial device, wait 5-10 seconds and run ''**ls** /dev/tty*'' again. Do you see a new device in the list? | * Now connect the serial device, wait 5-10 seconds and run ''**ls** /dev/tty*'' again. Do you see a new device in the list? | ||
* 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**: | * 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**: | ||
Line 13: | Line 14: | ||
===== Update vmodem.sh script ===== | ===== Update vmodem.sh script ===== | ||
- | * To update the **vmodem.sh** script stored in **/boot/vmodem/**, do the following: | + | * To change the serial port used in the **vmodem.sh** script, do the following: |
- | * Edit **/boot/vmodem/vmodem.sh** by running ''sudo nano /boot/vmodem/vmodem.sh'' | + | * 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 "ttyAMA0", then type in ''serport=ttyAMA0''. | + | * 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]] | |