1

I have 2 XBee Pro S1 antennas and boards with USB interface. I successfully connected both in Coordinator-End Point and Coordinator-Coordinator settings.

I was able to send console log both antennas to each other.

I'm facing issue while I'm trying to use modsim and modpoll from one to other. It says timeout error.

Someone is claiming to have done this by shorting some pins from the XBee board. But I couldn't find anything regarding this anywhere. Could anyone help me with this?

Sachin
  • 21
  • 1
  • 4
  • Maybe you can elaborate a bit more how you're running yourt tests. It would be useful if you indicate what options are you using to run Modpoll and how many registers you're trying to read. Timing is quite important for Modbus so you might want to start with short messages to avoid fragmentation (that would lead to timeouts). It might be useful to switch to pymodbus on the client side to be able to get more info for debugging. – Marcos G. Aug 02 '19 at 05:52
  • @MarcosG. I connect both XBee boards with XBee antennas to 2 laptops. One has ModSim32 simulating value(1) in Holding Register, 40001. In the other laptop I'm using modpoll to read the data from 40001. Both boards are connected to port 5 of their respective computers. – Sachin Aug 02 '19 at 06:02
  • Yes, that's the theory, but can you show the complete command line you're running to read the register with Modpoll? It might be a good idea to remove the radio link and wire a serial cable from one port to the other to make sure your Modbus setup is good. – Marcos G. Aug 02 '19 at 06:24
  • @MarcosG. Yes I checked the modbus setup with a wire and it's working. Also, I'm using a modpoll version with user interface. No commands involved. The protocols available for modbus are ASCII and RTU. Tried both. Do I have to short some pins in XBee board? – Sachin Aug 02 '19 at 06:28
  • @MarcosG. Update, I had asked same question to XBee support and this is their reply. Since both XBee modules are communicating well when connected on interface board, we can rule out any issues with configuration or with module itself. I'm not aware of any method to short pins and I would not recommend you to do anything similar. Please check if there is any mismatch in UART settings with connected device and Tx module that's causing this behavior. – Sachin Aug 02 '19 at 06:38
  • OK, that's something, so you know the radio link is bad. Where did you read about shorting pins on the board? I have never used Modpoll with a user interface, only command line, but there should be a way to increase the default timeout but I doubt that would fix it. – Marcos G. Aug 02 '19 at 06:41
  • @MarcosG. Radio link is not bad. It is working. I can send data between radios using XCTU. – Sachin Aug 02 '19 at 06:44
  • Yes, sorry. I meant it's not working with Modbus. This is a timing issue but I'm not really sure you will be able to make it work with out-of-the-shelf Modbus software. – Marcos G. Aug 02 '19 at 06:50
  • @MarcosG. We have been using this modpoll and modsim software combo from the past 5 years to test serial communications. I can attest it's reliability. However, I'll also use the command version and update. Thanks. – Sachin Aug 02 '19 at 06:52
  • Yes, I did not mean that either. Those products are great, but when you run Modbus on wires! Modbus was never meant to be used over a radio link, I'm not saying it's not possible but there are a number of timing restrictions in the Modbus protocol that might be difficult to handle. What baudrate are you using? – Marcos G. Aug 02 '19 at 07:07
  • @MarcosG. I can set timeout in my modpoll utility. It's set as 1s now. I use 9600 baud rate. Parity none. – Sachin Aug 02 '19 at 07:18
  • That's probably as low as you can get for the baudrate and 1 second timeout seems long enough so I guess increasing it won't help much... As I said I don't think you'll be able to make it work with the tools you're using. You could try to switch to Modbus TCP but then you'd need a serial-to-TCP bridge. On Linux you have many ways to do that; on Windows you might want to try [com0com](http://com0com.sourceforge.net/). I cannot guarantee it will work though, I never tried this myself. But it should not be long to set it up. – Marcos G. Aug 02 '19 at 07:25
  • @MarcosG. Thanks. I was able to get this working. I tried in another computer and it worked fine. With 2 other laptops I was trying before, it's not working. Also, while trying the new computer, I'm only able to simulate values from old computers and it's reading in mod poll in the new computer. But it doesn't work the other way around. Ie, I'm not able to modpoll from old 2 laptops which I was working with in the begining. – Sachin Aug 03 '19 at 14:07
  • What you say sounds like driver related. Maybe you can try to see what drivers you have on the computers that do work. And you can also take a look at the [latency settings](https://www.loadstarsensors.com/assets/manuals/html/how-to-set-latency-timer/latency-timer.html) – Marcos G. Aug 03 '19 at 14:39
  • If you aren't using hardware handshaking (CTS/RTS), be sure to configure those I/O pins as "disabled". Otherwise the XBee will wait for the host to assert RTS before sending data over the serial port. – tomlogic Aug 05 '19 at 15:49

0 Answers0