A while back, my friend Avi in India arranged to send me a couple of u-blox 5S mini-PCIe cards, because he wanted someone who could flash firmware to them (to enable higher resolution timekeeping), and I'd boasted that the motherboard in Duncan's desktop had a mini-PCIe slot. He wants to hook them up to things like a Raspberry Pi using the PPS pin only. They got here a couple of weeks ago, and I couldn't get either of them to show up no matter what I tried. I'd tried other cards in that board before he sent them, to make sure it was definitely active, but these cards just wouldn't light up.

I tried them in three different laptops too, and nothing worked. What the heck is going on? After a few hours of trying to work it out, a theory dawned on me: these cards are pinned for USB, not for PCIe - what if none of my slots were pinned for USB after all? It seemed unlikely - four different machines, none of them set up for USB? On the other hand, two identical cards arriving DOA seemed equally unlikely.

u-blox 5S in USB adapterAfter trolling eBay for a while, I happened upon a USB->mini-PCIe adaptor that appeared to have the pins wired up correctly. Indeed, it boasted a couple of "supported" cards, and when I checked one of them it was very clearly labelled as being pinned for USB, and since the adaptor was about $8 shipped form Australia, I pulled the trigger.

It arrived late this week, and I finally got a chance to play with it. One of the cards lit right up, and was detected by Windows immediately. The other one? It appears to actually be DOA - weird. But despite the fact I could see signals from the GPS and such, I couldn't get a position fix from it (not surprising, given that it needed an almanac update, which requires a very good signal to at least one satellite, uninterrupted for several minutes at a time, and I'm inside with no antenna), but more importantly I couldn't get it to flash.

This weekend, I worked out what the problem is - u-center is using the "Sensor API": that's Windows' exporting an API after it's driver is finished munging the data from the card, and presumably sending it to Microsoft. I need u-center to speak to the card directly, but there doesn't appear to be a way to do that. I did notice that it showed up as a USB COM port when I first plugged it in, before Windows installed the driver and took it over, so I deleted the driver, replugged it, and connected to the COM port in u-center before Windows reinstalled the driver.

This morning, Avi gave the go-ahead, and I tried flashing the other firmware to it. Immediate success, but now it sees no satellites. The "date" the GPS unit reports is in 1998, so presumably any state data it had and relies on is now empty, and because I lack a good enough antenna for it, it can't download it either. Tried signing up for u-blox's "AssistNow" feature which should let me zap the current almanac to it, but at the time of writing they haven't sent me a token to use their servers.

Interestingly enough though, those four devices that didn't have fully-pinned mini-PCIe slots? The slot in the new router works fine:

umodem0: <u-blox AG - www.u-blox.com u-blox 5  -  GPS Receiver, class 2/0, rev 1.10/1.00, addr 2> on usbus0

Update: I had another go at seeing if it would sync, since u-blox still haven't sent a token for "AssistNow". I sat holding a shitty mobile TV antenna, with a magnetic base stuck to my window frame, onto the not-the-right-size antenna connector, while I watched u-center tell me that there were 5 satellites visible, several with ~40dB S/N ratio. A cursory Google search the other night seemed to indicate that at least a 30dB S/NR would be required to sync the Almanac (a list of where each satellite is in the sky, required for positioning), but for some reason it simply refused to get a fix. I sat there for about 7 minutes, starting to give up hope, when it attained a position fix, and pretty freakin' accurately too! Plugged it into my Linux laptop, ran gpsmon, and after holding the antenna to it long enough to get a position fix, it is able to see the current time without an antenna.

So I would say that's mission accomplished.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry