Hello,
We are starting to develop an app for the Memor 10 using the TSL sled. My question is how am I supposed to debug any issues. Currently, I have to connect the Memor to my dev machine using the USB to debug/deploy on the Memor. However to use the RF module I have to unplug it & lose the connection to the Memor so I no longer have the ability to debug. Is that any way for me to walk through the code with the sled on? I’m kind of stuck as to how this is supposed to work.
Thanks,
Jeff
Hello @Jeff_Kimmel,
When the TSL sled is mounted on the Memor 10, the USB connector is no longer available because it is committed by the sled itself.
To be able to debug an application from Android Studio, ADB can be set to “Over IP” mode, as descted by the Android documentation (see Connect to a device over Wi-Fi (Android 10 and lower)).
Connecting ADB over Wi-Fi using command line.
To connect a device running Android 10 (API level 29) or lower, follow these initial steps over USB:
-
Connect your Android device and adb
host computer to a common Wi-Fi network.
-
Connect the device to the host computer with a USB cable.
-
Confirm that your host computer is connected to the target device:
C:\>adb devices
List of devices attached
<DEVICE_SERIAL_NUMBER> device
-
Set the target device to listen for a TCP/IP connection on port 5555:
C:\>adb tcpip 5555
restarting in TCP mode port: 5555
-
Disconnect the USB cable from the target device.
-
Find the IP address of the Android device.
For example, you can find the <device IP address> on the device at Settings > About phone > IP address, or through “adb shell ip addr show wlan0
” command line .
-
Connect to the device by its IP address:
C:\>adb connect <device IP address>:5555
-
Confirm that your host computer is connected to the target device:
C:\>adb devices
List of devices attached
<device_ip_address>:5555 device
Your device is now connected to adb
over WiFi.
If the adb
connection to your device is lost:
- Make sure that your host is still connected to the same Wi-Fi network as your Android device.
- Reconnect by executing the
adb connect
step again.
- If that doesn’t work, reset your
adb
host with:
C:\>adb kill-server
Then start over from the beginning.
Simone Callegari
Datalogic Mobile Products Specialist - L3 SW Engineer
2 Likes
Simone,
Thanks, that worked. I never knew that was an option.
Jeff
1 Like
Hi
I take advantage of your question to mention another little-known option offered by devices that mount Android 11 instead.
Unfortunately Your Memor 10 only supports Android 10 then i suggested you how to connect a device through ADB over WiFi using command line.
When you will switch to its Memor 11 successor, or to any other Datalogic device that mounts Android 11 (like Joya Touch 22 or Skorpio X5 or Memor 20) or higher, you can debug and deploy development applications directly wirelessly from your workstation, without having to physically connect the device via USB beforehand.
Connect to a device over Wi-Fi (Android 11 or higher)
To use wireless debugging, you must pair your device to your workstation using a QR code or a pairing code. Your workstation and device must be connected to the same wireless network.
To connect to your device, follow these steps:
-
Enable developer options on your device.
- Open Android Studio and select Pair Devices Using Wi-Fi from the run configurations menu.
The Pair devices over Wi-Fi window pops up, as shown in figure 2.
3.On your device, tap Wireless debugging and pair your device:
- To pair your device with a QR code, select Pair device with QR code and scan the QR code obtained from the Pair devices over Wi-Fi popup shown in figure 2.
- To pair your device with a pairing code, select Pair device with pairing code from the Pair devices over Wi-Fi popup. On your device, select Pair using pairing code and take note of the six-digit code provided. Once your device appears on the Pair devices over Wi-Fi window, you can select Pair and enter the six-digit code shown on your device.
After your device is paired, you can attempt to deploy your app to your device.
Fro more reference see the official Google article at: Android Debug Bridge (adb) | Android Studio | Android Developers
Simone Callegari
Datalogic Mobile Products Specialist - L3 SW Engineer