I have noticed that the discussion on how to do RX/TX on the serial port on Connect ME, and similar platforms, comes back again. I am posting a small example that outlines the skeleton on how I did it. I had to remove and change things that relate to our product, so I dont get in trouble, but one can easily get the idea. This also means that the code will most likely not work as-is; I just dont have time to pats around with it, so you will have to do some work. Feel free to use it and abuse it - just do that at your own risk.
I used mutex locking to achieve transfer.
You can also look around for instructions on how to maximize the speed of the serial ports if you need they should be still floating in the posts, so I wont repeat them here.
I am not claming that this is the way to do it. It is only an example on how I did it using Digi examples and voodoo and got good results.
Just call the serial_threads_start is from your applicationStart.
Enjoy.
This code example would be interesting, unfortunately it seems to be gone. Maybe somebody can re-post it?
hgiritzer,
Since the original post is from 2004, I assume that ieftimovski was using an original ME with NetOS 4 or 5. The way NetOS uses the serial port has completely changed and any code from then wouldn’t work.
-Erik
The post is from Jul 2, 2007, but anyway rather old, that’s true.
Nevertheless a small example of how to use the serial port from within a C program (Embedded Linux) and the steps to free the serial port for this application (disable console and what there might be necessary) would be really helpful.
Sorry, you are right, I was looking at the wrong date.
It does appear that he is using NetOS though, unless you have an applicationStart in µLinux.
I have used serial ports extensively (written drivers even) with full Linux. The way UNIX works, I would assume that it is identical. What do you want to know?
-Erik
Well, I got it to work in the meantime.
My problem was causes by a misconfigration of the DigiME Embedded Linux (“make xconfig”):
Additionally to the needed “Digi NS921x serial port support” there was the “8250/16550 and compatible serial support” selected, which rendered the serial port unusable (not communicating).
After removal of the “8250/16550 and compatible serial support” it worked as expected.
Thanks,
Helmut