For a customer, i wrote an middleware to let him access the serial port, or serial port over network using an ethernet adapter, and read data using a webservice.
He recently asked to add too support for reading data from a barcode scanner, stuff that i've implemented reading events directly from the device (/dev/input/eventX or /dev/input/by-id/xyz).
The barcode scanner is attached directly to the server and data are being readed through a webservice exposed by my webserver.
All works fine, except that barcodes are recived by the linux console!
How can i "block" (stop) the system from sending stuff to the console?
NOTE: no X11/Xorg or nothing else, the server is a console only machine! Barcodes are readed by javascript (jsonp) executed on an android tablet
Check /etc/inittab
to see if a getty
is running on that serial port. If it is, comment out the line by inserting a #
as the first character.
It depends on your Linux distro. On Redhat/Centos, you can turn off or filter console messages by editing /etc/syslog.conf and /etc/sysconfig/syslog.
Presumably the barcodes are getting to the console either because you are running the server process from a startup script and it is outputting to stdout/stderr, or they are some kind of system log or kernel messages.
Assuming they are standard output, find where the server is run in your startup scripts, and redirect the output to file or /dev/null, e.g.:
noisy-server-cmd >/dev/null 2>&1 &