For Linux users go here:
Linux USB Connections
To automate usb connections, FOLLOW THIS PROCEDURE AND GET IT WORKING,
then go here:
Automate Windows USB/TCP Connections
-
Obtain ADB and install on the PC. This can be
obtained from the Android SDK or in stand-alone
packages. Search the web for stand-alone ADB. An
example for windows is here:
StandAlone ADB
-
Ensure the USB drivers for your mobile are installed
on the PC.
-
Ensure that USB debugging is enabled on the mobile
device. Note: This can vary depending on the device,
try to search the web for your device if necessary.
-
In Share GPS, create a new connection for NMEA USB.
The default port of 50000 should be fine for most.
-
Plug the mobile into the PC's USB port. Ensure ADB
detects the mobile. The mobile may need to authorize
access. Check the screen.
adb devices
-
Use adb to forward mobile tcp port (50000 is default)
to PC tcp port 20175 (or another port if desired).
adb forward tcp:20175 tcp:50000
-
Start the connection in Share GPS. You should see USB
listening in the status.
-
Start the program that will read the NMEA data. See
links below for examples:
-
Whenever done sending NMEA data, long press the
connection in Share GPS and select Disconnect.