Cycle Analyst Android App

any updates? Would be happy to beta test.... :mrgreen:
 
Sadly I haven't made any progress with the app, for a number of reasons. The biggest one was that I am going to switch the project over to Eclipse, which will give me a lot more options for making the app, and should also allow the app to be ported over to iOS without too much difficulty. I had set everything up on my laptop but since Windows died for me a couple of weeks ago I've been running ubuntu. You've motivated me to get Eclipse and the Android SDK set up though, and I may be working on this with a friend in order to get everything done. I have spent a fair amount of time thinking about what the app needs to do to be the most useful, and I would like to have the following features, probably developed in roughly this order:
*simple serial display from the Cycle Analyst via Bluetooth (all versions) and the USB-serial cable (Android 4.0+)
*Data Logging serial data to SD card
*v3 CA settings configuration (via Bluetooth and USB-serial cable)
*user-defined alarms for the serial telemetry
*in app manuals for the different CAs, Analogger, etc.

and if the day comes when all of the above is working:
*add gps data to logging
*telemetry overlay onto video from phone camera.

I can't say for sure when I'll have something for people to test, but I will try to move this up my priority list a bit.
 
It has been a while, but here is a new version of the app. This one has a landscape orientation and actively splits the input text, which should eliminate formatting errors on different devices. As a backup for the data parsing the bottom line will display the raw telemetry.


Here is the file if you would like to try it out, please let me know if you run into any errors:

 

Attachments

  • ScreenShot (1).png
    ScreenShot (1).png
    21.5 KB · Views: 3,811
Sorry, had some more time today and made a version that allows you to rotate the screen by pressing a button. Also fixed some issues with the bluetooth where it would crash if the other device was turned off before disconnecting it.
 

Attachments

  • ScreenShot (3).png
    ScreenShot (3).png
    17.8 KB · Views: 3,786
  • Cycle_Dash.zip
    1.3 MB · Views: 63
This is pretty awesome. I have a cycle analyst on my EV motorcycle. and your App would indeed be pretty impressive of an addon. that way I can hide my analyst and just run with a tablet. https://www.mission-motorcycles.com/ has something similar to this concept as their main display feature. and http://www.speedict.com/ has a hardware adapter that does this too. Your method seems to be a lot better imo. having a method of limiting would indeed be nice. at least max/min amp output and v limiter so as to not go under. a program on the fly would be most awesome! after i'm done doing a tear down and rebuild on my bike I will be looking to this to be my big upgrade. keep up the awesome work sir! you are a gentleman and a scholar and you have a fan out here in wa. :)
 
so, you can download speedicts app for free which does already what you want to do. now, i assume the output from their adapter is very different being that speedict uses a different device to measure this information. however, should be very helpful at getting your info and possibly gui build out as needed/wanted. ^_^
 
Thanks for that info on Speedict, I've never seen that before and it's really polished looking. It would be very interesting to see if they would be willing to share the format their serial data uses... or their source code ;) It would be very cool if there was a standard output that could be established so apps could work for multiple bike computers.

I will look into the limiting. Justin has released the hex values that we would need to send to the CA to change the settings. It wouldn't be something that you would want to mess with while riding though, as the CA stops it's other functions when this is happening.
 
here is a method to reverse engineer an apk (which really is just a zip archive)...i'm not sure entirely if this will do exactly what you want but depending on the contents there are many tools that will help break down what's in there. should be helpful in getting what you want. you could also use a hex editor to see how much clear text they have in the app that could assist you. I like the gui design which I figured you would like too.

https://code.google.com/p/android-apktool/

here are two of their apks

http://www.mediafire.com/download/cwjiik7k897ilzo/speedict.zip

The mercury is their more advanced app so maybe look into there to see how much is usable with the device. I'm really wanting to get a either the rom or the app that https://www.mission-motorcycles.com/ uses. I love their interface. I think it's a bit heavy as far as what all it gets. but I do like it.

Possibly use of widgets (like what is used by "torque" which uses an obdII bluetooth interface as it's base standard). but also has great design to work with. Sometimes it's easier to reverse engineer or re-purpose existing products than to re-invent the wheel. Anyway, I hope these help. I look forward to your solution as it is the least expensive solution and highly marketable. If you can build an inexpensive unit easily then you could easily re-sell just like speedict does and give your app away for free with ads and an option to donate to remove ads. :)
 
here is a page by page of the "OS" that they run with. i'm not entirely certain if they built their own "os" off of a linux setup or if they built it from android. I would assume an android build (custom rom) would be easiest for this. but anyway, just thought i'd share a little bit more.

http://issuu.com/hellforleather/docs/mission_motorcycles_missionospdf
 
Wow, that MissionOS sure is shiny. The home screen reminds me of speedtest.net. It would be really sweet to work on something like that. However I think that I would rather like to try working with the guys at ebikes.ca to improve the Cycle Analyst instead of trying to do my own system.

I might try that reverse engineering stuff out, but I'm kind of concerned about the legality of redistributing something like that. I'm sure speedict invested a good amount of time and money to develop that, and I certainly don't want to make anyone angry with something that I just want to make to help improve the community.

I've thought about how cool it would be to use OBDII for ebike setups. It would certainly make integration with existing apps a breeze. But I'm afraid that size of the hardware isn't enough to really justify it. RS-232 just takes less hardware and work to implement (although technically it's not "true" rs-232, it's only 0-5v and the bits are inverted) than a CANbus, which is what OBDII uses. The pro to using CAN is that it works really well in environments that are especially noisy.

I found this page where someone successfully hacked an OBDII to USB to also work as a bluetooth adapter with the same module as I've been using:
http://blog.avrnoob.com/2011/06/obd-ii-usb-adapter-to-bluetooth-adpater.html

which means that it should be possible to take the serial output of the CA and reformat it to match the OBDII adapter's output. But that means either adding a microcontroller on top of the bluetooth adapter or seeing if Justin is amendable to having an option to change the settings for the serial output so the CA does it on it's own... I'll ask him and see, might be buying a cheap adapter and sniffing the serial exchange.
 
I was thinking about that also in regards to legalities, but you are simply taking components of code which is much like taking words from a dictionary or using the sentence from the reference in which the word is defined. so really...you take concepts of the design of the software to fit your needs. Which should bypass those "legality" laws.

The OBDII, for whatever reason I was thinking you would need an ECU for this, but it would make sense that you wouldn't need one so long as you can translate the codes correctly. problem with some OBDII readers is some are a lot more laggy than others. which is bad. I have a bluetooth obdII in my cars so I can monitor them with my tablet when i'm driving and certain aspects load differently than others. but this is different from what you would be working with so maybe not so much on that lag.

great find on that datasheet btw. i'm sure that will make this much easier. only thing "needed" if you manage to get this to work comfortably without needing to modify the obdII adapter would be a plug in adapter for the bike. I know for my motorcycle this would be even better of an add on.
 
V1x0r said:
only thing "needed" if you manage to get this to work comfortably without needing to modify the obdII adapter would be a plug in adapter for the bike. I know for my motorcycle this would be even better of an add on.

actually the way I was talking about doing it meant that you wouldn't need an OBDII adapter at all, because you would just reformat the TTL to be in the same format as the output of the adapter, basically "spoofing" it. In theory you could just have this be a setting on the Cycle Analyst where it changes it's output, or you could have a microcontroller in between the CA and the bluetooth module that would reformat the data. This eliminates the need to have the hardware implementation needed for a CANbus and that there wouldn't need to be a board revision for the CA to add the feature
 
ooohhh, that makes more sense.

Another thought on your legal aspect would be if it is given away then you should be fine too. especially as a "hobbyist" project to see if you could.
 
so, enjoy. :) i included the jre 1.6 installer for 64bit if you don't have this. then do the apktool.bat as admin to install the apktool command to your system. and enjoy. ^_^ I also included the decompiled files just in case, since you aren't recompiling THEIR build, just seeing how they did what they did. ;)

EDIT - It helps if I share the file lol


EDIT - I removed the link to avoid any copyright issues.
 
V1x0r said:
I was thinking about that also in regards to legalities, but you are simply taking components of code which is much like taking words from a dictionary or using the sentence from the reference in which the word is defined. so really...you take concepts of the design of the software to fit your needs. Which should bypass those "legality" laws.

i just checked speedict's EULA for you, clearly decompile is not allowed.

"taking words from a dictionary or using the sentence from..." you need to decomile first :(


1. GRANT OF LICENSE : Subject to the terms below ... you may not: (i) reverse engineer, decompile, or disassemble the Software or attempt to discover the source code; (ii) modify, or create derivative works based upon, the Software in whole or in part without the express written consent of Speedict; (iii) distribute copies of the Software; (iv) remove any proprietary notices or labels on the Software; (v) resell, lease, rent, transfer, sublicense, or otherwise transfer rights to the Software.
 
well, clearly all you need then is to simply get permission
 
well, this may be of some future use...maybe not for decompiling software that others don't want you to decompile but w/e.
http://apkmultitool.com/

I personally think that unless you are stealing large amounts of code then you are simply using something as a reference. but then again, i see the world a little bit differently. any of my stuff I make I give away for free though as I feel knowledge should always be free.
I think the concern with these people is that they don't want you to decompile and steal their "innovations" and make a profit from it. however, since you already have most of the work done you are instead comparing and gathering ideas. you aren't going to steal anything of theirs.

now, this link is a bit more "shady" I suppose as you could theoretically use it to steal or crack other's applications that have different types of checks. (Like lucky patcher but a lot more efficient for patching) Now, what is nice about this tool is if you use the correct options then you can see what common methods are used for cracking your app. (suggesting that later on you want to charge for it). the site also gives suggestions for making it more difficult to crack your app. ^_^ I am very pro protecting your stuff correctly.
http://androidcracking.blogspot.com/p/antilvl_01.html

PLEASE UNDERSTAND THAT I AM NOT CONDONING THEFT OF HACKING FOR THE PURPOSE OF HAVING FREE! I enjoy cracking just to say I can but not for use. I actually pay for my apps. ^_^ if it's good enough to crack it's good enough to buy.

anyway, I hope this is helpful to you for the greater good. :)
 
You may really ask them. I think they have everything to get from a nice developpement on a forum like ES AND they know it ;)
If I recall correctly they do only charge for their hardware isn't it? If it's the case, I do not see anything dangerous for them to let their code open.
Finally and that's the main point... If they do it, they will get A LOT of developpment for free, advertisement on one if the most reputed Electric Bike scene, a bunch of beta tester and way more clients...
Ask them.. really ;)
And thanks for the work.. this ROCKS
Gruß,
H.
 
Back
Top