Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.
Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

2015/07/01

Unstuck in Time and Space: An Investigation into Location over WiFi.

I track my location with Google and my phone, because I lack sufficient paranoia. To the right is my June 30.

I swear that I didn't leave the Greater Lafayette area. I certainly didn't teleport to the southern suburbs of Indianapolis.

This happens to me all the time, and it has bugged me a lot. But, normally I've just looked and griped, rather than trying to work it out.

Today, however, I'm watching a compiler or two, so I have some time I can use to work this out.

The protocol is KML, and this is what it looks like:

That isn't all day's results, merely the point in time I jumped 67 miles to the southeast. I was going to try to use a KML-specific Perl module, but found that the ones I could find were more about generating it than parsing it, and it's XML, so I figured what the heck.

I had previous code to work out the distance between two points, so it was an easy case of parsing to find the jump:

Breaking it down, at 2015-06-30T13:13:05.103-07:00 I go 67 miles to Greenwood, and at 2015-06-30T13:53:31.467-07:00 I pop back.

Let me bring up an other map.

 I didn't have any mapping software going, and I was using wifi, so this data is location via wifi not GPS. I know, though, that the group that runs my servers has a weekly "coffee break" on Tuesdays, that I met with my admin there, and I walked around toward his office before goign back to mine. His building is off S. Grant St., and I walked next to Hawkins Hall, in front of Pao Hall, near the Forestry Building and down to my office in Whistler.

So, question is, how does location over WiFi work? I recall hearing that routers and access points report location, but I'm not sure of the protocols involved. I can imagine two possible scenarios that cause this.

First is that one of Purdue's routers is misreporting location, either in Forestry or Pao. This is possible; I have another issue that I haven't worked through yet where I leap instantly to the EE building, and it seems that's entirely based on location within my building.

The second scenario, one I'm taking more and more seriously, is that there's a replicated MAC address or something between the apartments across from Pao Hall. I say "or something" because MAC addresses should be unique. The thing that makes me suspect this is that it points me to a residential neighborhood south of Indy, and I could see that mistake happening with two residential routers or two experimental electronics projects.

I'm curious about how to test this, because I do want to know it has something to do with Purdue's networking gear before I complain. I'm also curious about how these things actually work. I could very much see me walking around, looking at Google Maps and tripping over things, then trying to dump my ARP tables or something.

2013/07/29

Making a CarPuter to step into the New Car

It's been a while since I've written on car computing — over two years, it seems — but that doesn't mean I've stopped thinking about it. The top reasons I would've wanted one in years past would've been for Entertainment and Communication, and I think everyone would agree that today, it's far better to just carry a smartphone than to embed one into your car. And, seeing how smartphones are changing so much so fast, doing more than adding the ability to interface with Bluetooth and/or USB to your vehicle seems silly, at least in short-term.

Navigation doesn't fare too much better, so although it's a toss-up whether dedicated units like Garmin and TomTom are better than smartphone navigation like Google Maps, both are accepted as better (more current maps, better interfaces) than in-dash choices.



I think the use that is least considered is recording. Dash cams are common in Russia because they're used for legal protection, but have given YouTube a great catalog of amazing video. I think there's reason beyond "Hold my beer and watch this" for Americans to have dash cams, and I do want one.

But, ultimately, I think the best reason to get into "Carputers" is Diagnostics, getting into the data that is available from your car's OBDII port. The obvious way is to use an OBDII-to-Bluetooth adapter like the ELM327 or Garmin EcoRoute, but it strikes me that there are enough security vectors in to the New Car that adding more is not a wise route. So, I'm thinking that the Raspberry Pi and an OBDII USB cable might be the better way to handle it, except I'm not sure how to export the data, and while it would be useful to keep track while driving, ultimately, off-the-road analysis is where the usefulness of the process comes in.

I'm thinking that a Raspberry Pi, a cable, a small monitor with composite video and maybe a few other things could be easily turned into a car-monitoring system, and I could pretty easily set something up to only sync with my home network when it's close. I'm not sure whether that's more cost-effective than just getting an ELM327 and an ELM327 app from the Play Store, but I think I'd end up learning more that way.

Anyway, I'm still undecided on the phone/Pi issue, but I think this is something I need to do.

2012/12/13

Thinking Through An Idea - Caffeine Tracker

I tend to get horrible headaches on Saturday. I believe it is in part because I've started to drink coffee only on weekdays, only on workdays and only during work hours (9am-5pm) and Saturday is when the caffeine withdrawal hits. At least, that's my theory.




So, I'm considering making an Android app where I store each caffeinated beverage I drink. At first pass, I can get the number of cups and when. Second pass, I should be able to extrapolate caffeine amounts and start to figure out when it's in my system and when it isn't. I can work out when I tend to drink lots and when I tend to drink little.

I could write this as an HTML5 thing. There's certainly a case to be made for that, but I wouldn't be learning a vastly different skill set on that one.

What I want to do is make an Android app. It would be vaguely cooler to write the Java itself, but the first step might be to write it in HTML5, do it in PhoneGap, then push it to Android. Moving to iOS and Windows Phone and others (OpenWebOS?) should be easy. But then, I'm not learning Java. I'm not adding another skill to my resume.

So, this'll be an Android native app. More as I get to it. 

2012/02/23

I Suppose I Have Been Trying QS Already

I suppose I should've said that the weight tracking is my first step toward Quantified Self that I've programmed, because I've used some apps written by others.

I have MyTracks and RunKeeper on my phone (not that I really ever use them), both of which can be used to keep track of what you do when you exercise. I have used MyTracks for a few walks, but the problem is more me and my lack of scheduled walks than anything with those tools. I can credit MyTracks with telling me that the walk from the bus stop to my building is 0.31 miles.

The coolest thing I've used so far is called Smart Alarm Clock. Key to this is the Android phone's capability to sense motion. If you tell it to wake up at 6am, it starts trying to sense you moving around, which you do more in REM sleep, which is not when you want to wake up. When it senses you being more still, that is when you are sleeping the lightest, which is the best time to wake you up. It really is like magic.

The weight tracker is somewhat inspired by the Hacker Diet, which I have not fully read. 

2011/10/21

We Solved It! Return of the PAL Problem

Remember what I was saying about the campus networking issue I've been discussing? Long story short: My phone connects to our PEAP and THAWTE protected campus network just fine, but once I am on, the network cannot do anything. But only with Android. Windows is happy with PAL2.0. iOS is happy with PAL2.0, and if I recall the last time I booted the poor, battery-starved old Linux laptop I have in my bookcase at work, desktop Linux is happy with PAL2.0.

But Android is not. Which is annoying.

I have of course went to the helpdesk, and that's where it gets a bit interesting. There's two groups I've hit: the helpdesk, who have found this problem across different Android versions, across different carriers, different handset manufacturers, without finding any common indicator, and the networking group, who, without more to go on, have entered the go away kid, you bother me zone, considering it a failure in user configuration.

I feel I should point out that, for the most part, my co-worker Rick keeps his Android phone all but off when he's in the office. I, on the other hand, tend to hook my phone into my Greater Audio System (Windows and another 1/8" cable [either laptop or phone, depending] run into a y-cable plugged into the audio-in of my Linux box, which I config to go direct to the audio out, because I don't have a mixer, and then into a speaker and to my headphones) so I can get my phone's notification beeps and podcasts along with the other audio I have at work. So I use the network and feel it when it isn't available. So, while I was pushed by usage, for Rick it was a question of curiosity. Which seems to be enough.

When you think about networking, if you think about networking, you probably think about your IP address akin to a phone number, which kinda works and kinda doesn't. Assume we have an address of 8.8.8.8 (which I don't: that's the IP address of Google's open DNS server, which I kinda like). I can directly connect to any machine on my subnet, which could easily be 8.8.8.7 and 8.8.8.15 or further out, and if I can't find what I want on my local network, the traffic goes out the gateway to the hierarchically higher network. (There can also be down, in addition to up, but that's not important right now.)

One way to look around the local network is by using MAC addresses and routing tables, but that's too low level for this discussion. We use subnet masks. It's a series of 1s and 0s, in that order, which is used to tell if IP address A is in the same subnet as IP address B. A common netmask would look like 11111111111111111111111100000000. Clearly, that's hard for people to deal with, so we would write that as 255.255.255.0. First, each of those four breaks out 8 spaces, which are binary representations of positive integers between 0 and 255. Here's a table of what the allowed numbers are:
00000000 0
10000000 128
11000000 192
11100000 224
11110000 240
11111000 248
11111100 252
11111110 254
11111111 255
So, if the subnet mask is, 255.255.0.0, that means the mask in binary is 11111111 11111111 00000000 00000000. The digit that share a space with 1 will be the same if the IP address is on the same subnet, and different if it's 0. Google's 8.8.8.8 would be 00001000 00001000 00001000 00001000, the neighbor 8.8.8.9 would be 00001000 00001000 00001000 00001001. Diff's at the end, in the zero space, and thus same subnet. 8.9.8.8 would be 00001000 00001001 00001000 00001000, and that diff would be in the ones, and thus different.

The subnet mask sent out by DHCP was 255.255.240.0. iOS and Windows are just peachy with that. Rick noticed that the IP addresses were a little higher than he would expect. He suggested that we enter in static IP addresses based upon what we got via DHCP (using a tool like ifconfig to tell you it all) but with 224 as the third octet, and it worked like a charm. Go us!

2011/10/19

I don't like PAL2.0

Purdue has a wireless network, called Purdue Air Link, or PAL2.0. In essence, you log on to the wireless the same way you'd log onto most other university computing equipment. 

It works fine on my co-workers' iProducts.

It works fine on my laptop.

In most places, it works fine for me. And not just "at my home". Other places on campus, other places with PAL2.0.

But not in my office. In my office, I can connect -- phone says I have connection to network, phone says I have an IP address -- but cannot do anything with them. And the tools I would normally try to use to get a better idea of what's going on, such as ping, nslookup, traceroute and the like, are not on my phone. (Maybe I need to look into those.)

And, I should say, it affects my co-worker's Android phone, too.

I don't understand an issue that only occurs with Android phones, but it seems I have one. I think I'm getting an IP address, but I can't route.

2011/06/12

Lovin' Me Some Gingerbread

So, last night, I forgot to plug in my phone, which is an HTC Evo, an Android phone. I've had it since November, and if I forgot the overnight charging, I'd have a dead phone.

I had something like 77% charge this morning.

I love the Power Management under Gingerbread.

2011/06/09

Anger Subsides

I don't know if it was Sprint getting it's act together.

I don't know if it was Google getting it's act together.

I don't know if anyone from either saw my blog post and felt my anger.

I don't know if moving from Froyo to Gingerbread made all the difference.

But I have now fully connected my Sprint phone running Android to Google Voice. And I am happy.

2011/05/19

Problem with the new Music for Android, I think...

I like Buddy Miller. I like his new album, The Majestic Silver Strings, with Marc Ribot, Bill Frisell and Greg Leisz. But as much as it seems like something I'd do, I haven't listened to "Meds" full-time for the last 24 hours. Honestly, it does sound like something I would do, but no.

Here's the thing. I've been using the new Music from Google on my Android phone. I have Last.FM set to scrobble, and for nearly everything else (Pandora, old Music), it scrobbled the songs fine. I think the issue is that the new Music, which is still in beta, isn't telling whatever Last.FM reads that it paused or stopped, which means that Last.FM thinks that "Meds" is the Song That Never Ends. Oh so fun.

So, how do I file this bug?

2011/05/03

Angry at Sprint, Angry at Google Voice

I am a Sprint user. I have carried an Evo since Thanksgiving.

I have been a Google user for years. I have been a Google Voice user since it was GrandCentral. When I give people my phone number, I give them my Google Voice number rather than the phone's number. I jumped to having an Android phone as soon as I could swing it, for the smarts of it and in hopes that it would integrate with Google Voice.

So, when I heard that Sprint was offering Google Voice integration, I was all over that, signing up and waiting for it to say "Set it up". Which happened today.


Currently, I have a certain amount of integration. When I'm called at Voice, it rings on my hip. When I call, their caller ID says my voice number. So, I'm largely integrated. But there is a number I never use, and I'd rather dump it and always use my Google Voice Number.

Unfortunately, Google Voice cannot be enabled on this Sprint phone.
Please contact Sprint for more details as to why this cannot be enabled.

So, I called.

Evidently, the problem is that the HTC Evo is incompatable with Google Voice. They didn't really get into how, but honestly, that seems absolutely stupid. They did suggest I upgrade my phone, but I have a great phone and I don't really see anything I want that I don't have now.

Which makes me wonder what integration even means.

2010/12/09

The New Telephony meets the New Television: Expensive Remote

I have fairly close to the top end of the smartphones, the HTC Evo Android phone. I have a Vista computer connected to the Internet. I have just installed Boxee on said TV. Thing is, this TV, while it has a big screen and all, is across the room from me, and the keyboard and mouse are corded.

I did say I have an Android phone, right?

While it is a wonder of technology that can talk to WiFi, Bluetooth and 3G/4G mobile networks, and do much cooler stuff. I can watch video. I can make video. It is a cool thing. Being able to control my other computer is minor, but still cool.

I've done something like this before. Years ago, I had a Palm III. You could install an app that made your Palm into a programmable universal remote. That's cool, but that's coolness relying on IR and line-of-site and the IR source was meant for sending electronic business cards 3 feet away, not turning on a DVD player 10 feet away. This works over wireless networking, so line of sight is done, and thanks for that.

I'm also new to virtualizing interfaces. I've been a big fan of Synergy2 to allow you to have one keyboard for two or more computers. I just didn't expect it to touch the smartphone.

I know I'm at best second or third wave on this sort of thing. MythTV's been around for over 5 years, and many of these concepts are very stable. Microsoft's been putting these capabilities as part of their advertisements these days. And I know there are things involved here that I'm taking the goofy way around with. Big example is moving media onto my Android. (I call it RoyBatty, by the way. Considered going with RickDeckard, but no.) The old reliable way to do it would be to plug in the USB/charging cable. The slightly cooler way is via Bluetooth. My way is to use Dropbox. It's a cool and wonderful cross-platform thing. I was expecting full syncing, but it turns out to be pick-and-choose, which is okay, but it means I'm more active.) I think the really cool solution would be to using uPnP/DLNA. This means I have to start learning how to make that stuff work.

But seriously, this really convinces me that the New Television is a big monitor, receiving signal from whatever device you want, and not really the interface device in and of itself.

Now, if you excuse me, I'll watch some Revision3 on my computer as I go to bed.

2010/11/29

First Real Day With Android/EVO

I received the thing Friday and poked at it all weekend. I don't think I'll have to decide to love this thing.

But I have found a problem. Or at least a non-solution.

I work in a sub-basement. This means no cell connection. I mean, if I sat six feet to the south, there's a slight chance I could get a quarter-bar just enough for a ring. But I don't. So, I have been dreaming of ways to get my phone on. My way has been Google Voice and Gizmo. This meant that I cart my netbook with me. I had been hoping that I could answer calls via WiFi, but that seems to be a no-go.

There's also a Voyage app, but it only works on GSM phones, not CDMA phones like mine. What might work is Skype, but that strikes me as a mighty big if.

So, we'll see how things go.