public class UsbInterface extends WatchInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
UsbInterface.FileMode |
WatchInterface.FileTypeFILEID_BLE_FIRMWARE, FILEID_BLE_UPDATE_LOG, FILEID_GPS_FIRMWARE, FILEID_GPSQUICKFIX_DATA, FILEID_INVALID, FILEID_LOG, FILEID_MANIFEST1, FILEID_MANIFEST2, FILEID_PLAYLIST, FILEID_PREFERENCES_XML, FILEID_SYSTEM_FIRMWARE, FILEID_UPDATE_LOG, fileList, listener, preferenceFile, PRODUCTID_UNKNOWN, TTWATCH_FILE_TYPE_MASK| Constructor and Description |
|---|
UsbInterface(UsbConnection usbConnection)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection()
Closes the USB connection
|
boolean |
deleteFile(UsbFile file)
Deletes the file on the watch indicated by the ID in the file
passed.
|
boolean |
fileExists(int fileId)
This method checks if a file exists
|
boolean |
formatDevice()
This method formats the device
|
String |
getDeviceSerialNumber()
Returns the serial number of the device.
|
ArrayList<UsbFile> |
getFileList(WatchInterface.FileType fileType)
This method requests the list of file of given type
|
int |
getProductId()
This method returns the firmware version
|
hirondelle.date4j.DateTime |
getWatchTime()
This method retrieves the time from the watch.
|
boolean |
openConnection()
Opens the USB connection
|
String |
readBleVersion()
This method returns the BLE version
|
boolean |
readFile(UsbFile file)
This method reads the file with file ID defined in the file
instance passed from the watch
|
String |
readFirmwareVersion()
This method returns the firmware version
|
boolean |
resetDevice()
Execute device reset
|
boolean |
resetGpsProcessor()
Resets the GPS processor
|
boolean |
sendMessageGroup1()
Another message sequence reported by ttwatch
|
boolean |
sendStartupSequence()
According to ttwatch (Ryan Binns) this is the sequence that should be
called after opening the watch connection
|
boolean |
writeFile(UsbFile file)
Write file to the watch.
|
getPreference, isFileType, readPreferences, setPreference, setProgressListener, writeGpxQuickFixFile, writePreferences, writeVerifyFilepublic UsbInterface(UsbConnection usbConnection)
usbConnection - The USB connection to usepublic boolean openConnection()
openConnection in class WatchInterfacepublic void closeConnection()
closeConnection in class WatchInterfacepublic boolean sendStartupSequence()
sendStartupSequence in class WatchInterfacepublic boolean sendMessageGroup1()
sendMessageGroup1 in class WatchInterfacepublic boolean fileExists(int fileId)
WatchInterfacefileExists in class WatchInterfacefileId - Id of the file to checkpublic boolean readFile(UsbFile file)
readFile in class WatchInterfacefile - File defining the file ID. The file data is read into
this file instancepublic boolean writeFile(UsbFile file)
writeFile in class WatchInterfacefile - The file to writepublic boolean deleteFile(UsbFile file)
deleteFile in class WatchInterfacefile - File defining the file ID to deletepublic ArrayList<UsbFile> getFileList(WatchInterface.FileType fileType)
getFileList in class WatchInterfacefileType - The type of files to requestpublic hirondelle.date4j.DateTime getWatchTime()
getWatchTime in class WatchInterfacepublic String readBleVersion()
readBleVersion in class WatchInterfacepublic String readFirmwareVersion()
readFirmwareVersion in class WatchInterfacepublic int getProductId()
getProductId in class WatchInterfacepublic String getDeviceSerialNumber()
getDeviceSerialNumber in class WatchInterfacepublic boolean resetDevice()
resetDevice in class WatchInterfacepublic boolean resetGpsProcessor()
resetGpsProcessor in class WatchInterfacepublic boolean formatDevice()
formatDevice in class WatchInterfaceCopyright © 2025. All rights reserved.