I have been trying to get my Ciseco Slice of Radio to communicate with the new Wireless Things sensors - not very successfully. In the process I entered this command from the terminal:- sudo systemctl mask serial-getty@AMA0.service and that appeared to work presumably setting the port to a nul value. The RPi is running Jessie. This did not help with the communication so I now want to revert back to the original configuration - but I do not know where the serial-getty info is stored. I have already changed the /boot/config.txt file back to its original state. Before I messed with it, the program has been working fine for over 2 years. Please help - I am a bit green with the Jessie/Ubuntu 16.04 changes. Looks like the 'mask' has done the damage because I can't restart the service.
1 Answers
That's not "setting the port to a nul value". It's forcing the init system (more specifically, systemd) to use /dev/null as the unit files for the service, meaning it won't do anything. This will have effectively disabled it on reboot.
The service itself is about running a login console over the serial port, not enabling or disabling the port iself. You of course do not want such a service if you are using the port for other things. However, there likely is also a problem caused by specifying the serial port for kernel logging in /boot/cmdline.txt, which is how it is by default. This is not related to the login console, although the port may be used for both things at the same time (which, by default, it is).
Put another way disabling the login console only solves half the problem. A better way to do this is via raspi-config, which will everything necessary, properly, for you.
If for some reason you believe you do want a login console, use unmask to reverse the prior mask and reboot. Re-enabling it via raspi-config if it has been masked will not work (but disabling it that way should be fine) -- the man page indicated by joan explains why.
- 58,859
- 17
- 112
- 227
man systemctland search for mask. – joan Dec 09 '16 at 16:26