There are 5 messages in this thread.
You are currently looking at messages 0 to 5.
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.
Vega <a...@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
> > 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.
Vega <a...@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
> #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.