hackgvl / trolley-tracker

The Repo specifically for the tracking of the trolley in Greenville
Apache License 2.0
4 stars 2 forks source link

New Devices #105

Closed ajhodges closed 1 year ago

ajhodges commented 9 years ago

Per our discussion today, I think we should look in to getting new devices. Preferably a phone (cheaper) and one that has a good GPS and Verizon LTE compatibility.

The Moto E immediately comes to mind, and can be had brand new for $47.99 here: http://www.walmart.com/ip/Verizon-Moto-E-Prepaid-Smartphone/44052006

The Moto E is more than capable for our purposes and the price point is really attractive. The only issue is that Verizon has a policy that says you can't use prepaid devices on postpaid plans unless the phone has been active on a prepaid plan for longer than 6 months.

The loophole to this is that if you just ask Verizon for an activated sim card, they don't know what device you're going to use it in so they can't really enforce this.

I'm ready to pull the trigger and buy one of these puppies and rig it up so it powers on/off when it is unplugged, I just need @greenlinktransit to verify that they can get an activated LTE micro-sim card from Verizon for each of the trolleys.

Source: https://www.reddit.com/r/verizon/comments/36pprc/which_prepaid_phones_able_to_be_put_on_postpaid/

Our other option is to buy a cheap used Verizon post-paid phone. But I would really prefer the Moto E.

bikeoid commented 9 years ago

If we can install the devices as hidden and auto-on, it shouldn't need security updates since people won't be browsing the web on it.

One other thing if it's hidden - the GPS signal is much weaker than cellular signals, so it might not work acceptably if mounted under the foil of the roof panel or under a metal dash.

I'm good with either this or a tablet - this phone will certainly be easier to finance.

ajhodges commented 9 years ago

I'm gonna backtrack a bit - apparently that model of the Moto E is not rootable, Verizon has locked down the bootloader. I will need root to modify the phone to turn on when it is plugged in.

I will do more research on devices. In the meantime I would still like to know what the device activation process is like with your contract with Verizon. If the modems on the trolley already have micro sim cards, it could be as simple as swapping it over to our new device. Otherwise, we will need to get sim cards from them. They might want to have the device physically there to issue a new sim card too, due to their policy with using prepaid phones.

@bikeoid those are all good points, though we will want to keep auto updates on (for apps at least) for pushing new versions of our beacon app. Hopefully that layer of metallic foamy stuff lining the roof won't affect GPS too much but we'll have to do some testing with it.

greenlinktransit commented 9 years ago

It would be helpful if you guys gave me a specific list of questions for Verizon. I could send them around internally, but I'm guessing that no one would have a clue.

ajhodges commented 9 years ago

For you guys:

For verizon:

greenlinktransit commented 9 years ago

I'll forward these questions on the appropriate people and will let you know when I hear back.

greenlinktransit commented 9 years ago

Guys....I forwarded Adam's questions to our IT department (they control our Verizon contract) and here's their response...


Grant, I was talking with Tristan yesterday and he will be working closely with you guys. In answering some of the questions below, perhaps it will give us some options. First, before I answer those, here was Tristan’s idea to diagnosis this issue. He was going to take an existing Android phone that we have which has Verizon service. He would like to install the tracker app on the phone and run the phone at the same time as running the tablet. We are trying to pinpoint if the issue is with the modem versus the Verizon service. You should be hearing from him today about this.

Our contract is the same with Verizon as it is with AT&T and Sprint. All three are driven by the state contract. I was not involved in the original setup so I am not sure why we are using machine to machine service for these tablets, however, I do know that we could get data enabled tablet from Verizon fairly inexpensive which is mandated by the state contract to have an unlimited data plan.

If Tristan’s test works and his phone proves to be more stable than the tablet going through a machine to machine modem I propose that we turn off all the services associated with these modems and order two data enabled tablets. That would eliminate all the overhead associated with the connection now.


I think it would be easiest if someone sends Tristan a GitHub invitation so he can chime in on this thread. His email address is tkenney@greenvillesc.gov. He also just requested to be a Beta tester in the yeahthattrolley.com site.

greenlinktransit commented 9 years ago

Also, I have no idea if this is relevant at all but in working with some colleagues from other transit systems someone suggested that we look into Transitime (http://www.transitime.org/home.html) and see if we can use some of their concepts for our own system. Apparently they won some hackathon award -- http://devpost.com/software/transitime-open-source-real-time-transit-information.

dacohenii commented 9 years ago

I'm happy to volunteer my old Nexus 5 again (we used it in the beginning for testing purposes, but it was decided that we'd use the tablets instead). It won't work on Verizon, however.

@greenlinktransit: It should be no problem adding Tristan to the organization; however, he must first sign up. Once he's signed up, let us know, and one of us can add him.

greenlinktransit commented 9 years ago

I sent him the yeahthattrolley.com link, so he should have already signed up (or will be very soon).

ajhodges commented 9 years ago

:+1: good addition to the conversation. I just would like to let the IT guys (Tristan?) know that we would like to move away from having a tablet on the dash at all and instead mount the phone in the overhead compartment where the router currently resides. To do this, we need a phone that I can root and dig in to the system partition so I can boot the phone up whenever it is "plugged in" (key in the ignition). Then we don't have to worry about drivers forgetting to turn the device on/off.

But other than that it sounds like we are on the same page here. Nexus 5 would be great, Moto E would also be great because of how cheap it is. If GreenLink already has access to AT&T and there is no legal/financial downside to switching service for the trolleys over to AT&T and purchasing a couple Moto E's, it would make my life a lot easier!

Please keep me posted on how the phone test goes. We were measuring ~500kbps up/down on the trolley so I have a feeling that a phone with a 4G connection is going to be a lot more consistent.

I will have to whitelist Tristan's email before he can download the beacon app (which is separate from the client), and we will have to work something out so we don't have his phone showing up as a "live trolley" on the map. @bikeoid what do you think? Should we have him point his phone at the old API?

agautsc commented 9 years ago

@greenlinktransit Tristan should have just received a Beta invite for the public Android app. Like @dacohenii mentioned, if Tristan wants to be part of the GitHub org just have him create a GitHub account and let me know what that email is and I'll add him to the Code for Greenville org.

bikeoid commented 9 years ago

Re: testing - I'd agree that it is better for him to use the dev server at http://yeahthattrolley.azurewebsites.net for the Server IP on the beacon. He can leave it on and use the DB Visualizer to confirm complete system operation.

greenlinktransit commented 9 years ago

@agautsc @dacohenii Tristan's GitHub username is tkenney-gvl and his email address is tkenney@greenvillesc.gov

agautsc commented 9 years ago

He's been added :wave: @tkenney-gvl

greenlinktransit commented 9 years ago

I have another request -- could you please add Mike Blizzard from IT, as well? His username is mblizzard-gvl

agautsc commented 9 years ago

@mblizzard-gvl has been added. :wave:

tkenney-gvl commented 9 years ago

Hey guys, sorry it took me a while to get on, we were pretty busy here today. My initial thought when Grant approached us was that we could just keep the existing system and run a phone (since he had one that was just reclaimed - a Galaxy S4, Verizon) that we could use to test along side the existing setup to verify that it was a connection issue. I can definitely root it to make it usable for the auto-launch if that is the route the OP wants to take. Thanks to everyone willing to donate hardware, however, the City will provide its own hardware and choose its own carrier primarily since we will be supporting this in the future. For now, though, I'll get the S4 rooted per @ajhodges suggestion and get the admin tracker app installed, so we can test the connectivity issue.

Long term solution if the connectivity issue is resolved with the S4 would be to have two new dedicated mobile devices provided by the City.

ajhodges commented 9 years ago

Hey Tristan! Sorry for the confusion, I think you should go ahead and do your parallel test! Should be helpful in diagnosing the issue.

As for the S4, we could use a S4 no problem. The reason I wanted to nail down a long-term device ahead of time is that it will take some hackery to make the device boot up when it is plugged in, and because the technique I am going to use is device-specific, I'd rather not have to figure it out twice. So maybe we can just use the S4 to test the connectivity (so there's no need to root) and then you guys can choose whatever device you'd like - provided that the bootloader is unlockable.

Also I need your gmail (@tkenney-gvl) so I can whitelist it for the app.

Thanks!

tkenney-gvl commented 9 years ago

Sounds great. I totally agree that we'd only need to do that custom hackery once (or a few times as device lifecycles happen). :) I'll email you from my my test gmail account so you can add it to the whitelist. Thanks!

ajhodges commented 9 years ago

I added you. Please make sure you go in the settings of the app and change the server URL from api.yeahthattrolley.com to yeahthattrolley.azurewebsites.net before enabling background collection! I think we need to send you the credentials to use too (username is hard coded). @bikeoid can you send those in an email to @tkenney-gvl? I can't remember them...

tkenney-gvl commented 9 years ago

Cool, thanks!

tkenney-gvl commented 9 years ago

Everyone, Thanks for all the info and help. I just wanted to update everyone that I was able to get the agent loaded on the S4 this morning and I checked on the test tracking page and it shows up. Our next step will be to get it in the Trolley (probably Trolley1) and have it ride along, so we can do some testing and watch them side by side and see if the tablet drops and the S4 doesn't or if they both drop at the same time. Also I wanted to let you know of a possible issue, where when I was transitioning between mobile data and Wifi and I happened to launch the consumer app on my LG G3 it kept crashing the app. I'm not sure if that's default behavior or because of the underlying android system calls that happen when the app is launched. Also when I turned off any mobile or wifi it kept crashing the app too. I'm wondering if we could maybe add a function to allow the app to still launch, and just do a quick check for connectivity and if not, pop up a redirect to the settings to enable data/location/wifi or something. Might be more headache with coding than what it's worth, but I just thought I'd make a note here to let you all know. :)

bikeoid commented 9 years ago

It looks like the test beacon (Trolley 3 on the dev server) stayed running all weekend. Let me know before you run the test on a real trolley; especially if it's tested in the same location where it will be finally installed. I'd like to record the path to confirm that the GPS isn't lost, causing it to fall back on wifi + cellular accuracy only.

tkenney-gvl commented 9 years ago

@bikeoid I also saw that it was up pretty much all weekend. At this point I've heard back from the Fleet Services from the Trolley and we'll be getting them the device tomorrow for them to install in the Trolley (I'll find out which one tomorrow). Hopefully they'll get it installed before this weekend's Trolley use so we can watch them this weekend. Once I know which Trolley they'll be installing it on, we should be able to compare the route from the active trolley with the route on the test server and make sure that they're coinciding and then can also check for stability.

tkenney-gvl commented 9 years ago

Hey Guys (and Gals), The S4 is live and mounted in one of the trolleys. Since the fleet management doesn't use "Trolley 1" and "Trolley2", as they have other designations for them, I'll be looking at it over the lunch period when the trolleys are running today. I'll be able to tell probably pretty quickly which trolley it's on and I'll post it here as well. Thanks again.

agautsc commented 9 years ago

:clap:

tkenney-gvl commented 9 years ago

At this point I'm not seeing any trolleys running in the Android client Trolley Tracker app, but I'm seeing the positions of the one Trolley that has the S4 (from the test DB URL). It was pretty accurate as I watched it pass by City Hall and I was looking at it from the office, so I know at least that the tracking is working for the S4 - we'll just need to see how consistent it is.

bikeoid commented 9 years ago

This looks great! When the S4 is on the trolley, it's fine to point the beacon to the real server. Everything remains the same in the settings except for the "Server IP", which is set to api.yeahthattrolley.com .

I noticed that the S4 on the development server was moving so I watched it for part of lunch. There were some GPS wobbles around the downtown buildings, but it is more than adequate for what we need to go live, as long as it runs consistently.

ajhodges commented 9 years ago

How is the S4 mounted right now, out of curiosity? Does the driver turn it on/off?

We've been using the last digit of the license plate to identify the trolleys right now, so we have 5 and 6. So you'll also need to take a look at that and change the ID in the app accordingly, and then delete the agent from the tablet. Then we should be good to go! We could use a different method of identifying the trolleys, that's just the only visual difference between the trolleys we could really find at the time.

Hopefully we see continue to see a higher level of consistency on the S4. I've been meaning to do some work on the agent app to try to improve reliability, I just haven't gotten around to it :(

bikeoid commented 9 years ago

FYI - I'm also mirroring Trolley 3 from the Dev server to the production server so that those who have signed up for the Trolley Tracker beta will have something to see and test with.

tkenney-gvl commented 9 years ago

@ajhodges As far as I know it's mounted right beside the tablet on the dash. The drivers are doing the exact same thing with it as with the tablet (turning it on/off with the trolley power). @bikeoid I'll be heading over there sometime today and will be updating the S4's tracker settings to go directly to the production server's address. I'll be leaving it as Trolley3, though, since we want to run it side-by-side with the real Trolley (5 or 6) to test for stability. Thanks again for all your work and help! :)

bikeoid commented 9 years ago

I collected some good data from this weekend's run. The first shows all tracks - the track accuracy was very good for our purposes. This is all paths run over the entire route: t3path The single detour on Academy Street was a real path. There was only a single 'shortcut' trace from Park to N Main, but that isn't a big problem. Here is a closer view against city building satellite views: t3pathwithsatellite

Unless the new device will be mounted in a location with more metal shielding, we should not need any more testing. Device 3 did not show up on Friday night, so the biggest problem may still be getting it started consistently.

If the mounting has been finalized, I'd recommend that we proceed with the device adaptation to automatically turn on when power is applied, and assuming that it can be attached to 'ignition power'. We can run testing while modifying to confirm that it can start by itself many times in a row without failing.

The tablet was only online for a few minutes on Friday.

agautsc commented 9 years ago

Super helpful data @bikeoid :clap: I might get that top image as a tattoo. (I'm not really getting that as a tattoo, but it would be some cool piece of art.)

I agree with switching over to phones. It seems like the tablet use is getting worse. If there are two phones that the city or Greenlink has and can use let's do it. If we need to have some type of fundraiser to buy root-able phones I bet we could get that done fairly quickly. Just let us know what we need to do.

ajhodges commented 9 years ago

That looks pretty accurate to me! Thanks for doing that visualization.

I think the 'ignition power' issue was mostly just that when we first tested it, we left the key in the ignition and the power isn't cut to accessories until the key is removed from the ignition. Assuming the keys aren't left in the ignition, that should be more than suitable.

Unfortunately I've been doing more research in to Verizon devices and it seems like Verizon is very particular about having devices with unlocked bootloaders on their network, and so there are very few devices (if any?) that have unlockable bootloaders. A cursory search reveals that the Nexus 6 and Moto X (2015) version are some of the only phones that are currently able to have their bootloader unlocked (along with other 'developer edition' phones).

If we are stuck with Verizon S4s, then the 'auto-on' feature might not be possible as I'm going to need an unlocked bootloader to modify the charging animation to trigger a boot. Some of the older Verizon S4 OS versions were unlockable, but chances are these S4s have been updated and the exploits have been patched.

On Mon, Nov 16, 2015 at 2:30 PM, bikeoid notifications@github.com wrote:

I collected some good data from this weekend's run. The first shows all tracks - the track accuracy was very good for our purposes. This is all paths run over the entire route: [image: t3path] https://cloud.githubusercontent.com/assets/75929/11192113/2ba47cdc-8c6d-11e5-8d36-33f0c8a8ae05.jpg The single detour on Academy Street was a real path. There was only a single 'shortcut' trace from Park to N Main, but that isn't a big problem. Here is a closer view against city building satellite views: [image: t3pathwithsatellite] https://cloud.githubusercontent.com/assets/75929/11192144/54ee433e-8c6d-11e5-8926-fd376feaa58b.jpg

Unless the new device will be mounted in a location with more metal shielding, we should not need any more testing. Device 3 did not show up on Friday night, so the biggest problem may still be getting it started consistently.

If the mounting has been finalized, I'd recommend that we proceed with the device adaptation to automatically turn on when power is applied, and assuming that it can be attached to 'ignition power'. We can run testing while modifying to confirm that it can start by itself many times in a row without failing.

The tablet was only online for a few minutes on Friday.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker/issues/105#issuecomment-157144492 .

bikeoid commented 9 years ago

@tkenney-gvl: what are the plans for the weekend? I think we could have good results if we replaced the tablets with a mobile device, unless final mounting needs to be tested.

Also, will both trolleys be running this weekend?

greenlinktransit commented 9 years ago

@bikeoid I'll check with Maintenance and OPS on the trolley schedule for this weekend.

greenlinktransit commented 9 years ago

@bikeoid Per OPS....we're still waiting for one of the trolleys to get back from the body shop. Apparently it's supposed to be back today, but I heard the same story a couple weeks ago. I'll give you an update tomorrow.

tkenney-gvl commented 9 years ago

Nice visualization @bikeoid! As far as I know, the City will plan on providing the final equipment (the S4 was just for testing), so we'll do some research and make sure we get some devices with unlockable bootloaders for the final mounting. I tried getting the S4 on the production server the other day, but the data Mike Nice gave me to plug in showed "Unauthorized" in the main window on the tracker agent. I'll email him to get the complete info for when we get the new phones. Thanks!

greenlinktransit commented 8 years ago

FYI -- we got the 2nd trolley back last night from the body shop and it broke down on its first loop. Back to the shop it goes....

agautsc commented 8 years ago

They are being bought up fairly quickly, but there are still some Nexus 5's (last years model not the 5X) that are being sold online for around $200 each. I'll get @ajhodges to confirm, but I think those would work for all our needs.

ajhodges commented 8 years ago

Unfortunately I just looked it up and the Nexus 5 won't work on Verizon, but the 5X will.

On Fri, Nov 20, 2015 at 10:03 AM, Adam Gautsch notifications@github.com wrote:

They are being bought up fairly quickly, but there are still some Nexus 5's (last years model not the 5X) that are being sold online for around $200 each. I'll get @ajhodges https://github.com/ajhodges to confirm, but I think those would work for all our needs.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker/issues/105#issuecomment-158424954 .

mblizzard-gvl commented 8 years ago

Hi All,

I've been sitting tight and keeping an eye on the conversation but haven't contributed. Thank you all for you for the hard work you have put into this. We are ordering two Nexus 6's from Verizon today. They should arrive early next week which will allow us to configure the device and install the app before we head out for Thanksgiving. Either myself or Tristan will update everyone once we have them in hand.

Thanks again for all the input.

Mike City IT Department

agautsc commented 8 years ago

Woot!

bikeoid commented 8 years ago

This is great news! I'll disable the monitoring system for now until the new devices are installed.

greenlinktransit commented 8 years ago

Also a heads up that we will be returning all of the RouteMatch equipment on the Trolleys once the new phones come in. This includes the Samsung tablets, mounts, cases, and chargers.

jeremywight commented 8 years ago

Thanks Mike! Awesome!

On Fri, Nov 20, 2015 at 11:27 AM, greenlinktransit <notifications@github.com

wrote:

Also a heads up that we will be returning all of the RouteMatch equipment on the Trolleys once the new phones come in. This includes the Samsung tablets, mounts, cases, and chargers.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker/issues/105#issuecomment-158483126 .

greenlinktransit commented 8 years ago

FYI -- one of our supervisors said that the trolleys were appearing and disappearing on the Trolley Tracker all weekend despite the tablets being powered on. Hoping these snazzy new phones will be more reliable.

bikeoid commented 8 years ago

How do the new phones look? Let us know if you want any help on the special bootloader for auto power on/off (I haven't done one of these myself before)

agautsc commented 8 years ago

I second @bikeoid Let us know if we can help get the phones installed this week. I'm around and available if needed.

mblizzard-gvl commented 8 years ago

We have the phones in hand now. Tristan will be working with everyone to get the app installed and configured hew will also work with the fleet shop to get the units mounted. If everything goes as planned, they should be live this week.