Announcement

Collapse
No announcement yet.

Wireless debugging recommendations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wireless debugging recommendations

    Do you have recommendations for the Android applications supporting wireless software development.

    I got my ZTE Speed "guestimates" today ($56) and started some experiments. There were several apps in Android Play Store for wireless ADB. Things were not obvious when some of those did require superuser rights, rooted devices, access rights beyond the WiFi connections, or app specific ADB for PC. I did end in using ADB wireless by Henry. So far it there has been no issues.

    What could be a better wireless ADB than the one made by Henry.?

  • #2
    I've used the one built into CyanogenMod. It works fine and you can be pretty confident that it's not malicious, but I rarely use it since it's a security risk.

    Comment


    • #3
      Originally posted by NoahAndrews View Post
      I've used the one built into CyanogenMod. It works fine and you can be pretty confident that it's not malicious, but I rarely use it since it's a security risk.
      Will we have Cyanogen running on the devices? Will we be allowed to root the device or install CM?
      FTC6460 mentor (software+computer vision+electronics), FPGA enthusiast. In favor of allowing custom electronics on FTC bots.
      Co-founder of ##ftc live chat for FTC programming--currently you may need to join and wait some time for help--volunteer basis only.

      Comment


      • #4
        I highly doubt they'll come with Cyanogen, but I hope we can install some sort of custom ROM. I don't want to have to deal with a ZTE skin. (assuming the ZTE Speed is in fact the official device)

        Comment


        • #5
          There was a thread about the wireless details the other day, Tom suggested the possibility of using ADB wirelessly directly from the IDE. I investigated further and was able to make the connection between a Nexus 7 (KitKat) and Android Studio running on Win8.1:
          http://ftcforum.usfirst.org/showthre...ll=1#post13144

          This should allow full debugging directly from the IDE. Hope this helps.

          Comment


          • #6
            There are some gremlins in the Android Studio, ZTE Speed, and ADB sandbox and they are hurting me. For awhile I was able to get simultaneous wireless debugging connection for two ZTE Speed phones, but now after several days of frustration, I am able to have only one wireless connection and the other is restricted to USB cable.

            The first impression was that the issue was related to one of the phones. After additional observation, the problem can be seen with both phones. The first phone can have the wireless connection, but not the other.

            Any advice?

            Comment


            • #7
              Originally posted by Ollie View Post
              There are some gremlins in the Android Studio, ZTE Speed, and ADB sandbox and they are hurting me. For awhile I was able to get simultaneous wireless debugging connection for two ZTE Speed phones, but now after several days of frustration, I am able to have only one wireless connection and the other is restricted to USB cable.

              The first impression was that the issue was related to one of the phones. After additional observation, the problem can be seen with both phones. The first phone can have the wireless connection, but not the other.

              Any advice?
              You might want to try poking at the adb daemon with the command-line commands: adb list-devices, command-line requests to connect to both, etc. Especially if you haven't rebooted, the adb daemon can have stale data and may need to be restarted.
              FTC6460 mentor (software+computer vision+electronics), FPGA enthusiast. In favor of allowing custom electronics on FTC bots.
              Co-founder of ##ftc live chat for FTC programming--currently you may need to join and wait some time for help--volunteer basis only.

              Comment


              • #8
                I've also noticed that ADB can easily get stale in Android Studio. I often have to restart ADB just to connect to a device over USB, nevermind wireless. I'm lazy and usually resort to "brute force" by unplugging and reconnecting the USB cable, but as hexafraction suggests the command line options are probably a more elegant solution for troubleshooting wireless connections.

                Comment


                • #9
                  Originally posted by Jerry McManus View Post
                  I've also noticed that ADB can easily get stale in Android Studio. I often have to restart ADB just to connect to a device over USB, nevermind wireless. I'm lazy and usually resort to "brute force" by unplugging and reconnecting the USB cable, but as hexafraction suggests the command line options are probably a more elegant solution for troubleshooting wireless connections.
                  I don't think I've ever actually troubleshooted connections with it. I just ask it to connect, and it'll automatically clean up IDEA's stale adb.
                  FTC6460 mentor (software+computer vision+electronics), FPGA enthusiast. In favor of allowing custom electronics on FTC bots.
                  Co-founder of ##ftc live chat for FTC programming--currently you may need to join and wait some time for help--volunteer basis only.

                  Comment


                  • #10
                    When debugging wirelessly, I follow this guide: http://developer.android.com/tools/h....html#wireless

                    When setting this up, you'll want to configure wireless adb on the robot controller, and NOT the driver station. (The driver station doesn't really have any interesting logs.)

                    Step 6 can be replaced with the command "adb shell netcfg". "wlan0" is regular wifi, and "p2p0" is your wifi direct connection when using the ZTE Speed. Other devices might name the interfaces differently. You will want to configure adb to connect to your regular wifi (wlan0) IP address.

                    If wlan0 doesn't have an IP address then your wifi connection isn't set up properly. Try connecting to your Wifi Access Point again.

                    If p2p0 doesn't have an IP address then the FTC software wasn't able to set up a wifi direct connection. Try exiting the FTC app and starting it again.

                    I have used wireless debugging on the Nexus 5, Nexus 7 (2013 edition), and the ZTE Speed.

                    One common issue is that some devices will power down wifi while the devices are not in use in order to save battery. If that happens, plug in the USB and connect adb over TCP/IP again. The other thing to be aware of is that your ping times will be considerable higher when using adb wirelessly, as the device needs to maintain two simultaneous wireless connections. Because of this I recommend that you do not use wireless adb during a competition. Wireless ping times of <5ms is common with just wifi direct active, ping times >20ms are common when both wifi direct and regular wifi is active.

                    Comment


                    • #11
                      Jonathan,

                      Thanks for all the practical advises. I am still in very early phases in Android Studio, ADB, and ZTE Speed learning processes. Some of my problems and questions can be trivial for seasoned developers, but I feel a little bit powerless at the moment.

                      I used to be able to do the wireless ADB connection to both phones - at least one phone at the time. The phones are identical, but now I can do the connection only for one phone. I believe that the PC end and the ADB server are OK. What I could do at the phone end to identify the issue?

                      At the moment, I am using "ADB Over Network" app. When turning the "ADB TCP Status" ON, the app shows error message "Could not enable ADB over TCP". Independently of the Status position (On or Off), the "adb shell netcfg" in PC shows "wlan0 UP 192.168.1.5/24 0x00001043 34:de:34:46:xx:xx" where 192.168.1.5 is the proper IP address.

                      Comment


                      • #12
                        No ADB app in phone is required

                        After some additional experimentation with ADB and Android Studio, my conclusion (ans answer to my original question) is that no ADB app is required in phone for wired or wireless debugging.

                        Once you have installed Android Studio in Windows, IOS, or Linux, add a path for the directory where the ADB executable file is. After that the following steps can be used to start wireless debugging:

                        1. Connect the phone with USB cable to host running Android Studio
                        2. If there have been past issues, reset ADB server: adb kill-server
                        3. adb tcpip 5555
                        4. Find the phone IP address and check that it is ready for ADB: adb shell netcfg
                        5. adb connect xx.xx.xx.xx (such as 192.168.1.55)
                        6. Disconnect the USB cable and start using wireless communication

                        The other phone can be left with wired connection to the host. With adb devices command you can list both the wired and wireless connections.

                        Cheers, Ollie

                        Comment


                        • #13
                          Hey Ollie, I'm glad you found a solution. I use the command line pretty heavily while developing.

                          Comment


                          • #14
                            Hi All

                            All this wireless ADB stuff is cool, but I was wondering if there was a more mainstream approach for simply deploying new code to the phone in the robot. (if we don't require debugging)

                            I know I'm not going to want to use USB for this, simply because of the number of deployment cycles, and the likely wear and tear on connectors and cables. (plus it's plain inconvenient during autonomous development)

                            Also, we tend to do a lot of our development on a desktop (without on-board wireless capabilities) so it would an advantage if it supported a networked access point.

                            With Samantha we could deply via WiFi (even if it was a paint with LabVIEW connected)
                            Even with the old humble NXT we were able to keep the USB active for code deployment.
                            Both of these methods were natively supported by the out-of-the box setup.

                            I saw that MIT's teir solution has a neat QR code method for deploying code (if you have internet access)

                            Has a standardized way been proposed for wirelessly deploying new Android Studio code to the robot's phone?

                            Phil.

                            Comment


                            • #15
                              Wireless ADB doesn't require WiFi direct. You can use it via a wireless router with a computer plugged into it, just as you described.

                              Comment

                              Working...
                              X