I tried my best to grep it out of the 850c code (and motor firmware)
But can you review and correct if needed.
I don't know the meaning of the fields (I can assume a lot out of the names) => can somebody complete the short description.

Next step : determine which ones need to be available on BLE ( and in which modus read/readwrite ....)
Once we agree on the (BLE) datafields I can try to create a POC of a custom Gatt server code and start on the android app

Casainho,
In a previous post you mentioned you will be focusing on the 850c, but aren't there parts that can be in common ?
If we take the L1, L2/L3 as a common structure I would assume that the uart handling is the same for both.

I am interested in helping with development for the SW102. Step 1 for me would be to purchase the display. What's the best source you would recommend to purchase from? I am located in Canada so is there a preferred North American supplier?

While I wait for the display, I will try and get up my development environment set up using the information here:

I tried my best to grep it out of the 850c code (and motor firmware)
But can you review and correct if needed.
I don't know the meaning of the fields (I can assume a lot out of the names) => can somebody complete the short description.

Next step : determine which ones need to be available on BLE ( and in which modus read/readwrite ....)
Once we agree on the (BLE) datafields I can try to create a POC of a custom Gatt server code and start on the android app

Casainho,
In a previous post you mentioned you will be focusing on the 850c, but aren't there parts that can be in common ?
If we take the L1, L2/L3 as a common structure I would assume that the uart handling is the same for both.

Seems strange to me to design the app from bottom to top. If you design from top, you would understand (I can explain more easily) the mean of each variable as they are for specific functionality.

850C does all the functionality while SW102 may share some with mobile app so I think it is important to understand the details of which functionality goes only or both to mobile app. After that, I think is easier to define the which structure needs to be sent and received to/from mobile app. For instance: Assist level, should it be read and written(increase/decrease) on mobile app? or only on SW102??

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 ready to flash firmware. This is something I don't know how is done on the "tools" that Nick prepared for Windows. I usually do using the telnet console access to send the needed commands to OpenOCD (on Linux).

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 ready to flash firmware. This is something I don't know how is done on the "tools" that Nick prepared for Windows. I usually do using the telnet console access to send the needed commands to OpenOCD (on Linux).

It was indeed a bad connection of one of the wires. Now everything is working!! and got the example running.

@Nick:
We are missing the file nRF5_SDK_12.3.0\components\softdevice\s130\hex\s130_nrf51_2.0.1_softdevice.hex in the 12.3.0 branch can you add that to the branch?

I had some troubles with building because of spaces in the installation path GNU MCU Eclipse\OpenOCD after renaming it to
nrf5\Eclipse\Toolchain\GNUMCUEclipse\OpenOCD everthing worked. Can I add that to the wiki or is this only my setup

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, all flash memory will be erased)
2) flash_program

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 ready to flash firmware. This is something I don't know how is done on the "tools" that Nick prepared for Windows. I usually do using the telnet console access to send the needed commands to OpenOCD (on Linux).

As far as I know, unlocking is done by a full erase of the chip. This is done when programming the softdevice.
I extend the projects Makefile with some targets which uses openOCD in command line mode (-c) to flash hex files on the chip. F.i. flashing the program hex (flash_program):

with $(OPENOCD) pointing to your existing installation on your system (you have to edit the Makefile to set this path btw!).

I think we also need a standalone version (of openOCD) to flash the bootloader/softdevice hexfile to the chip for all people who just want to flash (with ST-Link clones) and don't need the whole Eclipse install/GIT cloning/Tools install procedure for that! Any volunteers for that? I think writing a batch file/shell script and packing this together with openOCD in a zip file should do the job? Or are there some smarter solutions?

I'm totally out of my depth here... but have been working on the SW102 with people for a while... And have access to info... Let me know if there is anything I can do to help this process... I have the Bluetooth units with working TSDZ2 code for standard programming... Not sure if any of that will help, but I can bring in an associate to handle it if you guys think there is any info I could get to help out...

I'm totally out of my depth here... but have been working on the SW102 with people for a while... And have access to info... Let me know if there is anything I can do to help this process... I have the Bluetooth units with working TSDZ2 code for standard programming... Not sure if any of that will help, but I can bring in an associate to handle it if you guys think there is any info I could get to help out...

I think we also need a standalone version (of openOCD) to flash the bootloader/softdevice hexfile to the chip for all people who just want to flash (with ST-Link clones) and don't need the whole Eclipse install/GIT cloning/Tools install procedure for that! Any volunteers for that? I think writing a batch file/shell script and packing this together with openOCD in a zip file should do the job? Or are there some smarter solutions?

Hey Nick,

Just got everythig up and running and did some updating by DFU it really works nice!!
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 making a shell script to flash the bootloader/softdevice hexfile to the chip.

I'm totally out of my depth here... but have been working on the SW102 with people for a while... And have access to info... Let me know if there is anything I can do to help this process... I have the Bluetooth units with working TSDZ2 code for standard programming... Not sure if any of that will help, but I can bring in an associate to handle it if you guys think there is any info I could get to help out...

do you made test with marcoq code ?

Wow, no... I don't know why I have not tried this yet... finally got the programming smoothed to where it works, and hadn't even thought of it.

------

Ok, Update/Edit - got the new version... I will check it out... hoping it should work fine... since it works with the VLCD-5 programming... but will have to be modified for the lights usage and other options if desired... the one thing I really want to do is set the voltage change from the menu... anyway I will let you know how it goes.

I'm totally out of my depth here... but have been working on the SW102 with people for a while... And have access to info... Let me know if there is anything I can do to help this process... I have the Bluetooth units with working TSDZ2 code for standard programming... Not sure if any of that will help, but I can bring in an associate to handle it if you guys think there is any info I could get to help out...

do you made test with marcoq code ?

Wow, no... I don't know why I have not tried this yet... finally got the programming smoothed to where it works, and hadn't even thought of it.

------

Ok, Update/Edit - got the new version... I will check it out... hoping it should work fine... since it works with the VLCD-5 programming... but will have to be modified for the lights usage and other options if desired... the one thing I really want to do is set the voltage change from the menu... anyway I will let you know how it goes.

Last stable version is 0.16 and configurator 2.0 based, seem 0.18 and configurator 3.3 for fine too !?

i haven t any sw102 to check, i ll command one in future and try too, don t know if those from aliexpress work with BT .

I'm totally out of my depth here... but have been working on the SW102 with people for a while... And have access to info... Let me know if there is anything I can do to help this process... I have the Bluetooth units with working TSDZ2 code for standard programming... Not sure if any of that will help, but I can bring in an associate to handle it if you guys think there is any info I could get to help out...

do you made test with marcoq code ?

Wow, no... I don't know why I have not tried this yet... finally got the programming smoothed to where it works, and hadn't even thought of it.

------

Ok, Update/Edit - got the new version... I will check it out... hoping it should work fine... since it works with the VLCD-5 programming... but will have to be modified for the lights usage and other options if desired... the one thing I really want to do is set the voltage change from the menu... anyway I will let you know how it goes.

Hi, but what are you using for your tests is a sw102 with standard Bluetooth with Bafang cables or a specific version that you made yourself do for TSDZ2 with specific software and cables?

Just got everythig up and running and did some updating by DFU it really works nice!!
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 making a shell script to flash the bootloader/softdevice hexfile to the chip.

Regards,
Bart.

Good to hear. Would be great if someone is looking into the lcd layout.
The icon-thing include some steps, briefly:
1) Find some nice one on iconfinder.com. Choose "Free" and "Vector" in your search
2) open svg in inkscape and scale to appropriate size
3) open in gimp and export to bmp in 24-bit RGB (extended options)
4) open in TheDotFactory and generate a C-Array. Already mentioned it here. Have a look in fonts.h for an example and the usage in main.c, too.

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.

The way I understand it, it just has to be enabled.... other than EggRider, and Myself, I don't know anyone else that gets them with bluetooth enabled.... when it is enabled... it easy... any program you can transfer with - no lock. if you want to make a lock... im sure you can do that... I just don't know the ins and outs, but these are super easy to update, unless restricted of course

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.

The way I understand it, it just has to be enabled.... other than EggRider, and Myself, I don't know anyone else that gets them with bluetooth enabled.... when it is enabled... it easy... any program you can transfer with - no lock. if you want to make a lock... im sure you can do that... I just don't know the ins and outs, but these are super easy to update, unless restricted of course

those you sell on your web site are for bafang only or do you have spare programmed for TSDZ2 unlocked ?

I'd like to go with the SW102 display but I can't find any controller to go with that.

Would KT controller work with the SW102? Any other idea ?

Thanks for help

Please ask on the KT OpenSource firmware thread because must be the firmware on KT motor controller to support it. I think their developers like characteristics of SW102 as they are already using a Bluetooth app.

I wish KT OpenSource firmware could adopt SW102 LCD as also the TSDZ2 and so the SW102 coukd be used for broad number of users.

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!!

I see that speed has no decimal number. And so it is 2 digits. But seems that the LCD can hold 3 digits horizontal. Why not put the assist level digit + the speed digits on the same line??
And that would free the next line, and maybe there I would put a graph for the pedal human power.

On top, I would make just like on 850C LCD, battery on left side and time on right side.

And on bottom, where is now the time, I would put symbols like brake and lights.

About the mobile app, I bought an Android smartphone specifically to work as a GPS for my bicycle. I will be alone in mountains for 12 hours with a GPS file that I need to follow and I need to survive -- I need a good GPS and I want to keep my main phone only for calling or access Internet in the case of a need.

The bicycles GPSs starts at 200 euros and are locked in a way we can't install and run our apps. I bought a mobile phone (5 inches display) did cost 50 euros on local shop and runs Android Go, a version for cheap low specifications hardware.

The new Smartphones are BIG and with a lot of power. The new ones that are cheap for poor countries (running Android Go), are small (4 inches display) and seems to be ok for being a bicycle GPS.

I found OSMAnd app (OpenStreetMaps Android) to be popular and with the advanced features I am looking for, like import GPX files and doing the navigation, something that Goggle maps don't do:

One limitation I found on Android Go is that I can't run 2 apps on the screen and that means in future we can't run map navigation files AND our TSDZ2 app that communicates with SW102 and shows numeric data and graphs in real time.
On my regular phone I can use 2 apps, as shown here OSMAnd + Youtube on the screen: