Skip to first unread message

Mike Ady

unread,
Aug 5, 2015, 10:20:31 AM8/5/15
to MIT App Inventor Forum
Hi, I'm a total newbie.  I can't connect to either the emulator or my tablet.  I am running NoScript, but I have it "globally disabled".  I'm not running BlueStacks.  I am only running the Windows Firewall.  I tried disabling it, and nothing changed.  I've gone through all the help that I can find and I've tried most of the things suggested.  Are there any other things that I can try?

SteveJG

unread,
Aug 5, 2015, 3:55:10 PM8/5/15
to MIT App Inventor Forum
Please confirm you are following the instructions for using WIFI here  http://appinventor.mit.edu/explore/ai2/setup-device-wifi.html     and  if you are using the emulator, you are using the instructions here      http://appinventor.mit.edu/explore/ai2/setup-emulator.html  .   OK?

When you attempt WIFI, did you also download the MIT Companion from the Google Play store.   You need that on your tablet.  A common error is not connecting the WIFI used on the tablet to the same system used by your Win8 PC. See Step 2 ... http://appinventor.mit.edu/explore/support/explain-wifi-connection.html     and make sure you are using the same connection.  On some devices and in some locations, even with WiFi enabled, the phone continues to use the cell network. If this is happening to you, you can disable mobile networking (cell phone carrier based Internet connectivity) from your device's Android settings menu.

When you installed the AIstarter installer, did you attempt to change directories?   You must install to the default directory.    Also, sometimes, the software does not install unless your    right click the exe file, wait for the pop up and follow the instructions in the pop up.

Do you have an adblock plug in you use with Firefox?   You may have to set the adblock plug in to allow pop ups from MIT.

I have a Galaxy tablet and it works fine with AI2, so the guess is that something is blocking AI2 activity or something is not installed properly.  

Regards,
Steve      .               .


Mike Ady

unread,
Aug 6, 2015, 12:02:25 AM8/6/15
to MIT App Inventor Forum
Thanks for your response Steve.

Yes, I downloaded the Companion app from the Google Play store directly and installed it on my tablet.  I don't have any or my own apps yet to connect with, so some of the other instructions didn't make any sense and wouldn't work.

As far as not connecting to the same WiFi network...  I can't figure out how I'm supposed to find out if I'm on the same network, if I can't connect at all.  My tablet does not have any phone capabilities, so that likely isn't the problem.  I did verify that I have WiFi enabled on my tablet. 

I have a D-Link wireless router here sitting at my feet, and my PC is hardwired to the router.  I use ES File Explorer's FTP server to transfer files between my PC and my tablet all the time.  It typically connects on address 198.162.0.107.  While troubleshooting the present problem, I did check that ES File Explorer's connection was working and I did transfer a file to my tablet.  I did most of my testing with ES File Explorer connected, then I shut down the ES File Explorer server on the tablet, just in case it was interfering but that didn't change anything.

As far as understanding how the MIT gateway works, yes, that's perfectly clear, and as far as I can tell, that is working.  I select Connect/AI Companion on the PC, and I obtain a 6 letter code.  I enter that into AI Companion on my tablet, and tap on "connect with code".  Nothing at all happens on the tablet, but almost immediately, I receive the "Network Error", "Companion Connection Error See Connection Help" message box on my PC.  (The Connection Help doesn't really seem to apply to this particular problem.)

Yes, I did install the AIstarter app to the default directory.  One curious thing about the AIstarter app, is that it installed in the "Program Files (x86)" directory, indicating that it is a 32 bit application, yet I am on Wndows 8.1 64-bit.  That isn't strange in and of itself, since most PC apps are still 32-bit, except that most of the AIstarter help that I've viewed, talked about both the "Program Files" directory (64-bit) and the "Program File (x86) directory (32-bit) as being possible destinations for AIstarter, implying that I should parhaps have a 64-bit version of the program installed on my PC, yet there wasn't a choice when I downloaded the app.

Yes, I have Adblock Plus installed.  I disabled it globally.  No change.

It would seem that the problem is connected with the TCP/IP stack.  Neither AI Companion, nor the Emulator will connect.  I assume that the Emulator talks over TCP/IP just like AI Companion, to provide a common interface to the browser.

Abraham Getzler

unread,
Aug 6, 2015, 12:47:44 PM8/6/15
to MIT App Inventor Forum
Here's a link to my collection of Emulator tips (many of which are Steve's) ...

ABG

Mike Ady

unread,
Aug 8, 2015, 12:07:47 PM8/8/15
to MIT App Inventor Forum
Thanks Abraham.  I've been working through the emulator tips as time permits.  Some of the tips are quite involved.  I did download the Android ADK and I am able to get the ADK's emulator to work.  The ADK USB connection to my tablet however doesn't work.  The ADK doesn't even see the tablet.  That is perhaps no surprise, since the Samsung USB drivers have never worked properly on Win-64.  I'll post again as I find out more.

Mike Ady

unread,
Aug 12, 2015, 10:23:07 AM8/12/15
to mitappinv...@googlegroups.com
Hi Abraham,

It took me several days to get back to this.  I tried/checked the things that I could on the list that you provided.  I wasn't able to get an AppInventor app to run on the Android SDK emulator using the instructions provided.  I was able to get Windows to recognize my tablet over USB now, but neither the Android SDK nor AppInventor can see it.

I was able to run the AppInventor emulator manually, by running the run_emulator.bat file.  When I attempt to connect to the emulator, as soon as I enter the 6 character code into the Companion on the emulator, AppInventor emits a bugcheck message.  The emulator identifies itself as version 2.11, while AppInventor claims that I should be using version 2.27 or 2.28?  Could that be the source of my trouble?  I can't see where I can download any other copy of the AppInventor setup than what I have downloaded.

When I run the AppInventor communication test, it states that aiStarter is not running, when it clearly is.  The Task Manager shows that both it and adb are running.  AiStarter claims that it is listening on 127.0.0.1:8004, but it is clearly not seeing any communications from AppInventor/Firefox.

Edit...  After reading Mike Arquilla's related post...  Steven's comment about "special" drivers led me to do some digging.  Samsung.com claims that my tablet doesn't even exist, but I found some updated drivers for it at Samsung.ca.  After loading them, the Android SDK Android Device Monitor finally shows my tablet and is communicating with it.  The Windows Device Manager shows "Samsung Android ADB Interface" for the newly installed driver.  AppInventor fails to see the new driver, apparently because it can't see aiStarter.

SteveJG

unread,
Aug 12, 2015, 11:17:05 AM8/12/15
to MIT App Inventor Forum
OK.   It appears the core problem was you did not install the drivers Windows needed to use aiStarter/Companion as mentioned as a possibility in the original reply to you.  Getting USB to work is very tricky.  It is important users read carefully the instructions and follow every step. USB is not easy and why MIT recommends using an emulator or WIFI in preference.  If your router does not have WIFI, you have only USB and emulator options.

You now now have the driver installed..that is great.   You probably can now get USB to work with your Samsung Tablet because the USB driver  is installed.

My guess is Companion does not realize the drivers are present at the moment.  You probably installed aiStarter before the drivers were resident.  The way forward is to uninstall aiStarter, then reboot your PC and reinstall starter making sure you right click the installer exe (this forces Win7 to install as Admin).  Unplug your Tablet from the computer.   Make sure the USB debugging is turned on on your tablet Settings.

Now you can try again:  Plug your usb in, wait until Windows does its stuff, then   Connect > USB from the AI2 screen.  Hold your breath and see what happens on your Tablet screen.

Does that work?

Regards,
Steve

Mike Ady

unread,
Aug 12, 2015, 2:50:00 PM8/12/15
to mitappinv...@googlegroups.com
Hi Steve,

I had some trouble uninstalling.  The installer just exits instead of uninstalling.  Eventually, I got it to uninstall and rebooted.  I verified that the installation directory anyways was gone after rebooting.  I reinstalled.and rebooted a second time, and nothing has changed. 

I originally wasn't even planning to connect to the tablet over USB, and I hadn't tried it until I installed the Android SDK, where there doesn't seem to be any option to connect over WIFI (at least I haven't found it).  Disregarding the wireless connection for now, the problem seems to be that AppInventor/Firefox cannot find aiStarter.

I only have Windows Firewall installed.  I added port exceptions for ports 8004, 5554, 5037.  I've also added program exceptions for both aistarter.exe and emulator.exe.  I can't think of any other reason for AppInventor to be unable to find aistarter, when it is in fact running.

Edit...  One of the many troubleshooting pages says that ports 8001 and 9987 had to be firewall free, so I added ports 8001 and 9987 to my firewall exception list.  The same troubleshooting page says that I can test that those ports are open using Telnet.  So I installed a Telnet client on the PC and a Telnet server on the tablet.  At first I couldn't connect on either port.  Then I thought that perhaps aiStartup had these ports tied up.  I exited aiStartup, and sure enough, I could connect on both ports.  I disconnected Telnet, and tried aiStartup again.  No change.
Reply all
Reply to author
Forward
0 new messages