Jump to content

The KS16 Firmware Thread


Jeffrey Scott Will
 Share

Recommended Posts

Then also a cautious thumbs up for V1.20 - posted my first experience with the new firmware here: http://forum.electricunicycle.org/topic/3719-kingsong-ks16-a-tinnitus-and-more/?do=findComment&comment=44369

The endomondo stats: http://imgur.com/ex0HPx0 (the 40 and 50 km/h peaks are GPS glitches...)

4 hours ago, Jeffrey Scott Will said:

After more research into another KS16 thread, I'm going to link @Jason McNeil's experience. AKA: don't upgrade yet!

 

By now, there are three firmwares/modells for/of KS16 available: 16A,B and C according to http://apkdomain.duapp.com/kingsong/versions.json - So this reports should consider which firmware version/KS16 model one has! Could be that @Jason McNeil's KS16 is a KS16A and (only?) this binary has problems?

Mine is a KS16B (delivered with firmware 1.13) - after this update the App shows me under "Basic Information" as Version "KS-16B-V1.20"

... to play devils advocate theoretically also the automatic firmware selection of the Kingsong App for updating could have been faulty at @Jason McNeil's trial ... (mixes up wrong firmware for a model...)

  • Upvote 2
Link to comment
Share on other sites

Jason's wheel firmware seems awfully old! I'd asume 1.07 must be from a prototype version KS16 perhaps? The first consumer wheels he sold came with v1.15 out of the factory. Mine is currently at 1.18 and working flawlessly, even after a few crashes due to not paying attention to obstacles. Well built wheel. ;)

  • Upvote 1
Link to comment
Share on other sites

1 hour ago, esaj said:

...

So, while it is (relatively) rare to encounter a transmission error (especially with such a small file as the firmware binaries), the effort to fix this shouldn't be that huge for KS:

  • Calculate an MD5 (or whatever, I'd see MD5 as "good enough") checksum from the known to be good binary files
  • Add a field for the checksum in the json-file and write the checksum for each file there
  • Modify the app to calculate the checksum from the firmware binary file after the download over HTTP completes
    • If the checksum doesn't match, re-download the file

...

16 hours ago, esaj said:

... (ie. update has failed, like store a value in EEPROM when the update starts, and erase / change it after it's complete; if during boot time the value is still found / shows that there's a update in progress, the update has failed, and bootloader should enter a "fault"-state, where it won't do anything except accept a new firmware).

Imho both measures together (saving the (new) md5 checksum in the EEPROM and check the contents of the EEProm with the given md5 checksum at every startup) should be a good measure to also be save from all other possible failures (eeprom data faults by aging and whatsoever...) with a quite simple method...

 

Edit: Somehow the formatting with the quoting got quite messed up ;(

PS.: This discussion started by occasion with the new KS firmware update with some evidence of these shortcomings, but imho would be fair to be written in the general section not only exclusively mentioning KS - i am afraid that many wheels with upgradable firmware could have the same/quite similar "problems"...

And additionaly many different suggestions for the manufacturers to improve the firmware could be collected there, like 

- Battery testing: It could be possible to measure the internal resistance of the battery pack at startup/while riding, so that "bad/aged" cells could be found _before_ the BMS shuts down while riding... Should happen with every EUC after some years (or even earlier if the packs where not held at the right voltages/temperatures...) that one/some bad/aged cells will get the BMS to just shut off because of undervoltage...

- System simulation: The firmware could model the whole system (wheel + rider) to predict (some) overleans/overpower/shutdowns and gives an alarm early enough (reaction time) for the rider...

- many other already mentioned/discussed firmware topics around here...

Edited by Chriull
  • Upvote 1
Link to comment
Share on other sites

1 hour ago, esaj said:

...

An abstract of a paper from the year 2000 ( http://dl.acm.org/citation.cfm?id=347561&dl=GUIDE&coll=GUIDE ) states that:

... After an analysis we conclude that the checksum will fail to detect errors for roughly 1 in 16 million to 10 billion packets.

 ...

TCP-packet MTU (Maximum Transfer Unit) is 1500 bytes at highest, and typically much lower, meaning that 1 file is not the same as 1 packet (assuming a 1000 byte average transfer unit, transferring the 16C.bin at 43008 bytes would need around 43 packets)

...

I did not read the paper, but it could be that "the checksum will fail to detect errors for roughly 1 in 16 million to 10 billion packets." regards each hop a packet makes. So to http://apkdomain.duapp.com/kingsong/versions.json from my place each packet makes (now tested with a tracetroute) 17 hops... And then there is the 18th hop once the data is transfered to the wheel.

So the chances for an undetected error would raise in this case by 43 packets (for the whole file) times 18 hops. So this would lead to a worst case of an undetected error every 21 thousand transfers (16 Million/43/18)... (with some packet retransmissions even more often...). This "amount" should happen and be "noticable" in a real world usage...

  • Upvote 2
Link to comment
Share on other sites

Apologies for a bit of OT but didn"t want to make a new thread just for that ... but where do you download the KS16 app from or what is it called exactly? Can't see it on the web or in Play store. Thank you!

 

Link to comment
Share on other sites

3 minutes ago, HEC said:

Apologies for a bit of OT but didn"t want to make a new thread just for that ... but where do you download the KS16 app from or what is it called exactly? Can't see it on the web or in Play store. Thank you!

 

Updating the firmware is done through the app itself: firmware upgrade under settings

Link to comment
Share on other sites

3 minutes ago, ThomasK said:

Updating the firmware is done through the app itself: firmware upgrade under settings

Thank you, I'm aware of that. My question is though where do I get the app from in a first place ;)

Link to comment
Share on other sites

7 minutes ago, HEC said:

Thank you, I'm aware of that. My question is though where do I get the app from in a first place ;)

Download from the KingSong site is not working for ages.... You should get it from your supplier.

There is a version at http://kingsong-france.com/download/app-ks16a/

You can download a version translated into German at http://www.electro-sport.de/epages/78292882.sf/de_DE/?ObjectPath=/Shops/78292882/Products/%22Kingsong%20KS16%22

pls go to " App für Android gibt es hier". Choose the file which is corresponding to the size of your battery pack.

 

Link to comment
Share on other sites

How long does it take to download the new firmware in the app as I can see the new version, pressed download and can see that the download button is highlighted and the black bar under it appears but that's it. Seems as though it is stuck??

Link to comment
Share on other sites

35 minutes ago, Stuart said:

How long does it take to download the new firmware in the app as I can see the new version, pressed download and can see that the download button is highlighted and the black bar under it appears but that's it. Seems as though it is stuck??

Sounds like it's stuck. It took maybe couple of seconds to download in my case. 

Edited by dside
Link to comment
Share on other sites

Me too same problem. But it can depend on the smartphone

I press the download button on the app, but nothing happens (HomTom chinese smartphone).

I try with my wife's smartphone (Samsung smartphone) and it works. However I did not make the upgrade yet. I prefer waiting untill a solid and tested firmware is released.

Edited by Frankman
Link to comment
Share on other sites

I updated from 1.15 to 1.20 and did 50 km riding in different conditions afterwards.

When I pressed the button "download", it took several seconds for download on the phone (Samsung galaxy 3 and fast internet). Just in case, before that, I removed the SIM card - did not want eventual phone call interruption.

Second step was longer one, when the firmware transfers to the KS16. After a minute transfer, I decided to leave the phone on the table.....and the process stopped and I thought "Now I'm f...ed" . Waited a couple of minutes, nothing happens and then pressed "download" again. This time (no movements from my side) the process finished successfully and when I restarted the EUC, the app showed ver.1.20.

The new firmware seems resolved my problem with the false "overpowered" reports, at least up to now have not happened.

But I observed twice that when reaching max speed the wheel mismatched the messages and instead of "Decrease your speed" says "Hello Kingsong" followed by Bluetooth connection interruption which was the case with ver.1.15 too.

The new app is still very unstable, looks like got improve a bit, but this may not have in common with the new firmware.

Edited by DS
  • Upvote 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...