Search found 63 matches

by Nick
Aug 16 2019 12:41pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Yes, just google them. I found it on eBay/China.
by Nick
Aug 16 2019 10:26am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Wiki updated with a solderless programming mehtod I used with great success:

https://github.com/OpenSource-EBike-fir ... debug-pads


Greetings
Niklas
by Nick
Aug 14 2019 3:38pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Updated wiki with new stand alone Windows programmer guide:
https://github.com/OpenSource-EBike-fir ... or-windows

This hopefully makes first install a bit easier!

Have a great day
Niklas
by Nick
Aug 14 2019 3:46am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

It is in theory possible to show a fancy icon on the screen indicating we are in bootloader mode. But because bootloader and application are two independent pieces of software, we have to rewrite the LCD driver for the bootloader. This costs flash space and we want to save that. The bootloader is as...
by Nick
Jul 20 2019 5:41am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

I will find some time again from August on. I am also interested to bring this project foward!

Cheers
Niklas
by Nick
Jun 13 2019 12:37am
Forum: Motor Technology
Topic: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor
Replies: 3892
Views: 194334

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Usage of battery SOC based on Coulomb counting I wounder how many users are using this feature on LCD3. LCD3 implements 2 different ways to measure SOC: battery voltage and Coulomb counting. There is an user reporting incorrect working of Coulomb counting SOC but I think is a bad configuration he d...
by Nick
Jun 10 2019 10:17am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Flash usage is no concern right now. We have 127 kb for application data (rest used by bootloader and SoftDevice). Eeprom emulation reserves 1 kb flash. The basic implementation (some fonts/GFX already included) compiles around 20 kb of flash. So with some reserve we have another 80-100k for our app...
by Nick
Jun 10 2019 7:36am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Hello everyone, I pushed some code to the 12.3.0 branch: I finally implemented the eeprom storage emulation. This is based on the nrf5x Flash Storage library. This was a bitch because it depends not only on SoftDevice but also needs some special initialization there. I missed that and all writes did...
by Nick
Jun 06 2019 2:41am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

So what is the font size you used in your example above for the bottom line (BRK / Lights)?
by Nick
Jun 05 2019 1:15pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

How about this for Light and Brake: IMG_20190605_195258_k.jpg For everyone who is interested in drawing some icons, this is how I did it: Use Inkscape to draw "pixel art". I used this tutorial for the basic settings. Important settings are: - File -> Document Properties: Custom Size to the icon size...
by Nick
May 26 2019 3:48am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

I made a light icon in gimp and then tried to vectorize and scale (12x18) it with inkscape but no good results. Probably to small? I just upload it here so if somebody else want to try or use it for other displays. example: light4.png gimp file: light.zip I am no expert in graphics but I think this...
by Nick
May 23 2019 12:55pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

I pushed new code to the 12.3.0 branch. I implemented the UART RX/TX part with some example how to use in the main.c (including a standard config in eeprom.h). With this, I was able to let the wheel spin and change the Assist level ;) Next I will have a look into saving config to flash (eeprom emula...
by Nick
May 23 2019 12:48pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Hello guys, just did some work on the layout for the lcd. Nothing is working with real data yet but just playing around with some info on the lcd. IMG_9399 (1).jpg Nice work! I like ;) @casainho Do you really want a graph on that tiny display? I think we can use the space better for some more infos...
by Nick
May 17 2019 4:30pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

elem wrote:
May 17 2019 3:51am
Can someone suggest me a sw102 on aliexpress to buy ?
pswpower is selling one without usb but seem BLE nordic inside ...
Are there different versions? Just grab one, they all have the Nordic SOC with Bluetooth on board.
by Nick
May 17 2019 1:37pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Hey Nick, Just got everythig up and running and did some updating by DFU it really works nice!! :bigthumb: Also had an look for programming the layout of the lcd. Did you make the battery with je picture and thedotfactory? If so can you share the picture or how you done it? I will have a look for m...
by Nick
May 12 2019 3:26pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Error: init mode failed (unable to connect to the target) Seems your OpenOCD is working correctly however the communication to the target is failing. Check the wiring. Also I think the nrf51 is locked/write protected and usually there are some commands to unprotect the first time before get it read...
by Nick
May 12 2019 1:31pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Ah, yes. That is because of the .gitignore no hex files were uploaded. Will fix this soon! I update the wiki too. BTW: Flashing the examples need the Softdevice to be flashed too (at least once). The order of flashing is important: 1) flash_softdevice (only once or if you want to begin from sratch, ...
by Nick
May 09 2019 1:26pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

The way I setup debug tools on Eclipse is kind of old. I just use the makefile and call it on command line (although can easily be called with CTRL + B)... Our SW102 firmware and bootloader are based on the nrf5 SDK, so all the build is done by Makefile too and is not managed by Eclipse. You can al...
by Nick
May 09 2019 3:33am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

The Device Pack is for debugging view only. If you install the pack, you can easily select peripheral registers like ADC, GPIO, ... and when halted you get a extra view of those registers:
Unbenannt.jpg
Unbenannt.jpg (60.83 KiB) Viewed 959 times
by Nick
May 08 2019 12:18pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

I mean we could develop a UART only Bootloader for SW102 and a Bluetooth Bootloader (which we already have). Someone who is interested in selling this but fears the Bluetooth SIG can sell the UART only SW102 and enduser can flash the BT Bootloader and firmware (once over UART) at home without openin...
by Nick
May 08 2019 2:49am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Bluetooth license fee $4000 ... What should we do?... 1) Don't panic! :wink: This project is open source none commercial. We are no company and do not sell any products. It will never happen that the Bluetooth SIG rings the door bell of end users to collect some license fees! Those fees are for com...
by Nick
May 06 2019 4:52pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

You can find the bootloader repository on my account as a start: https://github.com/lowPerformer/SW102_Bootloader But I'm afraid this is not as simple as flashing a hex. The bootloader needs also the Softdevice S130 v2.0.1 present. Don't know which Softdevice is on the original SW102. If you ask me,...
by Nick
May 06 2019 8:19am
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Hard to tell. It depends which bootloader is on the device. If it's based on the Nordic nrf5 bootloader, it requires a signed zip file. So without the private key you can't update anything. I assume this bootloader also accepts only signed packages. So for now you have to open the device and flash o...
by Nick
May 05 2019 12:02pm
Forum: Motor Technology
Topic: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app
Replies: 303
Views: 19499

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

DFU is working!

Normal Startup (SW102 advertising UART over BLE):
transfer.png
transfer.png (100.75 KiB) Viewed 1311 times
Bootloader Mode (Hold Power + M for >5 seconds)
bootloader.png
bootloader.png (222.99 KiB) Viewed 1311 times
Transfer of new firmware:
normal_start.png
normal_start.png (378.1 KiB) Viewed 1311 times