• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No Companion Connection
#1
I'm another one having trouble with this. It has worked in the past, but after not using it for a couple of months, I can't now get it to connect.

The PC is running Windows 7 Ultimate 64-bit SP1, and the tablet is an Asus Transformer TF-101 running Android 4.0.3. There is no firewall on the PC (the local network is behind a Netgear NAT wifi router).

I've run Nirsoft's CurrPorts utility to check that the ports the Companion wants aren't already in use. That seems to be OK. It shows the Companion as opening UDP 8888 and TCP 16568, but shows the local address for these as 0.0.0.0, when I would have expected 127.0.0.1. (Having said that, it shows a lot of other processes as opening UDP and TCP ports on 0.0.0.0).

I can't find anything in the router setup related to disabling multicasting. I know it's working fine on wired devices because I've been developing s/w for controlling lighting using UDP.

I have a suggestion that may help with connection problems. If you are only using UDP to identify the PC, perhaps you could put an option into the Android app for the user to enter the PC's IP address, and if that's entered then connect directly to the TCP port (maybe even make the port configurable at both ends, just in case something else is using the one you want).
Reply
#2
I recently wrote a TCP/IP server into a .net 4 program I'm developing, and thought I would test the tablet with it. I've written a little Android app that connects to the port and sends it messages. That's working fine, so I suspect the problem is somewhere in the UDP connection.

CurrPorts shows the listener socket my program is creating as 0.0.0.0:9001, so the IP address is a red herring. When I connect with the tablet it shows another socket with the machine's real IP address.
Reply
#3
UDP doesn't require an IP address for listening. You can just bind to a socket using a port, and you will pick up all multicast traffic for that port, which shows up as 0.0.0.0:<port>. If you join a multicast group with a specific IP address, then you will filter on that IP address, but the implementation can vary depending on the OS. For example, on Windows, the OS handles the filtering before it hands you messages, but on other operating systems, it may still give you all of the messages for a given port even if you subscribed to a specific multicast address.

The way I'm currently implementing the connection is I broadcast an identification message from the tablet while no active TCP/IP connection is available. This message is truly a broadcast message in that it goes over 255.255.255.255, which can sometimes be blocked by certain routers. If you are experiencing a problem with this, I can switch to using an arbitrary multicast address that could optionally be set in an advanced section of the configuration. I could also make the TCP/IP settings configurable as well. After the initial broadcast is received, the companion app does a TCP/IP connect to the tablet, which has a ServerSocket that is listening for connection requests (I call serverSocket.accept()). Once this accept is processed, everything works. I have never seen a connection problem past this point. Usually, if a connection problem occurs, it's because the connection is refused or times out, so the companion app tries to connect again, and then gives up after a certain number of tries. For reference, in the companion app, I just use the Socket class set up with Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp), and call connect to the PC IP address.

I have found that connection attempts seem to always be successful going from the tablet to the PC, so I am considering reworking the code so that the companion app will broadcast information that the tablet can use to connect to it, instead of the other way around. If you guys have any insight based on what I've written, let me know, otherwise I will try to fix the code for an upcoming release.

Mike
Reply
#4
I'm pretty sure you are right about this being a problem with my router, but there doesn't seem to be any way of configuring it to allow the messages through. I've found that SplashId on my phone has the same problem, but they worked around it by giving the user an option to enter the IP address of the PC on the phone, and that works OK.

Well, that is really bizarre. A minute after that last message I tried it again, on the off-chance, and it worked. I've no idea what's been changed. SplashId is working without the IP address as well.
Reply
#5
Well that's definitely good news. I'll still do what I can on my end to improve things.
Reply
#6
I am now having a problem connecting to the companion.

If I tap the connect button, the window pops up on the companion. I select my tablet and click Connect and the companion hangs on "Connecting to Tablet..." with a full green bar, and then retries and eventually gives me an error connecting message. Meanwhile the tablet just says "Waiting for user to establish connection through MobileSheets Companion pop up window..."

I've never had any problems connecting before this happened a few days ago. I have tried clearing all my data and trying from fresh but the same thing still happens.

I can't think of anything that I have changed either on the tablet or on the PC in that time.
Reply
#7
Have you tried turning off the wifi on the tablet, and then turning it back on? I know that sounds silly, but it usually works for me if I'm suddenly having connectivity issues.

I'm thinking about reworking the sync code for this next update to see if I can fix all of the connectivity issues. This would allow the annotations beta testers to let me know how it works before the main release.
Reply
#8
Yeah I have. I've had a problem where the popup dialog doesn't even appear (which a wifi off-on fixes) but this is a bit different since it allows me to select the tablet and attempts to connect.

I thought maybe something with the beta might be causing it so I removed it and cleared all data etc, but no luck. Sad I guess I'll have to add some sheets through that app temporarily.

On the plus side, I just discovered that you can turn off the filters which is quite neat and adds menu items to the little drop down icon.
Reply
#9
Once i face this problem it's all because of the router. After configuring the router again it's solved and never have this problem with IP or router.
Reply
#10
In case you are using an Android phone as WiFi Hotspot, restarting the hotspot on the phone may fix connection problems.

-K
Electric Guitar, popular music from 50s to 80s
Line6 Pod HD w/ Shortboard MkII
Galaxy Tab 10.1N
Reply
#11
I have lost the ability to connect the companion, my TF101 says is gets the request from the PC and tries to acknowledge the connection but eventually times out. The PC shows 'Connecting'.

My PC is running Windows 8 and I have always had to manually connect as auto-connect has never worked on this PC.

Anyway, the only things that has changed since it worked are the MobileSheets app and companion versions.

I have tried turning wifi on and off on the tablet and restarting MobileSheets.

If I get chance I will try from my old XP machine [Update: Works fine with PC running Win XP, it must be a Win 8 problem...]
Reply
#12
Same at home, use manual connect feature and check if IP adress displayed is the same.
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.