Posts

Showing posts with the label communication

Message lights.

Image
Blinking lights have been used on computers for years. What they mean varies from system to system.Manuals for the systems will hae documention on what all the variations mean.  Even on the home computer they most all have an led that signifies whether the power is turned on to the machine Maybe we could attach led to a local computer and then they are lit could mean one of ervera things depending on how ht e system is programmed.. You could start off with just two leds that you give you four possibilities.  Back then there were no computer screens to get information.  You could even add even more light for more possibilities.The traditional way was to add led]s to the parallel port. Eight leds would give you 2^8 or 256 possibilities. Possibly more than you would ever need. First setup we did like this was for the Atari ST computer. The picture is using a 32 bit computer. One could go a step further and instead of lights being on or off, a message could be s...

Backup monitor?

Image
If you set up your serial port for communications and have a serial terminal (some systems may require a usb adapter), you will never worry about not having a monitor for emergencies. (Connecting in this case to an nslu2 running linux.)   Notes from an earlier article to set up serial communication, Your system may vary. Now to get the Pda working with the unit. The Palm pda will not work as is as a dumb terminal, so I had to install a program on to it from another computer called ptelnet.prc using a usb to serial interface. The Palm has an interface cable that will plug directly into the 9 pin serial port on the back of the computer. HP Journa has a standard rs232 port. $  pilot-xfer -p /dev/ttyUSB0 -i ptelnet.prc That should be easy. First to test the port. Strange the serial port on what is commonly known as com2:. (com1: =ttyS0) $ sudo /sbin/getty -h -L /dev/ttyS1 9600 vt100 & $ sudo chmod 666 /dev/ttyS1 A prompt did not show up on the Palm pda. ...

Socket to me.

The ability to get data from one computer to another is essential for one or more computers on a network. What happens that one computer essential becomes a host/server and the other computer the client, A good example of this might be a networked game, but it all starts with a simple peiece of code that can get more complicated as the need arises. The server code for this simple example. Server.c #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <time.h> int main(int argc, char *argv[]) { int listenfd = 0, connfd = 0; struct sockaddr_in serv_addr; char sendBuff[1025]; time_t ticks; listenfd = socket(AF_INET, SOCK_STREAM, 0); memset(&serv_addr, ’0′, sizeof(serv_addr)); memset(sendBuff, ’0′, sizeof(sendBuff)); serv_addr.sin_family = AF_INET; serv_...