• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Hooking with spinwaves system SWGW

    Hardware
    2
    12
    5.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      udi
      last edited by

      Hi,
      Does anybody got experiance with connecting to Spinwave SWGW gateway , when working with the gateway i can connect to it via a browser but cannot connect to it from mango , i try to connect to it as a modbus TCP over the local network. is there anothr way ? the definition of port and ip are correct....

      10nx
      --udi

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        Hello Udi,

        Spinwave's comment was this:

        There might be an address offset issue. Depending on how Mango works he might have to read holding register 0 or holding register 1 if he wants to read the 1st holding register (aka 4xxx registers).

        According to them the hardware supports either Modbus TCP or RTU, both of which Mango also supports. Note that Mango uses 0-indexing of Modbus registers. Hope this helps.

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • U
          udi
          last edited by

          Hi,
          thank you for your response,
          However i'm stuck in an earlier stage, i get the error
          **Error while polling modbus network: java.net.UnknownHostException: http://10.2.20.3/ **
          when trying to connect from Mango Data Source to the SWGW via TCP.
          i realize there might be a reason for that ,
          the http://10.2.20.3/ port 80 is protected by username / password
          i tried to change that to the default password of Mango but still it gave the same error. the username / password are compulsory and cannot be override

          is there another basic check or something i can do to ? something to further pinpoint the problem ?

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            An UnknownHostException occurs well before you would ever have a problem with HTTP authentication. (Besides, Modbus over TCP doesn't have anything to do with HTTP.) The exception means that the host on which Mango runs can't find the target host (10.2.20.3).

            Best regards,
            Matthew

            1 Reply Last reply Reply Quote 0
            • U
              udi
              last edited by

              Hi,
              i winder what is the source of the problem - i can surf to the gatway from the same browser that i use for MangoM2m and at the same time i get the following error withing the mango M2m ,
              Here is the part from the tomcat window that mention the source of the problem.
              can you please outline some steps to take or check?

              **
              INFO 2009-04-02 20:30:10,281 (com.serotonin.mango.rt.dataSource.modbus.ModbusDa
              taSource.doPoll:131) - Error while polling modbus network
              com.serotonin.modbus4j.exception.ModbusTransportException: java.net.UnknownHostE
              xception: http://10.2.209.3/
              at com.serotonin.modbus4j.ip.tcp.TcpMaster.send(TcpMaster.java:64)
              at com.serotonin.modbus4j.ModbusMaster.sendFunctionGroup(ModbusMaster.ja
              va:325)
              at com.serotonin.modbus4j.ModbusMaster.send(ModbusMaster.java:268)
              at com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.doPoll(Modb
              usDataSource.java:88)
              at com.serotonin.mango.rt.dataSource.PollingDataSource.scheduleTimeout(P
              ollingDataSource.java:70)
              at com.serotonin.mango.util.TimeoutJob.execute(TimeoutJob.java:49)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
              ava:516)
              Caused by: java.net.UnknownHostException: http://10.2.209.3/
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
              at java.net.Socket.connect(Socket.java:519)
              at java.net.Socket.connect(Socket.java:469)
              at java.net.Socket.<init>(Socket.java:366)
              at java.net.Socket.<init>(Socket.java:180)
              at com.serotonin.modbus4j.ip.tcp.TcpMaster.openConnection(TcpMaster.java
              :111)
              at com.serotonin.modbus4j.ip.tcp.TcpMaster.send(TcpMaster.java:61)
              ... 7 more
              INFO 2009-04-02 20:30:10,359 (com.serotonin.mango.rt.dataSource.modbus.ModbusDa
              taSource.doPoll:131) - Error while polling modbus network
              com.serotonin.modbus4j.exception.ModbusTransportException: java.net.UnknownHostE
              xception: http://10.2.20.3/

              at com.serotonin.modbus4j.ip.tcp.TcpMaster.send(TcpMaster.java:64)
              at com.serotonin.modbus4j.ModbusMaster.sendFunctionGroup(ModbusMaster.ja
              va:325)
              at com.serotonin.modbus4j.ModbusMaster.send(ModbusMaster.java:268)
              at com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.doPoll(Modb
              usDataSource.java:88)
              at com.serotonin.mango.rt.dataSource.PollingDataSource.scheduleTimeout(P
              ollingDataSource.java:70)
              at com.serotonin.mango.util.TimeoutJob.execute(TimeoutJob.java:49)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
              ava:516)
              Caused by: java.net.UnknownHostException: http://10.2.20.3/
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
              at java.net.Socket.connect(Socket.java:519)
              at java.net.Socket.connect(Socket.java:469)
              at java.net.Socket.<init>(Socket.java:366)
              at java.net.Socket.<init>(Socket.java:180)
              at com.serotonin.modbus4j.ip.tcp.TcpMaster.openConnection(TcpMaster.java
              :111)
              at com.serotonin.modbus4j.ip.tcp.TcpMaster.send(TcpMaster.java:61)
              ... 7 more
              **

              1 Reply Last reply Reply Quote 0
              • M
                mlohbihler
                last edited by

                Sometimes Java appears to cache network information. It might have decided on its own that the host is unknown. Can you try restarting Tomcat to see if it works better?

                Best regards,
                Matthew

                1 Reply Last reply Reply Quote 0
                • U
                  udi
                  last edited by

                  Hi,
                  Considering that the problem might rise from the medium between the MangoM2M and SWGW , i did the following

                  1. Restart the computer
                  2. shut down the firewall and ant virus
                  3. made sure there is a browser connection

                  to no avail - the problem still exist ,
                  both machine are now connected to the same Hub

                  i will try to install on another machine and later on use crosspair Cat5 cable between the machine and the SWGW
                  i will welcome any debugging idea .
                  10nx
                  --udi

                  1 Reply Last reply Reply Quote 0
                  • M
                    mlohbihler
                    last edited by

                    Duh. I just saw this. Your hostname should be simply "10.2.209.3", not "http://10.2.209.3/".

                    Best regards,
                    Matthew

                    1 Reply Last reply Reply Quote 0
                    • U
                      udi
                      last edited by

                      Hi,
                      Thanks , indeed it seem to progress ,
                      we now have a new error further down the road ..

                      Error while polling modbus network: No response from network
                      (please see below the extracted error fro the tomcat window)
                      However i can access the SWGW embedded webserver from the browser at the same time .

                      when activating another application from
                      http://www.codeproject.com/KB/IP/Modbus_TCP_class.aspx

                      i get *Modbus slave error: Slave time out! * on the c# application there

                      any ideas ?
                      10nx

                      ** 49,093 (com.serotonin.mango.rt.dataSource.modbus.ModbusDa
                      taSource.doPoll:131) - Error while polling modbus network
                      com.serotonin.modbus4j.exception.ModbusTransportException: com.serotonin.io.mess
                      aging.SendTimeoutException
                      at com.serotonin.modbus4j.ip.tcp.TcpMaster.send(TcpMaster.java:87)
                      at com.serotonin.modbus4j.ModbusMaster.sendFunctionGroup(ModbusMaster.ja
                      va:325)
                      at com.serotonin.modbus4j.ModbusMaster.send(ModbusMaster.java:268)
                      at com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.doPoll(Modb
                      usDataSource.java:88)
                      at com.serotonin.mango.rt.dataSource.PollingDataSource.scheduleTimeout(P
                      ollingDataSource.java:70)
                      at com.serotonin.mango.util.TimeoutJob.execute(TimeoutJob.java:49)
                      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
                      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
                      ava:516)
                      Caused by: com.serotonin.io.messaging.SendTimeoutException
                      at com.serotonin.io.messaging.SenderConnection.send(SenderConnection.jav
                      a:85)
                      at com.serotonin.io.messaging.SenderConnection.send(SenderConnection.jav
                      a:92)
                      at com.serotonin.modbus4j.ip.tcp.TcpMaster.send(TcpMaster.java:83)
                      ... 7 more**

                      1 Reply Last reply Reply Quote 0
                      • U
                        udi
                        last edited by

                        Hi,
                        Reseting the computer and the gateway didn't help situation stayed the same , i cannot see any configuration that suppose to change timeout in the gateway.

                        Best
                        --udi

                        1 Reply Last reply Reply Quote 0
                        • U
                          udi
                          last edited by

                          Ok
                          Problem sovled ( also with spinwave's help)

                          the port should be 502 not 80 ,
                          the offset start at 101 and on .
                          the data arrive as 2 bytes bsigned integer .

                          10nx to all
                          --udi

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post