Connecting iMX53 QSB to Windows PC for App Development/Download

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connecting iMX53 QSB to Windows PC for App Development/Download

2,713 Views
RobThompson
Contributor I

Hello,

I am a relative newcomer to the Android world and I am just getting started using the iMX53 Quick Start Board (QSB) with the associated 4.3" LCD Touchscreen.  I have successfully loaded the pre-built Android image downloaded from the Adeneo website and the Android support seems to run the preloaded apps (clock, browser, etc.) just fine.

I have also installed the Android Eclipse-based app developer support under Windows XP and can successfully build and emulate some simple applications.  I am having difficulty taking the next step, moving my simple applications to the QSB to experiment with and demonstrate to others.

I have what I am hoping are some trivial questions:

1) How do I set up and connect the QSB to be able to move my test apps to it?  So far I have been unable to find the Windows driver I need to support the "MX53 QS Android Phone" USB device that gets detected when the QSB is attached to my PC.

2) Once the QSB has an appropriate USB driver under Windows, what steps do I need to take so my Android test apps developed in Eclipse get sent to the QSB for Debugging rather than the PC's software-based emulator?

Thanks

Labels (1)
0 Kudos
7 Replies

1,211 Views
mathias
Contributor I

Hello again,

I tried out the solution with the Ethernet connection and came across a few problems that I ended up solving, but it took me quite some time, so I’ll post what I found out so that the next one who tries this doesn’t waste as much as I did.
I don’t know if what I did is kind of trivial for you (it wasn’t for me), if it’s bad practice or if there is an easier way to do this. If you know one, please reply! It’s just the way it worked out for me.
I’m using my laptop with Windows 7 x86 as my development machine, and a direct Ethernet connection to the QSB. I also have the miniUSB connected but I didn’t get it to work properly (yet). It doesn’t do much at the moment. Finally, I have the QSB connected to the laptop via serial adapter and am using putty.exe to communicate with the board.
     Speed (baud): 115200
     Data bits: 8
     Stop bits: 1
     Parity: None
     Flow Control: None

So here is what I did:
First of all, I got myself a DHCP Server running on my laptop from here (I got Version 2.3):
http://www.dhcpserver.de/dhcpsrv.htm
, set it up with http-protocol only and ran it as a service. IP-range is 192.168.2.100-150.
Running ## netcfg eth0 dhcp in putty or connecting Ethernet directly on the QSB under “Settings -> Wireless & Networks“ should set up the connection. You can check this by typing ## netcfg into the serial. I always happen to get the IP 192.168.2.100, so that’s what I’ll use. If you start up the QSB and the DHPC-server is already running you won’t need to take these steps, as the QSB will connect automatically.

Next, I had to turn off IPv6 and use IPv4 instead. To do this you
     1. Hold the Windows key and type R, enter "ncpa.cpl" (without the quotes) and press Enter
     2. Right click on each network connection and select "Properties" (LAN-Network is enough, actually)
     3. Remove the checkmark from the box next to "Internet Protocol Version 6 (TCP/IPv6)
     4. Click OK to exit the dialog
(Got this from http://forums.techguy.org/networking/954610-solved-windows-7-cant-ping.html)
I don’t know if this is really necessary to run adb correctly, but it enables you to :: ping your boards IP, and that’s always fun.

Now, getting this far, I thought that the connection would finally work, but Pustekuchen. Typing in :: adb connect 192.186.2.100 after setting the board to listen to tcp port 5555 (##) would still give me the device not found error message.
Now, I don’t know why I had to take this particular step to make it work, and it took me almost three days to find out where the problem was. Turns out you have to create a new environment variable in Windows called ADBHOST with your Boards IP in it, 192.168.2.100.
After I did this once, I could use Tom’s coworker’s instructions just as-is. :: adb devices shows my device as 192.168.2.100:5555     device
You can create this variable by right-clicking on My Computer and then go to
Properties -> Advanced System Settings -> Advanced -> Environment Variables -> New…

Got the idea from How to Install ADB for Android in Windows - YouTube and Android ADB Setup - Texas Instruments Embedded Processors Wiki

Once again, I'd like to apologize if these problems are just caused by me beeing a noob with this kind of work, but I hope it helps you if you get stuck like I did.

Regards

Mathias

0 Kudos

1,211 Views
mathias
Contributor I

Hello everybody,

I started using Eclipse for Windows7 a few days ago and now wanted to test my applications directly on my QSB. I just found out that this is not trivial at all... So I wanted to ask if in the meantime anybody might have found out where I can find a suitable driver to get the adb working with USB.

In the meantime I'll be trying out the above solution with ethernet, thanks so much for that! It's the best alternative I've found so far.

Regards

Mathias

0 Kudos

1,211 Views
RobThompson
Contributor I

Hi Tom,

Thanks for your response and please thank your co-worker.  I followed the steps you outlined (except that the IP address assigned to eth0 by "netcfg eth0 dhcp" differs for my network, as one would expect) and was able to push my simple "Hello World" app to the device from my Eclipse environment and see it run on the LCD.

If I get a chance to explore other means of accomplishing this (e.g., via USB), I will post those steps here, too.  In the meantime, the steps you listed accomplish exactly what I was trying to do -- demonstrate that an Android app can be built on the PC and executed on the QSB.

Thanks again,

  Rob



Tom Stotts said:

Rob - One of my coworkers helped me out getting Eclipse-QSB connection over ethernet.  Here are my notes.

                 Android - adb over ethernet

Syntax:

## implies typing following text into serial command window to QSB
:: implies typing following text into Windows cmd console

1. Connect Ethernet cable to QSB.
2. Open serial connection to QSB (115200, N, 1, 8, No flow control)
3. ## bash     (not required, but nice shell)
4. ## netcfg
5. ## netcfg eth0 dhcp
6. ## netcfg   (Note - now shows ethernet 0 has an IP address 192.168.0.92)
7. ## stop adbd
8. ## setprop service.adb.tcp.port 5555
9. ## start adbd
10. Open Windows cmd console
11. :: cd C:\Program Files\Android\android-sdk\platform-tools\
12. :: adb kill-server
13. :: adb connect 192.168.0.92:5555
14. :: adb devices    (Note - now shows 192.168.0.92:5555  as device)

From here are options to access the QSB
15. :: adb shell   (access to the QSB file system)

- or -
Eclipse IDE can run the project on the device with adb over ethernet.
   This installs the .apk on the QSB.
  
Note - After powering QSB down and back up, had to play with setting this
       up again, but was able to get it working with the above steps.
Note - Have to uninstall the application on the QSB to push the application
       again from Eclipse.

 

- Tom

0 Kudos

1,211 Views
TomStotts
Contributor I

Rob - One of my coworkers helped me out getting Eclipse-QSB connection over ethernet.  Here are my notes.

                 Android - adb over ethernet

Syntax:

## implies typing following text into serial command window to QSB
:: implies typing following text into Windows cmd console

1. Connect Ethernet cable to QSB.
2. Open serial connection to QSB (115200, N, 1, 8, No flow control)
3. ## bash     (not required, but nice shell)
4. ## netcfg
5. ## netcfg eth0 dhcp
6. ## netcfg   (Note - now shows ethernet 0 has an IP address 192.168.0.92)
7. ## stop adbd
8. ## setprop service.adb.tcp.port 5555
9. ## start adbd
10. Open Windows cmd console
11. :: cd C:\Program Files\Android\android-sdk\platform-tools\
12. :: adb kill-server
13. :: adb connect 192.168.0.92:5555
14. :: adb devices    (Note - now shows 192.168.0.92:5555  as device)

From here are options to access the QSB
15. :: adb shell   (access to the QSB file system)

- or -
Eclipse IDE can run the project on the device with adb over ethernet.
   This installs the .apk on the QSB.
  
Note - After powering QSB down and back up, had to play with setting this
       up again, but was able to get it working with the above steps.
Note - Have to uninstall the application on the QSB to push the application
       again from Eclipse.

 

- Tom

0 Kudos

1,211 Views
TomStotts
Contributor I

Rob - I am in your exact situation.

I have the same issue with my XP system, with the MX53 QSB as well as other USB devices.  I have to install devices manually. 

I used the Android Settings | Applications | Development | USB debugging setting unchecked (not debug mode). 

When you connect the USB cable, Turn On USB Storage on the QSB (button on screen when cable is connected). 

For the "Windows Found New Hardware Wizard", select "install from specific location", include "C:\Windows\INF" and hit "Next".  I have to do this 3 or 4 times (repeat same steps for each interface).

Result is that I now have 3 disk drives showing in Device Manager, as well as 3 Unknown devices.  The 3 drives show up in Windows Explorer: "sdcards(E:)", "Removable Disk(F:)", and "Removable Disk(H:)". I can create folders, copy files, etc., on the "sdcards" drive, and see those files from the QSB Android Terminal Window by navigating to /mnt/sdcard.  Selecting either of the other 2 drives in Explorer shows the "Please insert a disk" dialog.

I still hope to find answers...

I don't know why the 3 Unknown devices are showing.

I cannot get the QSB to connect in Debugging mode (QSB always shows "Turn on USB storage").  Running "adb devices" only shows the emulators that I have running.  It has never shown the QSB.

I have yet to be able to install my hello_world.apk.  If you get this working, please post the "how to". 

I read Gunjan's replies, but need more info.  In my case, I can see the E: drive (the only drive that was accessible through Win Explorer), navigate to it in cygwin ("/cygdrive/e") - but have the same accessibility as I had with Windows Explorer. 

Again - I'm hoping to find a "how to" with some detail to reduce the learning curve.

- Tom

0 Kudos

1,211 Views
GunjanSamaiya
Contributor I

One more thing if you want to go with "connect your device with PC by Serial port and adb" in that case you need to install  cygwin application from: http://www.cygwin.com/ .


Gunjan Samaiya said:

Hi  Rob 

If you want to install your test application to your QSB there is two ways.

1. You need to connect your device with PC by Serial port and adb.

2. Connect your QSB and PC through the Data Cable/USB debugging cable.Then copy your application into sdcard and install it from any file explorer.

Regards

Gunjan

0 Kudos

1,211 Views
GunjanSamaiya
Contributor I

Hi  Rob 

If you want to install your test application to your QSB there is two ways.

1. You need to connect your device with PC by Serial port and adb.

2. Connect your QSB and PC through the Data Cable/USB debugging cable.Then copy your application into sdcard and install it from any file explorer.

Regards

Gunjan

0 Kudos