Tej
11/18/2024, 3:35 PM2.0.0-alpha.164?
I am consistently getting an error:
[jaguar] INFO: program 2ac875c7-df00-7451-802b-18ee470e6a99 started
INFO: scanning for wifi access points
******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.164>
******************************************************************************
ASSERTION_FAILED error.
0: NetworkServiceClient <sdk>/system/api/network.toit:116:5
1: WifiServiceClient <sdk>/system/api/wifi.toit:33:5
2: service_ <sdk>/net/wifi.toit:33:34
3: run-global-initializer__.<block> <sdk>/core/objects.toit:291:28
4: run-global-initializer__ <sdk>/core/objects.toit:257:1
5: scan <sdk>/net/wifi.toit:136:14
6: run src/setup.toit:71:20
7: main.<block> src/setup.toit:61:53
8: catch.<block> <sdk>/core/exceptions.toit:124:10
9: catch <sdk>/core/exceptions.toit:122:1
10: catch <sdk>/core/exceptions.toit:85:10
11: main src/setup.toit:61:3
******************************************************************************
[jaguar] ERROR: program 2ac875c7-df00-7451-802b-18ee470e6a99 stopped - exit code 1
This minimal example is also enough to trigger the error:
toit
// wifi_scan.toit
import log
import net.wifi
main:
log.info "scanning for wifi access points"
channels := ByteArray 12: it + 1
print "channels: $(channels)"
// next line triggers assertion_failed error
access_points := wifi.scan channels
print access_points
Test:
bash
jag flash
jag run wifi_scan.toitfloitsch
11/18/2024, 3:37 PM-O2Tej
11/18/2024, 3:44 PMjag interfering with the application.
jag run -D jag.disabled wifi_ap.toit does not cause the assertion_failed error but the scan fails in any case. The issue with setup.toit appears to be related but different - I will dig further.floitsch
11/18/2024, 3:45 PMTej
11/18/2024, 3:53 PMgit clone https://github.com/kasperl/toit-zygote.git
cd toit-zygote
jag pkg install
jag flash
jag container install setup src/setup.toit -D jag.disabled -D jag.timeout=2m
jag container install app src/main.toit
jag monitor
results in:
[toit] INFO: starting <v2.0.0-alpha.164>
[toit] DEBUG: clearing RTC memory: invalid checksum
[toit] INFO: running on ESP32 - revision 1.0
[jaguar] INFO: container 'app' started
[jaguar] INFO: container 'setup' started with {jag.disabled: true, jag.timeout: 120}
INFO: scanning for wifi access points
******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.164>
******************************************************************************
ASSERTION_FAILED error.
0: NetworkServiceClient <sdk>/system/api/network.toit:116:5
1: WifiServiceClient <sdk>/system/api/wifi.toit:33:5
2: service_ <sdk>/net/wifi.toit:33:34
3: run-global-initializer__.<block> <sdk>/core/objects.toit:291:28
4: run-global-initializer__ <sdk>/core/objects.toit:257:1
5: scan <sdk>/net/wifi.toit:136:14
6: run src/setup.toit:71:20
7: main.<block> src/setup.toit:61:53
8: catch.<block> <sdk>/core/exceptions.toit:124:10
9: catch <sdk>/core/exceptions.toit:122:1
10: catch <sdk>/core/exceptions.toit:85:10
11: main src/setup.toit:61:3
******************************************************************************
[jaguar] ERROR: container 'setup' stopped - exit code 1
[wifi] DEBUG: connecting
[wifi] DEBUG: connected
...
Not sure why this would cause the assertion if jag.disabled is true.kasperl
11/18/2024, 3:54 PMfloitsch
11/18/2024, 3:55 PMkasperl
11/18/2024, 4:03 PMkasperl
11/18/2024, 4:04 PMTej
11/18/2024, 4:08 PM-O2 worked:
jag container install setup src/setup.toit -D jag.disabled -D jag.timeout=2m -O2
jag container install app src/main.toit -O2Tej
11/18/2024, 4:11 PMv2.0.0-alpha.164/firmware-esp32.envelope - is this commit merged into this?kasperl
11/18/2024, 4:13 PMkasperl
11/18/2024, 4:15 PMkasperl
11/18/2024, 4:16 PM2a13c0d606e894bf97d1717fc9b7df906db21212) is on master, but not on the release branch.kasperl
11/18/2024, 4:16 PMkasperl
11/18/2024, 4:20 PMkasperl
11/18/2024, 4:21 PMTej
11/18/2024, 4:58 PMkasperl
11/19/2024, 7:26 AMkasperl
11/19/2024, 7:26 AMkasperl
11/19/2024, 9:46 AMTej
11/19/2024, 9:53 AM