[ntp:questions] Do I have a lock to my NMEA GPS?

Terje Mathisen "terje.mathisen at tmsw.no" at ntp.org
Mon Nov 12 13:51:50 UTC 2012


David Malone wrote:
> Terje Mathisen <"terje.mathisen at tmsw.no"> writes:
>> FreeBSD, I don't know if that OS has something similar?
>
> You can do something like this, I think:
>
>          usbconfig -d ugen1.4 dump_all_config_desc | grep -i power
>
> It gives you a value in hex, something like this:
>
>          bMaxPower = 0x00fa
>
> Which, I think, is the max current in 2mA units.  0x00fa is 250, or
> 500mA.

Thanks!

I had to run it without the "-d ugen1.4" parameter and send the output 
to less, which let me locate the relevant part:

ugen4.2: <CP2102 USB to UART Bridge Controller Silicon Labs> at usbus4, 
cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON


  Configuration index 0

     bLength = 0x0009
     bDescriptorType = 0x0002
     wTotalLength = 0x0020
     bNumInterfaces = 0x0001
     bConfigurationValue = 0x0001
     iConfiguration = 0x0000  <no string>
     bmAttributes = 0x0080
     bMaxPower = 0x0032

I.e. the maximum power of the Sure GPS is 0x32 or 50, corresponding to 
the 100 mA which is guaranteed by the USB 1.0 spec. :-)

Terje
>
>          David.
>


-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"



More information about the questions mailing list