https://toitlang.org/ logo
Join Discord
Powered by
# general
  • w

    wahyudi124

    08/12/2025, 12:45 PM
    How to connect wifi programticly?
  • f

    floitsch

    08/12/2025, 1:33 PM
    You connect by doing
    net.open
    or
    wifi.open
    . If you are running with Jaguar, then Jaguar already does that automatically. You can ask Jaguar to temporarily disable its WiFi: https://github.com/toitlang/jaguar?tab=readme-ov-file#temporarily-disabling-jaguars-wifi
  • m

    MichaelK

    08/13/2025, 9:33 AM
    Current version of jaguar doesn't work on Ubuntu 20:
    Copy code
    michael-k@michaelk-Inspiron-14-5420:~$ jag
    jag: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by jag)
    jag: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by jag)
    michael-k@michaelk-Inspiron-14-5420:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID:    Ubuntu
    Description:    Ubuntu 20.04.6 LTS
    Release:    20.04
    Codename:    focal
    michael-k@michaelk-Inspiron-14-5420:~$
  • f

    floitsch

    08/13/2025, 9:35 AM
    I will downgrade the builder and release a new version soon.
  • f

    floitsch

    08/13/2025, 9:35 AM
    actually.
  • f

    floitsch

    08/13/2025, 9:36 AM
    GitHub doesn't support Ubuntu 20 anymore.
  • f

    floitsch

    08/13/2025, 9:36 AM
    The oldest release GitHub (and thus Toit/Jaguar) supports is Ubuntu 22.
  • m

    MichaelK

    08/13/2025, 9:45 AM
    You can use static libraries when building jaguar. Then there will be fewer problems. At least for users.
  • f

    floitsch

    08/13/2025, 9:51 AM
    Just Jaguar wouldn't be enough, as Jaguar calls out to
    toit
    executables. So it's not just a single build that needs to be changed.
  • f

    floitsch

    08/13/2025, 9:55 AM
    For Jaguar you could just try:
    go install github.com/toitlang/jaguar/cmd/jag@latest
    . As mentioned above, it wouldn't solve the problem that the Toit tools are also compiled on newer builders.
  • m

    MichaelK

    08/13/2025, 10:02 AM
    I tried flash for XIAO ESP32 S3 mini and it didn't work. Flashing doesn't go all the way. Are these chips supported at all?
    Copy code
    micrcx@micrcx-desktop:~/toit/parser$ jag flash -c esp32s3 --name mini -p /dev/ttyACM1 --wifi-ssid XXXXXX --wifi-password ZZZZZZZ
    Flashing device over serial on port '/dev/ttyACM1' ...
    esptool.py v4.8.1
    Serial port /dev/ttyACM1
    Connecting....
    Chip is ESP32-S3 (QFN56) (revision v0.2)
    Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
    Crystal is 40MHz
    MAC: d8:3b:da:73:df:e0
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 921600
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00000000 to 0x00003fff...
    Flash will be erased from 0x00008000 to 0x00008fff...
    Flash will be erased from 0x0000d000 to 0x0000efff...
    Flash will be erased from 0x00010000 to 0x00180fff...
    SHA digest in image updated
    Compressed 12480 bytes to 8732...
    Wrote 12480 bytes (8732 compressed) at 0x00000000 in 0.2 seconds (effective 402.8 kbit/s)...
    Hash of data verified.
    Compressed 4096 bytes to 171...
    Wrote 4096 bytes (171 compressed) at 0x00008000 in 0.0 seconds (effective 685.7 kbit/s)...
    Hash of data verified.
    Compressed 8192 bytes to 31...
    Wrote 8192 bytes (31 compressed) at 0x0000d000 in 0.1 seconds (effective 778.2 kbit/s)...
    Hash of data verified.
    Compressed 1510320 bytes to 949762...
    Wrote 1510320 bytes (949762 compressed) at 0x00010000 in 10.4 seconds (effective 1164.3 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    https://cdn.discordapp.com/attachments/918498540232253483/1405129457785638963/esp32s3-mini.png?ex=689db448&is=689c62c8&hm=e39730d1cb3b793b589abe29fa4b32796481a6c06f3e0dbc8f8793cc2d6d529b&
  • f

    floitsch

    08/13/2025, 10:03 AM
    It looks like the flashing succeeded.
  • f

    floitsch

    08/13/2025, 10:03 AM
    Jaguar might not be able to reset the device by itself, so you might need to do that yourself, but the device should then behave normally.
  • m

    MichaelK

    08/13/2025, 10:14 AM
    How do I reset the settings?
  • m

    MichaelK

    08/13/2025, 10:28 AM
    In any case, jag scan shows only one device, no two.
  • f

    floitsch

    08/13/2025, 10:30 AM
    What does
    jag monitor
    show? Did you reset the device by hand? (Or just unplug/plug)
  • m

    MichaelK

    08/13/2025, 10:32 AM
    micrcx@micrcx-desktop:~/toit/threaded_code$ jag monitor show Error: unknown command "show" for "jag monitor" micrcx@micrcx-desktop:~/toit/threaded_code$
  • f

    floitsch

    08/13/2025, 10:33 AM
    Without
    show
  • m

    MichaelK

    08/13/2025, 10:35 AM
    I tried turning unplug/plug. It doesn't work.
  • f

    floitsch

    08/13/2025, 10:35 AM
    Does it connect over the serial port?
  • m

    MichaelK

    08/13/2025, 10:39 AM
    Jag only shows the device on '/dev/ttyACM0', but not on '/dev/ttyACM1'
    Copy code
    micrcx@micrcx-desktop:~/toit/threaded_code$ jag monitor
    Starting serial monitor of port '/dev/ttyACM0' ...
    J1
      �ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce2810,len:0xdc
    load:0x403c8700,len:0x4
    load:0x403c8704,len:0xa08
    load:0x403cb700,len:0x257c
    entry 0x403c8854
    E (325) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAM chip not found or not supported, or wrong PSRAM line mode
    E (325) esp_psram: PSRAM enabled but initialization failed. Bailing out.
    [toit] INFO: starting <v2.0.0-alpha.184>
    [toit] DEBUG: clearing RTC memory: invalid checksum
    [toit] INFO: running on ESP32S3 - revision 0.2
    [wifi] DEBUG: connecting
    E (3801) wifi:Association refused too many times, max allowed 1
    [wifi] WARN: connect failed {reason: unknown reason (208)}
    [wifi] DEBUG: closing
    [jaguar] WARN: running Jaguar failed due to 'CONNECT_FAILED: unknown reason (208)' (1/3)
    [wifi] DEBUG: connecting
    E (6631) wifi:Association refused too many times, max allowed 1
    [wifi] WARN: connect failed {reason: unknown reason (208)}
    [wifi] DEBUG: closing
    [jaguar] WARN: running Jaguar failed due to 'CONNECT_FAILED: unknown reason (208)' (2/3)
    [wifi] DEBUG: connecting
    [wifi] DEBUG: connected
    [wifi] INFO: network address dynamically assigned through dhcp {ip: 192.168.1.228}
    [wifi] INFO: dns server address dynamically assigned through dhcp {ip: [192.168.1.1]}
    [jaguar.http] INFO: running Jaguar device 'polished-bill' (id: 'aab31f83-5d56-484b-b125-2a1f9c0035d2') on 'http://192.168.1.228:9000'
  • f

    floitsch

    08/13/2025, 10:40 AM
    So there is no ttyACM1?
  • m

    MichaelK

    08/13/2025, 10:41 AM
    Maybe jag can't work with two ports at the same time?
  • f

    floitsch

    08/13/2025, 10:42 AM
    Is there a ttyACM1?
  • f

    floitsch

    08/13/2025, 10:42 AM
    If yes, then
    jag monitor -p /dev/ttyACM1
    should work
  • m

    MichaelK

    08/13/2025, 10:50 AM
    Failed to connect:
    Copy code
    micrcx@micrcx-desktop:~/toit/threaded_code$ jag monitor -p /dev/ttyACM1
    Starting serial monitor of port '/dev/ttyACM1' ...
    E (325) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAM chip ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
    Saved PC:0x40385b12
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce2810,len:0xdc
    load:0x403c8700,len:0x4
    load:0x403c8704,len:0xa08
    load:0x403cb700,len:0x257c
    entry 0x403c8854
    E (325) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAM chip not found or not supported, or wrong PSRAM line mode
    E (325) esp_psram: PSRAM enabled but initialization failed. Bailing out.
    [toit] INFO: starting <v2.0.0-alpha.184>
    [toit] DEBUG: clearing RTC memory: powered on by hardware source
    [toit] INFO: running on ESP32S3 - revision 0.2
    [wifi] DEBUG: connecting
    [wifi] INFO: retrying {reason: expired authentication}
    [wifi] INFO: retrying {reason: expired authentication}
    [wifi] WARN: connect failed {reason: timeout}
    [wifi] DEBUG: closing
    [jaguar] WARN: running Jaguar failed due to 'DEADLINE_EXCEEDED' (1/3)
    [wifi] DEBUG: connecting
    [wifi] INFO: retrying {reason: expired authentication}
    [wifi] INFO: retrying {reason: expired authentication}
    [wifi] WARN: connect failed {reason: timeout}
    [wifi] DEBUG: closing
    [jaguar] WARN: running Jaguar failed due to 'DEADLINE_EXCEEDED' (2/3)
    [wifi] DEBUG: connecting
    [wifi] INFO: retrying {reason: expired authentication}
    [wifi] INFO: retrying {reason: expired authentication}
    [wifi] WARN: connect failed {reason: timeout}
    [wifi] DEBUG: closing
    [jaguar] WARN: running Jaguar failed due to 'DEADLINE_EXCEEDED' (3/3)
    [jaguar] INFO: backing off for 5s
    [wifi] DEBUG: connecting
  • f

    floitsch

    08/13/2025, 10:53 AM
    That looks like a bad antenna
  • m

    MichaelK

    08/13/2025, 11:07 AM
    You are right, this chinese wunderwaffe comes with an antenna. Just read it. Now everything works. Thank you. https://cdn.discordapp.com/attachments/918498540232253483/1405145840594718741/antenna.jpg?ex=689dc38a&is=689c720a&hm=af75fe4d58cffd12e77f69aef424633e8c1cebcfb27e4f0d15264f48f7729afa&
  • g

    GitHub

    08/14/2025, 4:59 PM
    message has been deleted
  • g

    GitHub

    08/17/2025, 4:01 PM
    message has been deleted