Serial Communication between two devices needs to be optimized in a way that suits best to their individual and mutual functioning. One of our iOS Engineers created a Monitor Application for iPad. We needed to attach a Power Converter (Processor+Control Board) with the iPad and develop serial communication between them. It was important to exchange the data such as display variables, save and read parameters, internal configuration, reset faults and so on. As per the requirements of the project, we needed to configure the Power Converter in a way that it would virtually work like a monitor with an embedded PC running inside and exhibit the same process for a software application like a Monitor.
- 8 processors with 8 control Boards (One set under our use)
- MAX 3232-RS232 Peripheral Module
- RedPark-DB9V Cable
With the receiving of the Requirement Document, we started analysis over it and devised a working plan for the fixation of all major issues and implementation of all the fundamental processes. We began with the R&D of the project and found the RedPark website most suitable for this purpose. The website helped us finding the RedPark-DB9V Cable for serial communication that proved to be an effective progress in our project.
The Client approved the cable and we started working in line with the guidelines mentioned in the RedPark sdk. In the example shown as part of the guidelines, it exhibited a loop-back functionality for read and write data implementation. It presented us the critical functioning with the increasing Rx (Receiving), and Tx (Transmission) counts showing that data has been sent and received back.
There were few issues that we faced during the completion phase of this project and some of the most critical problems are discussed below:
- Hardware troubleshooting using oscilloscope
- Lack of Documentation and Online support available for the implementation of Redpark SDK for iOS that provides support for Redpark Serial cable to communicate with Hardware
- Difficulty in Creation of the Multiple instances of RscMananger class, which is responsible for showing cable status (Connect or disconnect), reading, writing data as well as other functions such as RTS, CTS and Baud rate setting
As per the procedural requirements for Loop-back functionality the Loop-back adapter was deployed with RedPark Cable whose one end was connected to the iPad and the other to the DB9 Connector that was further linked with the loop-back adapter or the null adapter.
We implemented everything in the best possible way and finished the process of sdk and data communication efficiently.
In the next phase we moved on to the real hardware communication settings. This was the ultimate requirement of the project. We faced some fundamental interrupts in the beginning of this task but with some effective refinements, the hardware started giving us the desired output. Earlier, it was partly damaged and needed some fixes that we made in line with the needs. After fixing the damages we tested it with the application of oscilloscope having certain voltages, frequency and time span. It started generating the appropriate signals.
The Processor that was attached to the control board had some limitations like receiving and responding for the particular format of data (76 bytes or 38 words). Our fundamental task was to ensure that all the work is done in line with keeping this limitation in mind.
There were 16 screens in application and each screen was associated with a special command through which processor identified screen and responded with same command. In this way we could populate data in associated screens by identifying it. RscManager is responsible for communicating with hardware, which was implemented in AppDelegate. On the other hand, AppDelegate’s Methods were responsible for communication between each screen class by implementing those methods.