how can I keep continuing loggin the data from UART of Raspberry via SSH terminal ?
cat < /dev/ttyS0
this works but after a while "cat" ends and I have to relaunch the command via terminal
Related
I have a (python) script that waits for user input.
I want to run that script on my raspberry PI that I access over an SSH connection.
I would like to capture the user input via the keyboard that is attached to my raspberry via a USB.
How could I achieve this? I only seem to be able to capture input from the machine that starts the ssh connection.
I am doing some remote work on a Raspberry Pi over SSH with X11 enabled. What is the command to launch the Task Manager GUI from the terminal?
Looks like it's command is lxtask:
user#raspbian:~$ lxtask
If you want to send the window to the PC where you opened the SSH from, you need to add -X to your SSH connection command.
I'm new to working with a Pi, I'm setting up a machine in a headless configuration but have been having issues getting the GUI to display when i use VNC to connect to the Pi.
It seems that after a reboot the Pi sits at the terminal, pressing enter on a connected keyboard then starts the GUI and all is fine.
Does anyone know how i can stop it sitting at the terminal so it boots straight to the GUI?
I configured a 3G modem (Novatel Wireless U679 (Ovation MC679)) on a Raspberry Pi running Raspian OS. To switch the modem from storage mode (1410:5059) to modem mode (1410:7031), I use the following command:
sudo eject /dev/sr0
I then use Sakis3G script to establish the connection with:
sudo /usr/local/bin/sakis3g/sakis3g connect OTHER="USBMODEM"
USBMODEM="1410:7031" USBINTERFACE="0" APN="crstat.bell.ca" APN_USER="0"
APN_PASS="0" USBDRIVER="option"
I also use UMTSkeeper to keep the connection alive if this one drops.
The 3G connection lasted 2 days before dropping for the first time and then never reconnected. When I tried to reconnect manually by reissuing the above sakis3g command, I got the following answer:
Already selected value USBMODEM="1410:7031". Is not valid.
So I typed 'lsusb' at the command line, I saw that the modem product ID was back to storage mode (1410:5059). If I try to switch it again to modem mode using the command 'eject', this time the modem disappear from the 'lsusb' list.
Here are my questions:
1 - Why the product ID switches back to storage mode after a connection drop?
2 - How can I switch it again to modem mode after a connection drop?
3 - How does these steps integrates with UMTSkeeper so that it reconnects automatically?
i am not sure what exactly is the problem.. but i too had this issue. In my case the raspberry pi doesn't switch automatically so i had to use a command to switch it. the command i used was :
" sudo ./sakis3g swithonly "
it switches the dongle from storage mode to modem mode and i don't face any problem like that of yours. my dongle remains in modem mode even if disconnect the connection. it goes back to storage mode only if i unplug and then re-plug.
Hope this helpful!
here is my problem: i would like to run a Mathematica script through ssh on a remote machine so that i can close the terminal on my computer and keep it running on the remote one.
My problem arises because the script acts in interacting mode, and so when i close the terminal the process is shut down too.
Thanks.
Use tmux or GNU screen.
Workflow:
ssh into remote machine
start tmux/screen, e.g. tmux or screen
start Mathematica script inside tmux/screen session
detach tmux/screen session, e.g. Ctrl+B d (tmux) or Ctrl+A d (screen)
close ssh connection
Then later:
ssh into remote machine
reattach to tmux/screen session, e.g. tmux attach or screen -d -R
view completed Mathematica script output
Several cases:
If you don't need to interact with it or need to visualize the notebook during evaluation
Log in to the machine with ssh
Then, to run a kernel in the background and detach it from the current session, use nohup tool (the standard output of the command will be dumped to myNotebook.out):
nohup math < myNotebook.nb > myNotebook.out &
At this point, the ssh session can be closed without killing Mathematica
Optionally you can monitor mathcommand output with the tail command (use CTRL-C to exit the tail monitoring)
tail -f myNotebook.out
If you need to see what's going on, visualize graphs during calculation or to be able to interact graphically, use remote desktop (vnc) and tunnel your communication with remote machine. Details depends a bit on the Linux distribution (vnc clients & servers may differ). You can even from Windows or Mac connect with remote desktop to your linux box and manipulate it. I suggest you to search the web for remote desktop ssh tunnel + your distro for tutorials.