Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaleido Bluetooth Dropping Between Roasts (Unable to Reconnect without Roaster+Laptop Reset) #1705

Open
3 of 4 tasks
jessevanderhoff opened this issue Oct 3, 2024 · 22 comments

Comments

@jessevanderhoff
Copy link

Problem Description

artisan-settings.aset.txt
24-10-02_2113.alog.txt
Screenshot 2024-10-02 at 9 23 39 PM
https://youtu.be/Zrp8efzq0Fg

Kaleido M6 Sealed connects to Artisan via bluetooth successfully but then disconnects from M1 MacBook Air after ending roast and cannot reconnect thereafter without full roaster and Artisan laptop reset.

Youtube video link of issue is posted

Steps To Reproduce

  1. Restart roaster and Artisan MacBook laptop
  2. Start Artisan
  3. Connect to roaster via Macbook bluetooth menu
  4. Machine is already configured in Artisan from previous session.
  5. Turn roaster on through Artisan
  6. Run simulated roast
  7. End roast through Artisan "Off". "Kaleido disconnected" is displayed
  8. Click "reset" in Artisan
  9. Confirm Comm Port is maintained via "Config", "Port"
  10. Click "On" in Artisan
  11. See uu in ET,BT.

Youtube video here. https://youtu.be/Zrp8efzq0Fg

Artisan Version

3.0.2

Computer OS and Version

MacOS Sequoia 15.0

Connected devices or roasting machine

Kaleido M6 Sealed

Files

  • A sample profile *.alog file, renamed to *.alog.txt is attached.

  • A settings file (Help>> Save Settings) *.aset, renamed to *.aset.txt is attached.

  • Screenshots are attached.

  • No files are attached.

@Terracotta-6
Copy link

Terracotta-6 commented Oct 3, 2024

The MAC addresses are different Cannot share the same aset, M6, M1 Bluetooth pair with the coffee roaster and save separately.

@MAKOMO
Copy link
Member

MAKOMO commented Oct 3, 2024

Thanks for your detailed description of this issue. Thus we cannot duplicate it here. There seems to be a problem on the OS level with the bluetooth connection. I see in your video that the bluetooth device never gets into the "connected" state in the Bluetooth setup window of macOS and it keeps turning (despite the connection initially seems to work). Not much we can do on the Artisan level as Artisan is just connecting to a serial port and if that port is not available for connect this will fail. Could it be a macOS 15.0 Bluetooth issue?

Anybody else with this issue?

@Terracotta-6
Copy link

Terracotta-6 commented Oct 3, 2024

compatibility is best to consult the equipment supplier after sale.
https://www.kaleidosniper.com

@WesFarley
Copy link

WesFarley commented Oct 6, 2024

@MAKOMO I am also having this issue. My connection has started to decay during the roast. See the attached profile showing the gaps in the roast timeline as well as my configuration settings. I cannot reestablish a connection to the roaster without endless pairing unpairing and restarting/toggling on artisan until I am eventually successful which is fairly nerve racking when I'm trying not to warp my drum. I am running windows 11 so a different OS than @jessevanderhoff.

Attachments-Connection Issues on my M2.zip

I sent an email to espresso outlet (US distributor) who thought it looked like a software vs hardware issue on the roasters end, for whatever that perspective may be worth.

So far I have completely unpaired and uninstalled artisan, and reinstalled/setup, but am still having issues.

@MAKOMO
Copy link
Member

MAKOMO commented Oct 7, 2024

@WesFarley: your profile indicates that your BT connection is unstable as it keeps dropping. This might have several reasons like disturbing signals from motors nearby, large distance between sender and receiver, broken antenna,... However, Artisan manages to reconnect to the machine again until the next drop. Nothing that can be improved on the Artisan side here. Artisan just connects to a serial port and if this breaks tries to reconnect. This seems to work as intended in your case. Thus your issue seems unrelated to the one reported by @jessevanderhoff.

@WesFarley
Copy link

@MAKOMO, of the factors you mentioned, I cannot find a fitting cause. The machine is only 10ft from the controlling computer, and I do not have dropout issues with any other BT devices. It's of course possible that the issue is different than @jessevanderhoff but the behavior seems to be very similar.

I'll be going hard wired barring another fix.

@jessevanderhoff
Copy link
Author

@MAKOMO @Terracotta-6 is it possible to download an old version of Artisan to test this issue?

I'm particularly looking for v2.8.4 as it is the first version with Kaleido support built in.

The US distributor for Kaleido roasters, Espresso Outlet indicated they believe this could be an Artisan issue specific to new versions.

Being far from software savvy I found the release page and source code but don't see a DMG file.

Screenshot 2024-10-08 at 12 57 13 PM

@Terracotta-6
Copy link

@jessevanderhoff I am a Kaleido Coffee Roaster user, don't know what you bought? PRO? Dual system?you can download Mac-2.8.4 and try.
User guide.pdf

@huangdaojiri
Copy link

Contact your dealer to replace the roaster’s main board

@cnladd
Copy link

cnladd commented Oct 18, 2024

Thanks for your detailed description of this issue. Thus we cannot duplicate it here. There seems to be a problem on the OS level with the bluetooth connection. I see in your video that the bluetooth device never gets into the "connected" state in the Bluetooth setup window of macOS and it keeps turning (despite the connection initially seems to work). Not much we can do on the Artisan level as Artisan is just connecting to a serial port and if that port is not available for connect this will fail. Could it be a macOS 15.0 Bluetooth issue?

Anybody else with this issue?

I am having the same issue just as described by the original poster. Kaleido M10 Pro roaster, MacOS 15.0 Sequoia. Turn on roaster, MacBook Air connects to roaster via Bluetooth, turn on roaster with Artisan, roast. Turn off roaster. Reset roaster. No connection on next roast. The only sure fix so far is to reboot my laptop in between each and every roast.

I haven't had a chance to try on an older version of MacOS yet. I will this weekend.

@jessevanderhoff
Copy link
Author

jessevanderhoff commented Oct 19, 2024

Thanks for your detailed description of this issue. Thus we cannot duplicate it here. There seems to be a problem on the OS level with the bluetooth connection. I see in your video that the bluetooth device never gets into the "connected" state in the Bluetooth setup window of macOS and it keeps turning (despite the connection initially seems to work). Not much we can do on the Artisan level as Artisan is just connecting to a serial port and if that port is not available for connect this will fail. Could it be a macOS 15.0 Bluetooth issue?
Anybody else with this issue?

I am having the same issue just as described by the original poster. Kaleido M10 Pro roaster, MacOS 15.0 Sequoia. Turn on roaster, MacBook Air connects to roaster via Bluetooth, turn on roaster with Artisan, roast. Turn off roaster. Reset roaster. No connection on next roast. The only sure fix so far is to reboot my laptop in between each and every roast.

I haven't had a chance to try on an older version of MacOS yet. I will this weekend.

I have tried a few different combinations and found the following:

  1. Older Mac OS versions with Apple Silicon exhibit the same issue.
  2. Older Mac OS versions with Intel Silicon work as intended.
  3. Mac OS with Apple Silicon and older Artisan version 2.8.4 exhibits the same issue.
  4. For those with "dual" machines and a Kaleido tablet, a wifi connection can be used and maintains connection through multiple roasts. The only caveat is that the roaster will not store the wifi settings and the tablet must be connected during roaster boot up to initiate the connection.

I've contacted Kaleido who have been provided minimal help. I recommend to email them and their US distributor, espresso outlet to put pressure on them to fix this issue.
kaleidosniper@yahoo.com
sales@espressooutlet.com

@Terracotta-6
Copy link

Terracotta-6 commented Oct 20, 2024

Blueman is a GTK+ Bluetooth Manager may help solve Bluetooth connection problems.
https://github.com/blueman-project/blueman/tree/2.4.3

@Subteran
Copy link

Subteran commented Dec 3, 2024

I have the same issue. It started with macOS Sonoma and has continued with Sequoia. MacBook Pro M1 Max. After doing a roast, hit off, hit reset, save profile. Quit Artisan, open Bluetooth Settings, forget Roaster, turn off Bluetooth, turn on Bluetooth, connect to Roaster, close Bluetooth Settings, restart Artisan, turn On, connects and displays Temp data. If I do not do this, no temp data will display when I select On.

@MAKOMO I saw your post in hbldh/bleak#1645

Is this the issue? A reconnect problem? Have you already changed this for Mac builds?

@MAKOMO
Copy link
Member

MAKOMO commented Dec 4, 2024

@Subteran : totally unrelated. Bleak is used for BLE communication. The Kaleido is using a regular serial connection to a port provided by the OS (potential via a classic Bluetooth connection). Sorry.

@morsecoder
Copy link

Was just looking at the bluetooth trace from my Macbook Air M1 / macOS Sequoia 15.1. It seems like the initial handshake for RFCOMM Connection Request works just fine and the RFCOMM Connection Disconnect after roast seems successful as well. When clicking Reset/On to start another roast, I don't see any new connection requests being sent at all. Wondering if this helps at all. Also, is there a way to run the Artisan application in debug mode so I can see if there are any sus application logs?

This could still just be an issue between OS/Kaleido, but curious if there's something we can do to reset the connection that doesn't involve "Forgetting device" and reconnection.

@morsecoder
Copy link

Actually seems like it's timing out trying to reconnect to the serial port.

12-20 13:29:00 Thread-2 (start_background_loop) artisanlib.kaleido DEBUG : connecting to /dev/cu.Roaster_SRSv6@57600 ...
12-20 13:29:01 Thread-2 (start_background_loop) artisanlib.kaleido DEBUG : ping response timeout
12-20 13:29:03 Thread-2 (start_background_loop) artisanlib.kaleido DEBUG : ping response timeout
12-20 13:29:05 Thread-2 (start_background_loop) artisanlib.kaleido DEBUG : ping response timeout
12-20 13:29:06 Thread-2 (start_background_loop) artisanlib.kaleido DEBUG : connection timeout

@MAKOMO
Copy link
Member

MAKOMO commented Dec 20, 2024

John,

I made a minor modification to the async code which better ensures that the transport gets closed on disconnect. Not sure this makes a difference. The change is in current continuous build. Maybe you find time to test this.

To toggle debug mode in Artisan on, press OPTION and COMMAND while clicking the plus icon in the upper left corner of the main window. Hold OPTION while clicking that icon opens an email with the current artisan.log file attached. There is a logging flag in the Devices dialog (menu Config >> Devices) to turn device logging on. However, I have no high hope that there are trace of the issue found in that log file as the troubles might be outside of Artisan.

Thanks for looking into this!

@morsecoder
Copy link

Just tried it out and it looks like it now freezes when selecting "OFF". Seems like await writer.wait_closed() might be getting stuck based on whatever writer.close() is doing (or not doing).

@MAKOMO
Copy link
Member

MAKOMO commented Dec 21, 2024

So somehow that closing is not successful and that is why it cannot reopen that port as it still not closed from previous connection. That wait_closed() is just awaiting the proper closing of the port before continuing now. So something must be broken with that Bluetooth port closing on recent macOS running on AppleSilicon. We never got an issue report for Linux, Windows or Intel Macs. Not sure how to find out what is really broken here. Artisan is using very high-level APIs and the issue seems to be down that stack somewhere. Any help is very appreciated!

@MAKOMO
Copy link
Member

MAKOMO commented Dec 21, 2024

I added a timeout around my change and now this should at least not freeze anymore. I checked with a simulated (non-bluetooth) serial port (for the lack of a Kaildo machine) and the port is correctly closed (after the closing down message is correctly send to the machine) and reopened. Not much more I can do on the Artisan side. Seems that the underlying Bluetooth connection initiated first is not correctly closed on closing the serial port on Apple Silicon machines and a new one is not created on opening that serial port again.

@morsecoder
Copy link

Thanks for looking into this! Agree that it looks like an underlying Bluetooth issues, I'm seeing the Disconnect Response from the machine but OS probably isn't parsing it correctly or something. I might look into it a bit more but found a quicker workaround is to just kill the bluetooth process with sudo pkill bluetoothd and is restarts and reconnects haha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants