No announcement yet.

Unable to read serial from display.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to read serial from display.

    Hello - I also posted this in [4D Systems - Hardware > 4D Intelligent Display Modules (Goldelox)]

    I'm a developer at a small company, working on a prototype for one of our projects.

    I have the the GOLDELOX 1.5" uOLED-128-G2 module set up on a Raspberry Pi, using the Goldelox Linux library.
    I'm trying to run the library's "BigDemo" code, and there's an issue getting an acknowledgement from the display.

    My setup is as follows:
    • I have a PL2303 USB to UART bridge to connect the display to a USB port on the Raspberry Pi.
    • I've changed the BigDemo code from using "/dev/ttyAMA0" to "/dev/ttyUSB0" to reflect the serial port that's actually being used.
    When I try to run the demo code:
    • The code loops during the ReadSerPort() call in the initial OpenComm() (goldeloxdemo.c line 413), but eventually times out and proceeds.
    • When it reaches the first gfx_cls() (in goldeloxdemo.c line 420) the screen clears, but loops/times out right afterwards when calling GetAck().
    • I've also replaced this line with a gfx_Circle() to test - the screen is able to draw a circle, but loops/times out right afterwards too.
    The above results are very inconsistent, and most of the time nothing happens at all.

    This is what I see happening: when the code reaches (from goldeloxSerial.c line 107)
    iIn = read(cPort, &psData[iIdx], iLeft)
    a value of -1 is returned (observed using console to print value of iIn), which causes the program to go into a loop, and cannot proceed.

    My conclusion is that writing bytes to the display is possible, but there's something which prevents the Raspberry Pi reading from or the display, or the display itself is not transmitting bytes.

    Some things which may be affecting this (but I'm not sure):
    • I have left the RES pin on the display disconnected, since I'm not sure where it would go.
    • I have attempted to turn off using the serial port as the console terminal port, but maybe I've done this incorrectly?
    • I'm pretty sure my wiring is set up correctly otherwise. RX is going to TX, TX is going to RX, etc.

    Help would be greatly appreciated!

  • #2
    Duplicate post. please refer to the other post


    • #3
      Issue fixed, posted in other thread as well. Thanks!