guild icon
Toit
#Jag run -d host with Bluetooth scan never times out
Thread channel in help
z3ugma
z3ugma 08/27/2024 07:43 PM
Running this code on MacOS, the BLE Central scan never times out. It's not respecting the scan duration param?


jag run -d host sample.toit


SCAN_DURATION ::= Duration --ms=250 find_by_name central/ble.Central name/string: central.scan --duration=SCAN_DURATION: | device/ble.RemoteScannedDevice | if device.data.name and device.data.name.contains name: return device.address throw "no ring device found"
z3ugma
z3ugma 08/27/2024 07:45 PM
Yeah, even following something like the ble example from https://github.com/toitlang/toit/blob/master/examples/ble/scan.toit just results in a hanging process that never times out


// Copyright (C) 2023 Toitware ApS. // Use of this source code is governed by a Zero-Clause BSD license that can // be found in the examples/LICENSE file. import ble SCAN-DURATION ::= Duration --s=3 main: adapter := ble.Adapter central := adapter.central addresses := [] central.scan --duration=SCAN-DURATION: | device/ble.RemoteScannedDevice | addresses.add device.address print addresses
Program your microcontrollers in a fast and robust high-level language. - toitlang/toit
z3ugma
z3ugma 08/27/2024 07:50 PM
(I opened https://github.com/toitlang/toit/issues/2512) . Is there a way to downgrade the SDK
Program your microcontrollers in a fast and robust high-level language. - Issues · toitlang/toit
floitsch
floitsch 08/28/2024 03:37 PM
The easiest is probably to just download the binary. But we are looking into it.
z3ugma
z3ugma 08/28/2024 05:48 PM
Trying it on a different workstation, I notice that I get a log line:
cm started that I don't get on the problem workstation
z3ugma
z3ugma 08/28/2024 05:48 PM
that's
Version: v1.33.0 SDK version: v2.0.0-alpha.145 Build date: 2024-04-22T20:36:07Z
bitphlipphar
bitphlipphar 08/30/2024 05:44 PM
I believe we found and fixed the issue. Will send out new versions of Jaguar and Artemis with the fix early next week. Thanks for reporting this!
👌🏻1
z3ugma
z3ugma 09/02/2024 11:22 PM
thanks!!
z3ugma
z3ugma 09/13/2024 01:34 PM
What's Changed

Revert "Use 'toit' executable instead of the tools. (#538)" by @floitsch in #545
Prepeare for 1.41.0 release. by @floitsch in #546

Full Changelog: v1.40.0...v...
floitsch
floitsch 09/13/2024 01:51 PM
Let me check, but very likely.
z3ugmaOPz3ugma
floitsch
floitsch 09/13/2024 01:52 PM
Yes: Toit SDK v2.0.0-alpha.160 (part of jag 1.41.0) has the BLE fix:
https://github.com/toitlang/toit/releases/tag/v2.0.0-alpha.160
Use correct network for DNS requests.
Fix RMT regression.
Fix BLE on macOS.
Fix UART flush.
z3ugma
z3ugma 09/14/2024 02:44 PM
excellent! got it all updated
z3ugma
z3ugma 10/24/2024 04:52 PM
@bitphlipphar can you take a look at https://discord.com/channels/918498540232253480/918498540232253483/1298751480257450095 on MacOS?

@floitsch suggested you might take a look because you might have a Mac?
z3ugma
z3ugma 10/24/2024 04:52 PM
on alpha 163, do you know why the default BLE scanning https://docs.toit.io/tutorials/ble/scanning/#scanning from the tutorial would just return immediately without showing any results? I expected it to run indefinitely per the tutorial
z3ugmaOPz3ugma
@bitphlipphar can you take a look at https://discord.com/channels/918498540232253480/918498540232253483/1298751480257450095 on MacOS? @floitsch suggested you ...
bitphlipphar
bitphlipphar 10/24/2024 04:54 PM
Will do! Thanks for the ping :🙂:
15 messages in total