Take the 2-minute tour ×

Quick question, I am new to socket, so I was wondering is there a way to read data from a MCU (Atmel)? I'm running a Linux and I can connect an Atmel through RS232, or USB to my computer(server). Is there a way that I can directly read the data that is coming from MCU (USB/COM) to my computer and process them?

share|improve this question
Yes, you can. What on earth sockets have to do with this? –  user405725 Jan 19 '13 at 2:56
@user1622997 .... any comment or reaction on my answer .... useful or not? –  MikeD Mar 25 '13 at 9:14

1 Answer 1

up vote 1 down vote accepted

Sockets are a concept of network communication (IP), so you would need network interfaces on both devices, plus an IP protocol stack on your Atmel (which may be the case for larger boards running a real operating system, e.g. embedded Linux).

If your Atmel has an USB interface, and if it implements a USB storage device, you can probably mount the Atmel to your server.

Otherwise (i.e. with a bare naked processor + peripherals, but no O/S) you really need to architect a solution from scratch - then a serial interface using the Atmel's UART function would be quickest to implement.

On the (Unix/Linux) server side you simply can use a character device to read in the data from serial or USB - e.g. cat < /dev/ttySxx >> SerPort.txt

share|improve this answer
MikeD, you are only nearly correct in all you statements. Sockets can also be used for inter-process communication. You don't need an OS to do network communication, only a network stack. MCU's rarely implement USB storage for communication, though it has been know. You can not just cat a serial port, you have to set it up with stty first. –  jbr Mar 25 '13 at 9:22
@jbr agree on sockets (+1) ... still it needs a kind of OS on the micro which cannot be taken for granted - so once the architectual circumstances are clarified, I guess we're happy to answer more concrete questions to the OP (including how to initialize a tty port) –  MikeD Mar 25 '13 at 15:19
Thank you very much mark. Vey informative –  user1622997 Apr 18 '13 at 13:18

Your Answer


