User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Where's my Pi?

Wed Sep 04, 2013 9:49 pm

I have a project which involves leaving Raspberry Pis on outside broadcast vehicles to display data from th' interweb. In order to pick the right data to display they need to know where they are. There is a limited number of places they could be, which can be narrowed down by looking online at which venues are active on that particular day. I thought I'd got it cracked by looking up www.ipcim.com and www.geoiptool.com to find the location from the external ip address of the routers they're connected to. Unfortunately it would seem that the ip address is allocated according to the adsl login details, not the phone line it is connected to. Does anyone have any clever tricks to find where they are?

User avatar
Mortimer
Posts: 926
Joined: Sun Jun 10, 2012 3:57 pm

Re: Where's my Pi?

Wed Sep 04, 2013 9:58 pm

GPS?
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Where's my Pi?

Wed Sep 04, 2013 10:11 pm

GPS doesn't work well inside vehicles. And is expensive.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13391
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Where's my Pi?

Wed Sep 04, 2013 11:08 pm

Electronic compass, plus counting wheel rotations to track the movements of the car. Thats how they did it in the pre-GPS times. using electronic maps stored on CD's.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Where's my Pi?

Thu Sep 05, 2013 6:05 am

The power is off while the vehicle is moving...

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Where's my Pi?

Thu Sep 05, 2013 7:37 am

Different days, different crew, different smartphones. But I suppose if I checked who's phones were on the wifi I could narrow down which region the unit was in.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Where's my Pi?

Thu Sep 05, 2013 7:49 am

Perhaps something along the lines of pinging servers in different cities then triangulating location from latency?

User avatar
joan
Posts: 15112
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Where's my Pi?

Thu Sep 05, 2013 7:51 am

Get the driver to enter the location. Or superglue a GPS aerial to the vehicle roof.

User avatar
RaTTuS
Posts: 10613
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Where's my Pi?

Thu Sep 05, 2013 7:58 am

http://www.kickstarter.com/projects/182 ... f=activity
+ gps
stuck to roof
you get video as well as location ;-p
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
Burngate
Posts: 6373
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Where's my Pi?

Thu Sep 05, 2013 9:04 am

You say there's only a limited number of places it could be, and only some are active on any particular day, with that information "out there". I'm thinking race-courses.
So you're not trying to find the scanner after it's been stolen :D
In fact, you don't even want to know where it actually is, just where it's supposed to be.

Could you put the information on a server somewhere, eg. google sites, and have your Pi access that? It knows which scanner it's embedded in, and what day it is, so it can find out where it should be.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Where's my Pi?

Thu Sep 05, 2013 10:37 am

Good sleuthing. Yes, I know where they are booked to be in advance, but sometimes plans are changed at short notice. The test system seemed to work fine by looking up the external IP address, but since I put it in a scanner last week nobody has updated the password on the adsl modem and it still thinks it hasn't moved from Ripon. Not a major problem as I have put a menu in the software to select the right racecourse with a keyboard. But that's yet another keyboard to find room for.

It's trying to replace something we've always done with teletext - and you had to press buttons on the teletext unit so there's no problem just putting some buttons on the GPIO pins of the Pi to do the same thing. The difference is that the teletext decoder can just switch off when we pull the plug at the end of the day. I had tried to make the Pi autonomous, and close itself down quietly once the last race started. Actually knowing that it was at the racecourse it was reading the details of made that decision more definite. And it seemed a good idea to make it totally independent.

I'm playing with traceroute at the moment to see if locating the next IP address down from the modem is any more reliable. My router at home doesn't seem to like that though. I've written a remote update system to be able to change software from my FTP server, but the two Pis that are on demo and test out in the wild are running an earlier version without the update code.

Meanwhile, I have to wait and see if the firm will adopt my Raspberry Pi solution. They'll have to do something soon - teletext is almost extinct.

Simon R.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Where's my Pi?

Thu Sep 05, 2013 11:05 am

The right answer is GPS, and it's not expensive. You can get one with a reasonably long cable that plugs into USB. Put the GPS on the dash, it will work well through the windscreen. Run the cable to the Pi, wherever it is. Or glue the GPS to the Pi and put both of them on the dash.

The only solution I can think of currently that is not lame is to have a wifi dongle on the Pi and make a list of nearby access points. When the vehicle is parked at the same place it will see the same access points (or some of them). But, if you can get a wifi signal you can probably receive a GPS signal.

You can do it the hard way if you want to.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Where's my Pi?

Thu Sep 05, 2013 11:24 am

GPS would seem to be the easiest solution, yes. But the windscreen is at the far end of the vehicle from the Pi. There are no windows at my end, we like to work in the dark. I'm trying to make the Pi as self contained as possible with just a USB lead for power (there's always a USB socket somewhere if you can guarantee it's incapable of passing on viruses) a network plug (or indeed wifi) and a composite video output which I can feed into a synchroniser. A simple keypad is the obvious solution. But why go for obvious? It's supposed to be an educational tool, so let's learn some devious and original ways of doing things. The Pi is the most fun I've had with computers since the ZX Spectrum in the eighties and PIC in the nineties.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Where's my Pi?

Thu Sep 05, 2013 12:07 pm

Without an Internet connection the whole thing is pointless in this case. The purpose of the device is to display information scraped from the Internet in a tidy easy to read form. Though in the long term having an accurate clock would be useful for, perhaps, generating timecode from the audio jack.

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: Where's my Pi?

Fri Sep 06, 2013 12:26 pm

old android phone with wheresmydroid
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

Return to “Other projects”