9 years, 11 months ago.

Looking for an easy implmented serial application protocol in mbed, Python and Java.

I am developing an EPD product, which should support following commands in host communications.

  • download bitmap from host (including PC and Android)
  • load bitmap from NVMEM
  • NVMEM management
  • future extends for custom commands

I do have experience on low level UART driver programming in C. In most cases, I will reuse code from another open source project, AVRLib (by Pascal Stang). Which is a binary protocol, with STX as leading byte, ETX as tail, with CRC and LEN control of whole packet.

However, AVRLib implementations dependents on ring buffer and low level driver for RX/TX ISR. which still have aguments on critical_segment_exit MACRO, because ARM Cortex-M is complex than AVR micro, and requires more time to disable the interrupts.

That's not a big deal, but I am still exploring C++ in mbed. And I don't wanna lose time on a real product development.

I tried RPC, but RPC seems hardware oriented. It doesn't have method to transfer data to a virtual device like a buffer.

I have read code from lpc812_exp_solution_exp-port-xbee, lpcterm... Then I found most of the protocol are ASCII protocol, I have to convert all binary code into HEX to download a bitmap. What a waste. The data has been doubled during transferring.

Obviously I want a protocol easy to implement on mbed C++, Python and Java on Android. It is better to be a binary protocol. If not, ASCII protocol is accepted as well.

Since it is a pure software issue, I can not post my issue in any hardware related category.

Does anyone have some suggestions?

Be the first to answer this question.