On Thu, Oct 01, 2009 at 04:53:30AM -0400, Markus Barchfeld wrote: > Hello, > > I use a USB to RS485 converter (ICP Con i-7561, a PL2303 device, > details below) to access one RS-485 device via Modbus RTU. I have > written a test application using libmodbus which > - connects to /dev/ttyUSB0 (modbus_connect) > - sets termios > - reads an input register from the RS-485 device and > - disconnects from /dev/ttyUSB0 (modbus_close). > > The app runs fine with Ubuntu 9.04, kernel 2.6.28 on my PC. However, I > want to run the application on a MIPS device (Fritz!Box) which uses > kernel 2.6.13. And there I get a problem if I try to run the > application repeatedly. The first run is fine, but any subseqent run > fails. Data can be send to the RS485 device but then there is no > response. After I reconnect the device physically another run succeeds > - and every subsequent run fails again. Running the pl2303 in debug > mode I do not see any error messages, the output of the first and > second run are mostly equal. Except for the missing > read_bulk_callbacks in the second run. See below. > > Actually I do not know if the converter does not send any data anymore > or if the kernel discards the data. On the MIPS device I also ran > usbmon, but there was no output. Now I am trying to get output from > usbmon on my PC with Ubuntu/2.6.15. What other debugging tools could > be helpful in this context? usbmon would be the best. > If the converted does not send data anymore it might have been > mis-configured, maybe by setting termios connect/disconnect from > /dev/ttyUSB0. Otherwise there could be an issue with the > read_bulk_callback. Or with the data toggle. You also might look into the host controller driver for this device on the MIPS system, odds are the problem is there and not the pl2303 driver. good luck, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html