Cannot read properly from UART with Thingy 91

Hi.

We are working on a project that needs to read several bytes from the UART using Thingy 91. Connectivity bridge is flashed in the 52840 SoC but the main project in the 9160 only manages to read 7 bytes from the UART. I've attached a sample that replicates the problem including a simple program in go which reads 2 files and sends them to the specified serial port (indicated as first argument). I've also recently updated the firmware.

6545.test.rar

Parents
  • Looking also for an alternative solution for this. 
    I found that it is the newline causing the receiving to be triggered as done. I could send however long a char:
    sending "hello world"

    D: uart evt 3
    T: rx_enable ret: 0
    D: uart evt 2
    T: hello world
    D: uart evt 4
    D: uart evt 5
    T:
    D: uart evt 3
    T: rx_enable ret: 0

    hello world is properly received.
    But when sending "hello 
    world", with a new line in-between the received msg becomes scrambled:
    D: uart evt 3
    T: rx_enable ret: 0
    D: uart evt 2
    worldllo
    D: uart evt 4
    D: uart evt 5
    T:
    D: uart evt 3
    T: rx_enable ret: 0


    Since you are sending certificates, as was I, hopefully a better solution comes up but mine was:
    switch to asynchronous uart api and prepare the certificates before sending them over by stripping all the newline characters and re-add them back in on the mcu.
    (Since the location of newlines for pem type certificates is after 64characters it's easy to find the correct location to add them back in)

  • I tried to do so, but unfortunately the problem persists. It keeps receiving the same 7 bytes everytime there is a message. I hope they can find another solution.

Reply Children
Related