Hi, All! I have a problem with UART on industrial computer JUKI-511. I use UART to communicate with different 485 devices - simple program in cycle asks these devices. Then I enter distortions on 485 bus by (for example) closining data- and data+ wires or by connecting independent transmitter to 485 bus, sometimes, after such experiments UART stops (forever) to receive data from the devices, but transmitting from UART works well and devices responds to requests. Reinitializing UART from the programm by system call open (...) solves this problem. Does anybody have such trouble? hardware: JUKI-511P-300, chipset GEODE C55530A OS: Linux, kernel 2.4.20 Best, reagards! Thanks, Arkadi K.

uart stops to receive data
Started by ●August 28, 2006
Reply by ●August 28, 20062006-08-28
Vega <arkadi_k@mail.ru> wrote:> Hi, All! > > I have a problem with UART on industrial computer JUKI-511. I use > UART to communicate with different 485 devices - simple program in > cycle asks these devices. Then I enter distortions on 485 bus by (for > example) closining data- and data+ wires or by connecting independent > transmitter to 485 bus, sometimes, after such experiments UART stops > (forever) to receive data from the devices, but transmitting from UART > works well and devices responds to requests.Does your read() call block, or does it return a negative (error) value ? -- :wq ^X^Cy^K^X^C^C^C^C
Reply by ●August 28, 20062006-08-28
> > I have a problem with UART on industrial computer JUKI-511. I use > > UART to communicate with different 485 devices - simple program in > > cycle asks these devices. Then I enter distortions on 485 bus by (for > > example) closining data- and data+ wires or by connecting independent > > transmitter to 485 bus, sometimes, after such experiments UART stops > > (forever) to receive data from the devices, but transmitting from UART > > works well and devices responds to requests.> Does your read() call block, or does it return a negative (error) value ?it returns negative value.
Reply by ●August 28, 20062006-08-28
Vega <arkadi_k@mail.ru> wrote:>> > I have a problem with UART on industrial computer JUKI-511. I use >> > UART to communicate with different 485 devices - simple program in >> > cycle asks these devices. Then I enter distortions on 485 bus by (for >> > example) closining data- and data+ wires or by connecting independent >> > transmitter to 485 bus, sometimes, after such experiments UART stops >> > (forever) to receive data from the devices, but transmitting from UART >> > works well and devices responds to requests. > >> Does your read() call block, or does it return a negative (error) value ? > it returns negative value.That's a good thing. errno might tell you a bit more about the cause of the failure: #include <string.h> #include <errno.h> r = read(...); if(r < 0) { fprintf(stderr, "read: %s\n", strerror(errno)); } -- :wq ^X^Cy^K^X^C^C^C^C
Reply by ●August 28, 20062006-08-28
> #include <string.h> > #include <errno.h> > > r = read(...); > if(r < 0) { > fprintf(stderr, "read: %s\n", strerror(errno)); > }Of course, I verifed early errno value: it writes: "Success". But I think problem in hardware... Because I tested other industrial motherboards and this problem with UART never occured. Tnanks in advance Arkadi K.
