In your project, Are you using the UART in pin 0 and 1?
You are having problems with the SoftwareSerial library because is not added in the IDE. You can see the available libraries in:
In this document you will find in the section 4.3 the available UART's in the Edison Module. If you are using UART1 and UART2, you could access to your terminal via telnet, and change the purpose of the port for the Linux terminal communication in to what you want. For this, you will have to create your own image with your customized packages.
Hi CMata_Intel, thanks for the information. I have read these documents but unsure how to configure GPIO as UART. I have used both UART1 and UART2 already and need 1 more UART. Is it possible to config unused GPIO as additional UART? If possible, can you provide some example? Thank you.
Take a look of this thread; where mikalhart explained the configuration of the Serial Ports, in there you could see an example that explains how he did to use the libraries TTYUART. You can find these files in:
If you want to use this, be aware of the specifications of each one of the ports in the Edison, you could have problems according to the speed that you want to use, take a look at the Hardware Guides in order to prevent this:
The specified item was not found.
The other way to do this, is as I replied in the message before. I hope this helps and gives you an idea on how to start.
Thank you CMata, the TTYUART seems to work.
I have couple more questions that are related to this one. How does the Arduino PIN mapped to the Linux GPIO and is there a full map of the GPIO mapping? How do I define GPIO when I custom build my own image? For example, for Arudino, the PIN 0 and 1 are used as UART, which mapped to the GPIO 130 and 131 in LINUX according to this guide EmutexLabs. I need to develop the program under Arduino IDE. I need to define some of the GPIO so that I can use them in the Arduino IDE to program. From my understanding, I will need to custom build my own image, which I already did, and configure the GPIOs. But I could not find much information about how to define the GPIO and how the GPIO are mapped to the Arduino IDE.
To answer your question - it actually could be possible to use two GPIO pins as serial RX/TX, but that is probably a project in and of itself.
There of course wouldn't be any hardware flow control or hardware buffered input/output as provide by an actual UART. One pin would need to be synchronized to the rate of the data flowing across the line to define the length and timing of a bit, the other line for bidirectional communications. You would also need to define your communications protocols such that both the Edison side and the device side would have to understand that protocol to communicate. You would need error correction in your routines to detect when what was received does not match to what was sent. The routines would probably be less of an industrial grade at first, so effective through put would be slow at first until you had all your bugs worked out, then increasing speed to find your top reliable stable speeds.
Of course, this actually describes how most of the protocols we use today actually started out at a blazing 30 characters per second (at 300 8N1 baud).
Did you consider purchasing another UART for your project - might be quicker and comes with higher speeds and reliability.
In order to define and hook your GPIOs you can use the MRAA library there are several threads in the communities (This is an useful example) related to this that I think It could help you.Take a look of the files in this link to understand more about the library: https://github.com/intel-iot-devkit/mraa/tree/master/docs
Let us know about your results.