This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
guides:virtual_modem:section_4 [2019-12-11 16:41] omolini [Initial VModem testing] |
guides:virtual_modem:section_4 [2019-12-11 16:58] omolini [Making Virtual Modem run at startup] |
||
---|---|---|---|
Line 76: | Line 76: | ||
===== Making Virtual Modem run at startup ===== | ===== Making Virtual Modem run at startup ===== | ||
- | After you **have verified** that the VModem works properly on the console (see previous section), and you are able to connect to the Internet, you can make VModem run automatically as a background process after the Raspberry Pi is powered on. | + | After you have **verified** that the VModem works properly on the console, and you have tested that you are able to connect to your network, you can make VModem run automatically as a background process after the Raspberry Pi is powered on. It will run as a background process so you won't see it's output, so it's highly recommended to thoroughly test the script first. |
- | There are two ways you can do this: | + | * Edit the /etc/rc.local file. Make sure your /etc/rc.local has the following at the bottom: |
- | + | ||
- | **1)** You can either run the following command which will automatically add VModem to your /etc/rc.local: | + | |
- | <code bash> | + | |
- | sudo sh -c 'printf "`head -n -1 /etc/rc.local`\n\ncd /boot/vmodem\n./vmodem.sh &\n\nexit 0\n" >/etc/rc.local' | + | |
- | </code> | + | |
- | + | ||
- | **2)** Or you can edit your rc.local manually. Make sure your /etc/rc.local has the following at the bottom: | + | |
<code bash> | <code bash> | ||
# Start serial port and simulate a modem | # Start serial port and simulate a modem | ||
Line 91: | Line 84: | ||
/boot/vmodem/vmodem.sh & | /boot/vmodem/vmodem.sh & | ||
exit 0 | exit 0 | ||
+ | </code> | ||
+ | |||
+ | * You can alternatively run the following command on the Raspberry Pi shell which will do the appropriate changes for you: | ||
+ | <code bash> | ||
+ | sudo sh -c 'printf "`head -n -1 /etc/rc.local`\n\ncd /boot/vmodem\n./vmodem.sh &\n\nexit 0\n" >/etc/rc.local' | ||
</code> | </code> | ||