valterc / ki2

Karoo companion app for Japanese electronic shifting groupsets. Display gear/battery information and control Karoo ride screen.
MIT License
205 stars 12 forks source link

Losing connection... #196

Open walkingtheworld24 opened 1 year ago

walkingtheworld24 commented 1 year ago

Hi! Thank you so much for developing this app. I'm running the latest software updates on both the Karoo 2 and Ki2, and I moved the wireless transponder to be as close to the Karoo 2 as possible, however, I'm still losing connection with Ki2 after a 1 minute into my ride. The connection will randomly come back during the ride, but only for a few seconds. I've deleted the Ki2 and reinstalled it, but to no avail. Any other suggestions for how to maintain the connection? I have no other sensors loaded and do not typically connect my phone to the Karoo. Thanks!

valterc commented 1 year ago

Hi, you need to debug the problem on our side, I can give you some guidance to follow:

1 - Do you have Di2 registered in other devices? For example, do you have Di2 registered in a Garmin watch? If yes: try to have Di2 only added in Karoo an not in other devices at the same time.

2- Even if the Di2 wireless transponder is close to Karoo, try to check for signal quality:

It could be a signal issue, verify the signal between the wireless unit and Karoo. To do that, tap on the shifting device on the list of devices in Ki2. The signal value is displayed on the top when the shifting unit is connected. Signal values between -30 to -60dBm offer best and stable connectivity while a signal in range of -75 to -90dBm is degraded and can cause connectivity issues. There is nothing that can be done in the app/software to improve the signal. Recommendation is to move or rotate the shifting wireless unit, perhaps moving it a small amount could be enough or in some cases it may require relocating the wireless unit to another location in the bicycle closer to Karoo.

Other than that I'm not aware of any problems, so the issue might be with your setup. Can you try Di2 with another device?

walkingtheworld24 commented 1 year ago

Thanks for the response. The transponder is between -30 to -60 dBm, mostly in the -40 range and is located as close to the Karoo as it possibly can be. I have E-Tubes app on my iPhone for updating the software, but no other devices connected to the Karoo or to the Di2. I never had connection issues with the old set-up directly to the Karoo software. I'm wondering if an update to the Karoo interfered with the connection. 🤷🏻‍♀️

walkingtheworld24 commented 12 months ago

So today I went for a 28 mile ride and decided to connect my iPhone to the Karoo 2 for messages. The Ki2 stayed connected the entire ride. I'm not sure what connecting my phone did, but maybe that's my solution!

pulmark commented 12 months ago

I have the broken connection problem also. Very easy to repeat by stopping a ride when connection lost and then restart ride again after some seconds and then after some seconds K2 connects again. The connection stays on and active something like 70-80s, displaying gear changes perfectly. Then the K2 display freezes, it stops showing the gear changes. The freeze state stays around 10-20sec and then K2 shows a message for the gears like waiting for connection. The battery status display stays on but I don't know if it's updated correctly.

I have auto pause enabled in K2, speed 4.0kph. Today I rode 80km and tested the am. sequence, very easy to repeat. Start ride, switch gears, monitor that gear changes are displayed correctly K2. Then after a while the K2 display freezes - it doesn't show gear changes anymore - and then wait some seconds more and K2 gear display boxes shows a message like connection lost or waiting to connect.

My setup on the bike is as follows:

Shimano Ultegra R8170 Di2 complete group using wireless shifters. Derailleurs are wired. Battery is inside the seat post. I don't have any additional Shimano wireless units.

K2 attached into middle and front of handlebars. Distance from K2 (middle of screen) to shifters (top of hood) around 21cm.

Software Versions:

Derailleurs: FD: FD-R8150 V4.1.0 - latest 30.03.2023 RD: FD-R8150 V4.1.0 - latest 30.03.2023

Shifters: ST-R8170-L V4.1.2 - latest 31.10.2022 ST-R8170-R V4.1.2 - latest 31.10.2022

Battery: BT-DN300 V4.1.0 - latest 06.09.2023

The distance between K2 and derailleurs:

Front derailleur ~ 71cm (middle of FD unit to bottom part of K2) Rear derailleur ~ 110cm (middle of RD unit to bottom part of K2)

The wireless signal strength seems to be ok. At least I'm not planning to buy any Shimano extra transponder ? until I know that it fixes the connection problem and install or even glue it into the bottom of K2 unit. I could turn wireless shifters inwards some mm but this causes that during riding I have to move my elbows outward.

One option could be to use wiring for shifters. There is one empty connection in battery and then I could use that connection with junction box to do the wiring.

I have tried following changes with K2 and E-Tube but no success. Playing with different channels so 1st I configured channels so that the system uses same channels Ch1 and Ch2 in K2 and Di2. Then I thought that maybe using same channels cause some sort interference. Then I changed channels so that Di2 uses Ch1 & Ch2 and K2 uses Ch3 & Ch4 but no difference.

I'm software engineer but I have no Android programming experience. Anyway I would try some sort of "low hanging fruit" changes into K2 software like playing with process/thread priorities ? The Ki2 software works but there seems to be some sort of integration issue into Di2 system that causes K2 to lose connection.

One possibility is also that Shimano Di2 software has feature that prevents SRAM/Hammerhead devices to connect.

pulmark commented 12 months ago

One option would be to add simple timer (< 70s) to K2 software that initializes the connection into Di2 devices periodically but the problem is what to display during the initialization period in K2 - old data ?

pulmark commented 12 months ago

Addition to my configuration. I have the Shimano shifters top button configured as follows:

Left button: Single-press - shift K2 page left Double-press - take lap time Continuous-press - zoom map in

Right button - shift K2 page right Double-press - switch to map view Continuous-press - zoom map out

I have been testing the shifter buttons inside without the bike moving, K2 displays that it is in auto-pause state. The shifter buttons seems to work as configured much longer than 1min. The K2 says when taking lap time with left shifter top button during auto-pause that "Only one lap allowed per pause".

I will do test ride tomorrow without auto-pause activated. Maybe it's the root cause that stops K2 Ki2 package working properly.

pulmark commented 12 months ago

No auto-pause on today's ride. After the start K2 displayed gear status, battery status etc. normally for 60+ sec then stopped displaying changes. The error message on the K2 screen related to Di2 data was: "Waiting for data". So I don't know if connection was lost/broken or just that no data received.

Some sort of Di2 channel data recorder and analyzer would be useful to find out what happens and for debugging.

apamo commented 8 months ago

@walkingtheworld24 your solution worked for me! Thank you. Frankly I was quite worried about this issue (connection drop after 60sec and re-connecting randomly to be dropped again) and couldn't find the root cause. The signal quality was within the -30 to -40 range, the device was placed right below the handlebar, just cm away from my Karoo 2, so it had to be another issue. So, it seems like the bluetooth connection isn't kept alive unless I connect my Android phone to the Karoo 2 using the Karoo companion app. By doing this during my ride today I managed to keep the connection between my Karoo 2 and D-fly alive as well. In my view, the Ki2 project isn't the problem but the Karoo 2.

auvinenak commented 3 months ago

I had connection issues also, but the connecting the mobile worked for me also. Only thing that I don't like the notifications while driving, but perhaps I can reduce them from the mobile.