https://toitlang.org/ logo
Join Discord
Powered by
# general
  • 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
  • g

    GitHub

    08/20/2025, 8:35 AM
    message has been deleted
  • m

    MichaelK

    08/22/2025, 7:29 AM
    Can jag monitor be done via wifi only without using the serial port (USB) of the computer?
  • f

    floitsch

    08/22/2025, 7:31 AM
    You can use https://pkg.toit.io/package/github.com%2Flightbug-io%2Ftoit-pluggable-printing@v1.0.0 to redirect all prints. That provides access to most of the output (but not low level system messages).
  • a

    addshore

    08/27/2025, 11:54 AM
    FYI, footer of https://pkg.toit.io/ links to FAQ of https://toit.io/developers/faq which is a 404 which I guess might be best pointing to https://help.toit.io/ now?
  • k

    kasperl

    08/27/2025, 1:50 PM
    Thank you! I will fix this 🙂
  • f

    floitsch

    08/30/2025, 10:41 AM
    Fix is being pushed and should be live in a few minutes.
  • f

    floitsch

    09/01/2025, 10:15 AM
    We have a user where
    jag monitor
    doesn't work on a Windows 11 machine. Has anyone experienced similar issues? Does
    jag monitor
    with Jaguar 1.55 work for someone on Windows 11?
  • a

    addshore

    09/01/2025, 1:52 PM
    works for me https://cdn.discordapp.com/attachments/918498540232253483/1412072638301474968/image.png?ex=68b6f6a0&is=68b5a520&hm=99d359de89407a8f563f326aa77d41dd92ac81f09815fc593d975a717ec51b66&
  • a

    addshore

    09/01/2025, 1:53 PM
    also in cmd
  • g

    GitHub

    09/03/2025, 12:28 AM
    message has been deleted
  • m

    MichaelK

    09/03/2025, 2:07 PM
    Were there any attempts to use FireBase Realtime Database in TOIT applications? For example, to save data?
  • f

    floitsch

    09/03/2025, 2:08 PM
    Not really. We have played with Supabase, though.
  • m

    MichaelK

    09/03/2025, 2:19 PM
    FireBase Realtime Database allows you to save arbitrary sets of json objects to the cloud. In theory, they are added via a regular POST and it works fine in dart for instance. But in TOIT, problems arise.
  • f

    floitsch

    09/03/2025, 2:20 PM
    If it's a normal 'POST', then that should work the same in Toit.
  • m

    MichaelK

    09/03/2025, 2:33 PM
    There is a rather strange situation there. The URL contains the address of the table to which data needs to be added. And for some reason, when adding, an exception occurs "DNS lookup for 'https://weather-84204-default-rtdb.firebaseio.com/temperature.json' exception Server responded: NO_SUCH_DOMAIN".
  • f

    floitsch

    09/03/2025, 3:13 PM
    That looks to me like you used "https://weather-84204-default..." as domain, instead of as URI.
  • f

    floitsch

    09/03/2025, 3:15 PM
    client.post-json --uri="https://weather-84204-default..."
    should work, but if you do
    client.post-json --host="https://weather..."
    then that won't work. The host is just
    weather-84204-...
    and not something that includes the
    https://
    . You would use
    --use-tls
    when you do a
    client.post-json
    with a
    --host
    argument.
  • f

    floitsch

    09/03/2025, 3:17 PM
    So
    client.post-json --uri="https://weather-84204-default-rtdb.firebaseio.com/temperature.json" my-json-object
    should work, or
    client.post-json --host="'weather-84204-default-rtdb.firebaseio.com" --path="/temperature.json" --use-tls my-json-object
    should also work.
  • m

    MichaelK

    09/04/2025, 5:53 AM
    It was my error. Need to use --uri= instead of --host= . Here is a sample that working fine:
    Copy code
    import certificate-roots
    import http
    import net
    import encoding.json
    
    // Firebase Realtime Database URL
    URI := "https://weather-84204-default-rtdb.firebaseio.com/temperature.json"
    OK  := 200
    
    main:
    
      certificate-roots.install-common-trusted-roots
    
      // Establish network connection
      network := net.open
      client := http.Client network
    
      meteo_data := {
        "Location": "Boston",
        "Temperature": "33"
      }
    
      // Encode data to JSON
      json_object := json.encode meteo_data
    
      try:
    
        e := catch --trace=false :
        // Send POST request
          response := client.post --uri=URI json_object
          data := json.decode-stream response.body
    
        // Check response
          if response.status_code == OK :
            print "Record successfully created: $data"
          else:
            print "Error: $(response.status_code) - $data"
    
        if e :
          print "Exception->$e.stringify"
    
      finally:
        client.close
        network.close
    Thanks for your help.