How to key protect settings and presets with Cycle Analyst?

neos

100 mW
Joined
Apr 5, 2020
Messages
48
Is it possible to protect all presets with a key except for the default preset which should be loaded
when the CA starts?
Also all setting menus should be key protected.

Therefore, there should be only the default preset available all other actions should require entering
a key.

Reason: In many European countries it is forbidden to use a e-bike on public roads where you can switch
easily between a street legal mode and a "off-road" mode.

If you ever get into a police check, it would be at least an advantage to have a:

Please enter vendor key:

on your display instead of all not road legal presets completely unprotected available.
 
So you want a lockout key, so to speak ( a password or "key" that doesn't allow the changing of settings without the key... ) , but still be able to toggle through the setting? From Lo/MED/HIGH? I understand this is what you wish?
 
there is no built in way to do what you want, exactly.

however, you can hide various menus and screens, either when riding or when stopped or both. then you would have to connect the ca to a computer via usb in order to access those menus in setup. the screens would not be visible unless you use the computer to unhide them.

please read the *full* page here:

https://www.ebikes.ca/product-info/cycle-analyst-3.html

or here for the older version

https://www.ebikes.ca/product-info/cycle-analyst.html


but there's no way to lockout stuff with a password.


you could create hardware externally that prevents the buttons from working, like a normally-open reed switch inside the case, wired between the button common and the ca board. that would require you to put a magnet on the case in that spot to be able to use the front panel buttons.

you could do something similar with an external "preset" switch, or the digiaux function. use reed switches (or hall-based switches) instead of the usual rocker or toggle switches, and have magnets you must put on them to activate them.
 
What you want to do is ride an illegal ebike without getting in trouble. A very common goal for those of us on ES.

The main components necessary to do this are vigilance and the habit of slowing to legal speed and spinning pedals when you see police.

Technical solutions are dumb, because in the first place the cops are unlikely to examine your CA they will just take whatever measures are prescribed if they think your bike is illegal or you were going waaay too fast, man.

Furthermore, if they do examine your bike and do so competently (or just ask you under oath if your bike can be reprogrammed to other power configurations) then they will discover the functionality you're trying to hide. And if there's any chance of you switching the modes while riding they will assume you did so.

Anyway if you're not in an absolute police state being smart and observant will accomplish what you wish since cops won't care about bikes especially if you're not drawing attention to yourself. If you are in a police state (or at least a bike nazi zone), you're probably not going to see much success with the solution you think you want.
 
To sum it up:

You can hide some menus, but can't stop other people from selecting or changing the available presets?

So you want a lockout key, so to speak ( a password or "key" that doesn't allow the changing of settings without the key... ) , but still be able to toggle through the setting? From Lo/MED/HIGH? I understand this is what you wish?

Only one preset should be available without a key.
You should be able to change PAS levels within the default preset,
but if you want to change the preset or switch to other presets you have to enter a key.

What you want to do is ride an illegal ebike without getting in trouble.

Not necessarily. It's total legal in my country to use fast e-bikes on a private cordoned off property
but not on public roads. It's even not allowed to use public roads with a street legal preset
if you can switch easily between legal and not legal modes.

Therefore: If you use only the street legal mode on public roads and all related settings or presets
are "vendor" locked, you will most probably get no problems even if your bike were controlled by
the police.

And yes, e-bike police controls are very rare but if such a control happens, it's better to be prepared.

But it's not just about police controls, it's also about being better protected against manipulation and theft
if you park your bike somewhere.
For theft protection, there would be also a password / key entry needed when switching the CA on.
 
neos said:
You can hide some menus, but can't stop other people from selecting or changing the available presets?
yes, you can. i already said one way (there are as many ways as your imagination can create. ;) ). it doesn't mean that their imagination won't be equal to yours, and that they wont' be able to defeat the measures you implement...but it makes it much less likely.

you can make antitheft measures that are similar, but if they want the bike they'll take it even if they cant' turn it on.


fwiw, even a password to prevent access to the ca wouldn't stop a thief from riding away with the bike.
 
amberwolf said:
neos said:
You can hide some menus, but can't stop other people from selecting or changing the available presets?

yes, you can. i already said one way (there are as many ways as your imagination can create. ;) ). it doesn't mean that their imagination won't be equal to yours, and that they wont' be able to defeat the measures you implement...but it makes it much less likely.

I can imagine a lot and if I had unlimited time and money, I also could do a lot.
Unfortunately I don't have that, therefore I was searching for a pragmatic solution that can be
implemented in a manageable amount of time.

And if this is only feasible with the CA by investing excessive effort in it, probably the CA isn't the
right display for me.

amberwolf said:
you can make antitheft measures that are similar, but if they want the bike they'll take it even if they cant' turn it on.

fwiw, even a password to prevent access to the ca wouldn't stop a thief from riding away with the bike.

I don't know where I mentioned that this would be the perfect solution to protect you bike against theft?
But if you can get a addition to your other anti theft measures for free by just adding a simple key function
why not using this (if you have a heavy e-bike than this could also be a effective addition)?

In my opinion, a hardware solution wouldn't be a good compromise, because it has to be durable
against mechanical and weather stress, which make such a solution always difficult to implement and prone to failures.

Therefore a software solution would be preferable.
The problem is, there is no free sdk or api for the CA that I know of.
 
neos said:
I can imagine a lot and if I had unlimited time and money, I also could do a lot.
Unfortunately I don't have that, therefore I was searching for a pragmatic solution that can be
implemented in a manageable amount of time.
ok. well, the most pragmatic solution in the quickest time (would probably take me a day or less if i needed to do it on the trike; i'm no longer all that good with my hands and can't see all that well up close) is magnetic switches either in series with or in place of the switches for the ca front panel and any preset switch(es) you use. it's easy, direct, and if you poke around there are threads where people have done this that you could use as examples.

And if this is only feasible with the CA by investing excessive effort in it, probably the CA isn't the
right display for me.
well, the ca is not a display. i mean, it has a display, but that's not it's purpose.

it is a complete computer that lets you take a bunch of inputs and then create a throttle signal from those based on your settings within it. it also keeps track of battery usage and bike mileage/speed/etc.

if that's what you want, its' the only one of it's kind out there i know of, except for a diy project recently posted up here on es that is more complicated and larger that doesn't come in a bike-mountable case.

if it's not what you want, then it's not the right item for you.



if all you want is a display, then you must get the one that is specifically compatible with the exact controller you already have, or one you will replace that with, because just the displays for controllers are not inter-compatible with all controllers; they're specific to brand and model and even version in various cases.

there are things like the kt kun teng kunteng controller that have versions compatible with the opensource firmware by casainho / stancecoke /etc., listed in threads here on es. they've also made osfw for some of the displays compatible with those controllers. yo'ud have to look at those threads to find out if they already ahve the features you want, and which specific hardware you'd need to get those features.

since it is opensource, you could branch it off and code in the password / etc stuff you want.


however, i'm not aware of any controllers (with or without displays) you can buy for "kit use", building your own bike from them, that have passwords / etc in them to do what you want to do (some have passwords to prevent user access to some settings, but i don't know that they do it for secure startup access. i haven't seen them all, by far, so there could be some out there....).


I don't know where I mentioned that this would be the perfect solution to protect you bike against theft?
you didn't. i was just pointing it out, because there are lots of people that don't normally ride bicycles taht come here to es for help setting one up, and have no idea how common bike theft is and how hard it is to thwart it. very very few poeple give us any info on their previous experiences (or pretty much anything else, including the stuff we need to know to help them), so i try to err on the side of providing more information than they might need, than not enough. ;)






In my opinion, a hardware solution wouldn't be a good compromise, because it has to be durable
against mechanical and weather stress, which make such a solution always difficult to implement and prone to failures.

Therefore a software solution would be preferable.
i see your point.

to be fair, the magnetic switches (hidden inside the ca casing, or the preset switch casing, or even inside the wiring harness), are easy to make weatherproof and mechanical-stress-resistant.

there have been other solutions (some in software running on hardware outside the display/controller system, some wiht ca's some not) posted around es if you choose to look around for them.


The problem is, there is no free sdk or api for the CA that I know of.
no, there isn't, because it's all hand-made machine-level code; i expect that even if it were publicly available, that unless someone knows the code inside-out they wouldn't be able to make any kind of changes to it without causing all sorts of changes across the whole program. (but i'm not a programmer, just know the concepts)

they'll make you custom changes to the firmware, starting at $1000, dependng on what you want if it's possible...but it is a tiny mcu with not much memory, and afaik it's always jsut about full, so wheenver they add new things they have to change or remove other things. they've talked about a new hardware version, with new software/features/etc., but haven't heard a thing about that in quite a while.
 
First of all thank you for the detailed answer.

no, there isn't, because it's all hand-made machine-level code.

I thought the CA was based on an Arduino compatible mc and they used something like the ArduinoIDE
for developing the Firmware?

If it would be well organized C++ code, it shouldn't be a huge task to implement such a simple key function.
But if it's not, then this is not an option.

they'll make you custom changes to the firmware, starting at $1000

$1000? Than that is also not an option.

to be fair, the magnetic switches (hidden inside the ca casing, or the preset switch casing, or even inside the wiring harness), are easy to make weatherproof and mechanical-stress-resistant.

there have been other solutions (some in software running on hardware outside the display/controller system, some wiht ca's some not) posted around es if you choose to look around for them.

My problem with all this hardware solutions is, that my knowledge in this area is quite limited.

There are also the 750C and the NXT displays. The ERT 750C has such a key lock function.
The 750C and NXT are compatible with the ASI BAC 800. Question is, are this display also compatible with
a MAC and the Baserunner, which I would prefer?
 
neos said:
I thought the CA was based on an Arduino compatible mc and they used something like the ArduinoIDE for developing the Firmware?
i don't recall which mcu it is, but i doubt it's arduino-compatible. afaicr the little that's been said was that it is direct machine code (assembly instructions, or actual hexadecimal codes, to hand-optimize the space it takes in mcu memory so more things fit and it runs faster).

If it would be well organized C++ code, it shouldn't be a huge task to implement such a simple key function.
But if it's not, then this is not an option.
from the way the post was worded (by either justin_le or teklektik, i can't recall atm, was a few years ago), i had the impression that it's not "well-organized", though i'm not a programmer so i might've misunderstood. i wish i could find the post itself, but a half hour of searching hasn't turned it up (did find some other interesting ca stuff i hadn't seen or have forgotten that i had seen...).

but even if it is the best-documented and organized code, it's not publicly available. :(


the only things around here i know of that are open-source code (dunno about documentation, but they're on github) that have or are displays for controllers are the ones for kt controllers, (don't recall all the models) and i think the tsdz2 middrive.

in theory, using that code, if you were to decode the datastream the controller you want to use will respond to, and send out, you could recode one of those displays starting with the osfw that's already available for them, assuming the communication hardware interface (serial of some form) is compatible or can be made to be. i don't know if that would do what you want, but it's one possible (maybe) path forward.


$1000? Than that is also not an option.
yeah, there's stuff i'd like it to do that it does differently than i need, so...if i ever get that far, i'll have to do it in hardware that then feeds the ca.


My problem with all this hardware solutions is, that my knowledge in this area is quite limited.
that's one thing this forum is here for, if you should decide to try it.


There are also the 750C and the NXT displays. The ERT 750C has such a key lock function.
The 750C and NXT are compatible with the ASI BAC 800. Question is, are this display also compatible with
a MAC and the Baserunner, which I would prefer?

that i don't have any experience with, and a search didn't turn up relevant info. most likely you will need to directly ask grin tech about it, info@ebikes.ca though since most of them are working from home due to covid19 precautions, it might take longer than usual to get an answer.

regarding the mac...the motor won't have anything to do with display compatibility, afaict. just the controller and it's hardware interface and it's communication protocol, and the data that actually gets sent back and forth.
 
amberwolf said:
but even if it is the best-documented and organized code, it's not publicly available. :(

That's the point. If it wasn't open source, a software solution is hardly feasible.

amberwolf said:
the only things around here i know of that are open-source code (dunno about documentation, but they're on github) that have or are displays for controllers are the ones for kt controllers, (don't recall all the models) and i think the tsdz2 middrive.

Before I dealt with the ASI BAC and Baserunner controllers I also thought of the kt controllers. But I couldn't find one that was small
enough to fit in the original bracket of the frame and powerful enough for the MAC.

I also didn't like the idea that the motor is louder and hasn't such fine tuned acceleration with the kt controllers.

amberwolf said:
My problem with all this hardware solutions is, that my knowledge in this area is quite limited.
that's one thing this forum is here for, if you should decide to try it.

With such a support, I could probably do something that works, but how durable would it be?
After a while when riding on bumpy roads, the vibrations are that strong that some screws has
to be tightened again. Such a solution wouldn't make much sense to me, if I have to open the CA case
every few kilometers in order to fix such a construction.

amberwolf said:
There are also the 750C and the NXT displays. The ERT 750C has such a key lock function.
The 750C and NXT are compatible with the ASI BAC 800. Question is, are this display also compatible with
a MAC and the Baserunner, which I would prefer?

that i don't have any experience with, and a search didn't turn up relevant info. most likely you will need to directly ask grin tech about it, info@ebikes.ca though since most of them are working from home due to covid19 precautions, it might take longer than usual to get an answer.

I already have asked ebikes.ca, but they can't say much about this displays, because this displays are not their product.
I have also asked ERT some weeks ago, but I haven't got an answer yet.

amberwolf said:
regarding the mac...the motor won't have anything to do with display compatibility, afaict. just the controller and it's hardware interface and it's communication protocol, and the data that actually gets sent back and forth.

The problem is, the motor has to be compatible with the controller and the controller has to be compatible with the display.
Unfortunately you can't combine controllers and displays as you like.
I would prefer anyway the NXT but unfortunately I haven't enough information about this display for a decision.
 
Back
Top