@@ -170,14 +170,13 @@ func NewDevice(
170170 }
171171}
172172
173- // info uses the opInfo api endpoint to learn about the version, platform/edition, and unlock
173+ // Info uses the opInfo api endpoint to learn about the version, platform/edition, and unlock
174174// status (true if unlocked).
175- func (device * Device ) info () (* semver.SemVer , common.Product , bool , error ) {
176-
175+ func Info (communication Communication ) (* semver.SemVer , common.Product , bool , error ) {
177176 // CAREFUL: hwwInfo is called on the raw transport, not on device.rawQuery, which behaves
178177 // differently depending on the firmware version. Reason: the version is not
179178 // available (this call is used to get the version), so it must work for all firmware versions.
180- response , err := device . communication .Query ([]byte (hwwInfo ))
179+ response , err := communication .Query ([]byte (hwwInfo ))
181180 if err != nil {
182181 return nil , "" , false , err
183182 }
@@ -227,6 +226,10 @@ func (device *Device) info() (*semver.SemVer, common.Product, bool, error) {
227226 return version , product , unlocked , nil
228227}
229228
229+ func (device * Device ) info () (* semver.SemVer , common.Product , bool , error ) {
230+ return Info (device .communication )
231+ }
232+
230233// Version returns the firmware version.
231234func (device * Device ) Version () * semver.SemVer {
232235 if device .version == nil {
0 commit comments