text:
Feature branch to enable secure-boot

I created a feature branch to enable secure boot optionally, as i think it is recommended to have it enabled if you plan to use the device in production.
Maybe you want to integrate it (currently only developed and tested for ttgo):
https://github.com/1-21gigasats/jade-diy/tree/feature/secure-boot

@1-21gigasats thanks for working on this. I'll review your changes and get back to you.

Thanks. Some ideas for futher improvements.
The user dialog promting for secure-boot / upgrade could be a little bit confusing. If you select Upgrade on a secure-boot disabled device things will probably go wrong and even maybe brick the device (did not try):
echo "  y - Yes (enable Secure Boot)"
echo "  n - No (do not enable Secure Boot or upgrade Secure Boot disabled device)"
echo "  u - Upgrade (upgrade existing Secure Boot enabled device)"

Maybe it would be better to have 2 choices:

secure boot: yes or no
ota upgrade: yes or no

Also the user experience would probaby better if this questions are asked at the beginning, not in the middle of the flashing process

There are downsides to adding a secure boot feature. I agree that it's a more secure way to go, but it's not very noob friendly.

Like you mentioned, there's a risk that some bug in the code could brick people's hardware.

Another risk is that if a noob enables secure boot then loses his key, that firmware becomes permanent and won't receive any future security updates. So ironically secure boot could lead to a less secure device.

So far I haven't found a clean way to incorporate it in a way that benefits noobs.
Plus, the benefits of Secure Boot may be overrated. An attacker could more easily swap a user's DIY Jade with a new decoy device, rather than plugging the user's Jade into a computer and re-flashing.
Telling users to secure access in a safe seems to be a better solution for noobs.

That being said, I like the idea of adding it as an optional feature during the installation process.
We just need to find a clean UX.

I agree with the UX and the physical attack part.
But one thing i find problematically is that the device could be reflashed with a malicious firmware just by plugging into a computer (remote attack). This would make the device somehow useless, because its not protecting for what it was build for (using a wallet on a compromised computer securely).
So i think the are more benefits from enabling it than keep it disabled

By remote attack, do you mean the risk for users who connect via USB to their computer for during use? Such as using the Green desktop application.
I agree secure boot would benefit them to prevent a malicious flash.

In flash_your_device, after they select the device, we could add a step asking if they'd like to enable secure boot. Would that be the best place to put it?
Or should we keep it out of the main scripts UI and instead require that advanced users run the script with --secureboot?
Is there a way we can automatically detect if the device plugged in has already set up secure boot?

By remote attack, do you mean the risk for users who connect via USB to their computer for during use? Such as using the Green desktop application.
I agree secure boot would benefit them to prevent a malicious flash.

Yes exactly. Or if used with the sparrow wallet or any other wired connection.
If only used with bluetooth or even airgapped with the optional camera, secure boot isnt really that much needed, i agree

In flash_your_device, after they select the device, we could add a step asking if they'd like to enable secure boot. Would that be the best place to put it?
Or should we keep it out of the main scripts UI and instead require that advanced users run the script with --secureboot?

I can offer to improve the UX dialog in the ttgo script as far i can get it. This will be the version i will use soon in workshops to keep it simple. If everything works, maybe you can port it to the other versions, too.

Is there a way we can automatically detect if the device plugged in has already set up secure boot?

As far as i can tell the device will completely lock down after enabling secure boot. You cannot get into monitor mode, if you try to flash it again with the normal idf flash command it will timeout, so you have to go over the ota update script.
Maybe there is a way to detect it within the ota script, as there must be some communication happening. relying just on the timeout to detect the secure boot state seems a little bit unreliable. I will try to find it out

So i found one way of detecting secure boot state with the included python JadeAPI. This could be embedded within the flash scripts. We can also get other nice information.
#!/usr/bin/env python

import sys
from jadepy import JadeAPI

create_jade_fn = JadeAPI.create_serial
kwargs = {'device': None, 'timeout': 10}

with create_jade_fn(**kwargs) as jade:
    verinfo = jade.get_version_info()

if 'SB' in verinfo['JADE_FEATURES']:
    print('Secure-boot is enabled')
    sys.exit(0)
else:
    print('Secure-boot is disabled')
    sys.exit(1)

Other information provided:
{'BATTERY_STATUS': 0,
 'BOARD_TYPE': 'TTGO_TDISPLAY',
 'CHIP_FEATURES': '32000000',
 'EFUSEMAC': '...',
 'IDF_VERSION': 'v5.1.2',
 'JADE_CONFIG': 'BLE',
 'JADE_FEATURES': 'SB',
 'JADE_HAS_PIN': False,
 'JADE_NETWORKS': 'ALL',
 'JADE_OTA_MAX_CHUNK': 4096,
 'JADE_STATE': 'UNINIT',
 'JADE_VERSION': '1.0.29'}

Here is a flow chart draft how a new UX could look like:

I like the flow chart. Been busy but should be able to test your solution in the next 2 weeks
How did the workshop go?
What percentage of users do you think would use Jade via USB rather than Bluetooth? If it's less than 5%, should it be an optional argument like -s/--secure-boot instead of always on by default?

This could be embedded within the flash scripts.

Wow, I had no idea about JadeAPI. Looks useful.
We could add a checkjade.py that runs this and prints the output to a temp file then exit 0 back into the flash script.

What percentage of users do you think would use Jade via USB rather than Bluetooth? If it's less than 5%, should it be an optional argument like -s/--secure-boot instead of always on by default?

I think it depends on the knowledge of the people. With more experience it is more likely that they want to have it enabled for maximum security and will use a desktop wallet like sparrow. But i will ask them in the workshop

repo: epiccurious/jade-diy


text:
Create republish script for easier republishing

also includes resummarising script
resubmitting results to dataverse
 Rscript R/run-republish.R -w -i "united-kingdom/*, united-kingdom-deaths/*, united-kingdom-admissions/*"
recalculating summary results
 Rscript R/run-resummarise.R -w -i "united-kingdom/*, united-kingdom-deaths/*, united-kingdom-admissions/*"
optional -p flag calls publishing after running.
running either with -h shows help.

ready to merge?

source: gharchive/pull-request

authors: joeHickson seabbs

repo: epiforecasts/covid-rt-estimates

license: MIT

license_type: permissive

license_source: github-api


text:
UBI goes distrib

This what I understand about distributed Solr.

UBIComponentDistrQueriesTest fails with
12544 WARN  (qtp1249319859-57) [n: c: s: r: x: t:] o.e.j.s.HttpChannel /solr/collection1_shard2_replica_n1/select
          => java.lang.AssertionError
	at org.apache.solr.handler.component.RealTimeGetComponent.addDocListToResponse(RealTimeGetComponent.java:1180)
java.lang.AssertionError: null
	at org.apache.solr.handler.component.RealTimeGetComponent.addDocListToResponse(RealTimeGetComponent.java:1180) ~[main/:?]

and it doesn't seem specific to UBI. I'm stuck. Don't know how to get through it.

Would it be useful to add you to the epugh/solr repo?

Would it be useful to add you to the epugh/solr repo?

nope. I can push into https://github.com/apache/solr/pull/2452 as a maintainer.
Just merge this once please, since it's a kind of ground level for distributed UBI.
And then I'll continue in https://github.com/apache/solr/pull/2452 if you don't mind.

Merged!  and please do continue!  this is super great to have a collaborator!

authors: epugh mkhludnev

repo: epugh/solr


text:
feat: :sparkles: add bookmarks to handover

Status
Seems to work as intended. I made a generic hook to make it easy to maintain and implement for all apps.
Works in the CLI, but there is a bug with the bookmarks sidesheet.
Tested by making a useEffect with a setTimeout that sets a bookmark by id after 5seconds
Next steps:
I want to wait for handover to go into production on JC Castberg & FPP before adding to the rest of the applications

deploy test

deploy test

Why is this a Draft? @Gustav-Eikaas

Because it's a WIP

deploy test

deploy test

deploy test

authors: Gustav-Eikaas ken-mellem

repo: equinor/cc-components


text:
🐛: Workspace: Filters dissapears when checking boxes

Description
When changing filters by checking the checkboxes, the filters now closes. (Should stay open)
Also a visual bug with green hover thing:

Reproduce
Open advances filter and turn off one checkbox:

All filters are now closed>

Expected behavior
Filter should stay open

@kjellhaaland Is this related to the bumping of packages? Would you mind taking a look at this 🥇

source: gharchive/issue

authors: Gustav-Eikaas atlewee

repo: equinor/fusion-workspace


text:
[Snyk] Security upgrade django from 1.11 to 2.2.18

Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

requirements.txt

⚠ Warning
django-rq 0.9.1 requires django, which is not installed.

Vulnerabilities that will be fixed
By pinning:

Severity
Priority Score (*)
Issue
Upgrade
Breaking Change
Exploit Maturity

441/1000  Why? Recently disclosed, Has a fix available, CVSS 3.1
Directory Traversal SNYK-PYTHON-DJANGO-1066259
django:  1.11 -> 2.2.18
No
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.
Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the effected dependencies could be upgraded.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Coverage remained the same at 91.688% when pulling 274d5827416e6be17e621ef5ad55f4865aa19c23 on snyk-fix-9626ac109b3b1ae8da9a2094bf562c8e into 3503a1517d86ed272129028223b98cccbbcf1dde on master.

repo: eregs/regulations-parser

license_source: bigquery


text:
🛑 Search is down

In d3a7503, Search (https://search.drgn.xyz) was down:

HTTP code: 523
Response time: 2944 ms

Resolved: Search is back up in d172e29.


text:
Re-throw non-NSUndefinedKeyException exceptions when applying classes

This prevents the incorrect exception from being thrown when setting an Obj-C property of type MTFThemeClass that itself has properties that are unapplied. It fixes this by re-throwing the original exception, rather than always throwing.

Coverage decreased (-0.02%) to 80.54% when pulling 7cf2186c6fef417b70f96af8b7445eaccf1d7f4f on add-exception-for-unapplied-properties into 0109cc25c739f27fae7a4597fa190c6f41ce4c99 on master.

Coverage increased (+0.39%) to 80.95% when pulling 35d31c754badd1d3a5153ce60cd750afd303cd91 on add-exception-for-unapplied-properties into 0109cc25c739f27fae7a4597fa190c6f41ce4c99 on master.

authors: coveralls erichoracek

repo: erichoracek/Motif

license: mit


text:
Testing part 2

In this milestone, my partner and I created tests for;

A function to test editing a task
A function for updating completed tasks
A function to "clear all completed tasks"

Add tests for editing a task description


text:
Speed up invocation by sending body with invoke request

The AWS invoke limits allow up to 128 kB in the body 👍
http://docs.aws.amazon.com/lambda/latest/dg/limits.html
this would potentially prevent the additional S3 transaction for some workloads

Is there a reason you can't use the RequestReponse invocation instead of Event invocation? That increases your payload size to 6MB.

It does, and they handle retries for you. It's great. The downside is to get to this scale, I'd have to keep a lot (1000+) TCP connections open and waiting on the user side, which was hard to do without greenlets. I'm going to investigate it in the future.

authors: JMBattista ericmjonas

repo: ericmjonas/pywren


text:
ImagineApi failed with status 400

the code that reproduces this issue or a replay of the bug
import cloud from '@lafjs/cloud'
import { Midjourney, MidjourneyMessage } from 'midjourney'
const SERVER_ID = '1120696579075080342' // Midjourney 服务 ID
const CHANNEL_ID = '1120696579075080345' // Midjourney 频道 ID
const SALAI_TOKEN = process.env.SALAI_TOKEN // Midjourney 服务 Token
const Limit = 100
const MaxWait = 3
const client = new Midjourney({
ServerId: SERVER_ID,
ChannelId: CHANNEL_ID,
SalaiToken: SALAI_TOKEN,
Debug: true,
SessionId: SALAI_TOKEN,
Limit: Limit,
MaxWait: MaxWait
});
export default async function (ctx: FunctionContext) {
const { type, param } = ctx.body
switch (type) {
case 'RetrieveMessages':
return await RetrieveMessages(param)
case 'imagine':
return await imagine(param)
case 'upscale':
return await upscale(param)
case 'variation':
return await variation(param)
}
}
// 查询最近消息
async function RetrieveMessages(param) {
console.log("RetrieveMessages")
const client = new MidjourneyMessage({
ChannelId: CHANNEL_ID,
SalaiToken: SALAI_TOKEN,
});
const msg = await client.RetrieveMessages();
console.log("RetrieveMessages success ", msg)
return msg
}
// 创建生图任务
async function imagine(param) {
console.log("imagine", param)
const { question, msg_Id } = param
const msg = await client.Imagine(
[${msg_Id}] ${question},
(uri: string, progress: string) => {
console.log("loading", uri, "progress", progress);
}
);
console.log("imagine success ", msg)
return true
}
// upscale 放大图片
async function upscale(param) {
console.log("upscale", param)
const { question, index, id, url } = param
const hash = url.split("_").pop()?.split(".")[0] ?? ""
console.log(hash)
const msg = await client.Upscale(
question,
index,
id,
hash,
(uri: string, progress: string) => {
console.log("loading", uri, "progress", progress);
}
);
console.log("upscale success ", msg)
return msg
}
// variation 变换图片
async function variation(param) {
console.log("variation", param)
const client = new Midjourney({
ServerId: SERVER_ID,
ChannelId: CHANNEL_ID,
SalaiToken: SALAI_TOKEN,
Debug: true,
SessionId: SALAI_TOKEN,
Limit: Limit,
MaxWait: 100
});
const { question, index, id, url } = param
const hash = url.split("_").pop()?.split(".")[0] ?? ""
const msg = await client.Variation(
question,
index,
id,
hash,
(uri: string, progress: string) => {
console.log("loading", uri, "progress", progress);
}
);
console.log("variation success ", msg)
return msg
}
Describe the bug
Describe the bug
There was no problem when I used it half a month ago. I changed my account and token the day before yesterday, but this error occurred when I called it again, and the code has not been modified
calling location: POST https://ryv2xj.laf.dev/api
arguments:{
"type": "imagine",
"param": {
"question": "beautiful girl",
"msg_id": 1
}
}
Expected behavior
There should be a normal return
Screenshots
If applicable, add screenshots to help explain your problem.
error log
[2023-07-02 10:52:53]
'imagine' { question: 'beautiful girl', msg_id: 1 }
[2023-07-02 10:52:54]
'ImagineApi failed with status 400' 'Error: ImagineApi failed with status 400\n' +
'    at Midjourney.Imagine (/app/node_modules/midjourney/libs/midjourney.js:47:19)\n' +
'    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
'    at async imagine (evalmachine.:46:17)\n' +
'    at async default_1 (evalmachine.:25:20)\n' +
'    at async FunctionEngine.run (/app/dist/support/function-engine/engine.js:34:24)\n' +
'    at async CloudFunction.invoke (/app/dist/support/function-engine/function.js:73:23)\n' +
'    at async handleDebugFunction (/app/dist/handler/debug-func.js:55:24)\n' +
'    at async handleInvokeFunction (/app/dist/handler/invoke-func.js:21:16)'

same issue #22

authors: zcpua zhihuiyin

repo: erictik/midjourney-client


text:
delay at applying css rules on server side rendering

Hi,
On server side rendering, there is a delay on applying some css rules.
It happens in every single page.
before:

after:

This is only in dev server and its only applied to your custom elements for hot reloading, its not a bug its a feature

Great, thanks.

authors: gabriel-miranda moshababo


text:
Radio buttons does not work with numeric values

When I pass numeric values to radio buttons, it does not work as expected. I have to to click two times on button to select it. E.g.:
<Field name="count" component={RadioButtonGroup}>
  <RadioButton value={1} label="one" />
  <RadioButton value={2} label="two" />
  <RadioButton value={3} label="three" />
</Field>

After quick debugging I have found that when I click on the button first time, the type of value is string. After second click on the same radio button is the value numeric and button becomes selected.
However it works just fine with string values.

I'm seeing this too.. thanks for the workaround, using strings works for me 👍

Had this too. I was able to resolve it with
normalize={v => Number(v)} - not sure if this is the most ideal way though.

which MUI version you're using ?

Also, if it is MUI 1.0 and knows the fix would mind sending PR ?

authors: madox2 mihirsoni ptim shubsengupta

repo: erikras/redux-form-material-ui


text:
Videos never load, Vivaldi 1.8

I use Vivaldi 1.8 (Chromium 57) on macOS 10.12.4. Videos doesn't load. I submit screenshot.

Vivaldi 1.11 and latest version of h264ify, problem solved!!! Thanks!!!


text:
Please provide support for 13th Gen Intel(R) Core(TM) i9-13980HX

Please provide support for 13th Gen Intel(R) Core(TM) i9-13980HX if necessary to test.
It seems that the C-cores are capped to 3800 MHZ instead of 5400 MHZ according to lscpu --all --extended and turbostat on my p16 gen 2 (maybe for good reasons I ignore)
cpu family	: 6
stepping	: 1
model		: 183
Thank you

Mine are call capped to 2200MHz in a laptop. :(

authors: evertvorster mgolinelli

repo: erpalma/throttled


text:
ERRAI-1104: Ability to intercept any remote call from the ClientMessageBus

Allows us to do the following as an example:
public class PingMessageInterceptor implements MessageInterceptor {

    private long begin;

    @Override
    public void beforeCall(Message message) {
        begin = new Date().getTime();
    }

    @Override
    public void afterCall(Message message) {
        // check the ping and perform tasks
    }
}

ErraiBus.get().addInterceptor(interceptor);

Now we can make checks on any remote call rather than just specific calls.

Can one of the admins verify this PR? Comment with 'ok to test' to start the build.

ok to test

Merged. Thanks @BenDol.

authors: BenDol kie-ci mbarkley tiagobento

repo: errai/errai


text:
README issues

README at ends, shows this 2 lines:

one referencing a script, but I can't found it in latest images
the other is void

Would be interested provide some methodology to update your image using docker and real data: moodledata, and some installed plugins.
thanks!

Thank you for your work !
I followed #1 link but can't find anything there.
I guess the best way to upgrade will be:

Change docker-compose.yml to fit your desired version (do it one branch a time)
...  don't configure persistence on moodlehtml (comment docker-compose.yml line 56)
Recreate containers and restart
Manually download/copy custom modules when updater or notifications return a warning

Hi @lupa18,
Thanks for your suggestion! Your approach sounds great and aligns with a streamlined update process. Disabling persistence on moodlehtml and linking only the critical files like config.php and minimal required files is a smart way to ensure compatibility while keeping updates clean.
For moodledata, maintaining just the filedir in a persistent volume can be also a great idea since cache and other temporary directories (cache, temp, localcache, etc.) are automatically regenerated. This significantly reduces the storage overhead and avoids carrying over stale data during upgrades.
Additionally, including some logic in the startup scripts to ensure everything is properly updated/regenerated (e.g., clearing caches, running upgrade.php, and validating moodledata structure) would make the process more robust and reduce manual intervention.
This approach could be a solid foundation for a clean and maintainable Moodle Docker setup. Let me know if you’d like to collaborate on refining this further!
Best regards,
Ernesto

Yes, better than do like that, we may delete the volume before the upgrade, so better will be:

Backup your instance
Change image to pull desired version, ie: v4.5.1
Down the containers, and delete moodlehtml volume
Up again, wait for migrations (config file should re create automatically based on env vars)
Take note of missing plugins and install them again

I think this approach is not optimal, since step 5 should be kind of automatized.
About persistence in moodlehtml I think would be better for quickly down/up and only delete it when upgrading
About persistence in moodledata, I tried to do what you said, but when down and up, then a "invalid parameter" appears on front-end and couldn't be fixed, until I put back the original non 'filedir' folders (previous deletion). So I guesss is important to have all moodledata as is.

Thanks for the detailed feedback and suggestions!

moodledata persistence: You're right—maintaining the entire moodledata directory can be necessary in some setups to avoid issues like the “invalid parameter” error you encountered. This behavior is expected since Moodle depends on consistent data across several directories within moodledata. I'm okay with keeping the full moodledata persistence for now, as it ensures a smooth experience during upgrades and container restarts.

moodlehtml persistence: I agree with your point that managing this volume can be complex and error-prone. Instead of maintaining the volume, I think the best approach is not having it. This will make the workflow simpler:

Plugins could be installed using an environment variable, for example, PLUGINS, where you specify plugin names or URLs.
A banner in the admin panel could alert users that any plugins installed via the Moodle admin interface will be lost after a restart. We can recommend managing plugins through the PLUGINS variable instead.

Automatic config.php regeneration: The current logic for regenerating config.php from environment variables works well. During container restarts or upgrades, the container already includes the PHP files, so it will only need to update necessary components and download plugins. This approach is both efficient and maintainable.

By following this workflow, we reduce the risk of errors and simplify the upgrade process. Let me know if you want to help to implement these changes or refining the current setup further!

Thank you !

   * Plugins could be installed using an environment variable, for example, `PLUGINS`, where you specify plugin names or URLs.
   * A banner in the admin panel could alert users that any plugins installed via the Moodle admin interface will be lost after a restart. We can recommend managing plugins through the `PLUGINS` variable instead.

Interesting. So is this already working?
If not, we may add some entrypoint script to parse PLUGINS var (maybe name and version, or URL directly), and test if mod/myplugin not exists then installation tasks begin. But I also remember there are other components, like themes or admin components that must be located in other places than /mod

By following this workflow, we reduce the risk of errors and simplify the upgrade process. Let me know if you want to help to implement these changes or refining the current setup further!

I think changes for now are few, maybe commenting out line 56 and adding to readme why we don't use persistence there and what's the recommended method to upgrade.

repo: erseco/alpine-moodle


text:
feat: 添加 vault

在提出此拉取请求时，我确认了以下几点（请复选框）：

[x] 我已阅读并理解贡献者指南。
[x] 我已检查没有与此请求重复的拉取请求。
[x] 我已经考虑过，并确认这份呈件对其他人很有价值。
[x] 我接受此提交可能不会被使用，并根据维护人员的意愿关闭拉取请求。

修复了

repo: eryajf/awesome-ops


text:
exception": "Infrastructure\Auth\Exceptions\InvalidCredentialsException

Post: /login giving response
{
  "status": "error",
  "code": 0,
  "message": "",
  "exception": "Infrastructure\\Auth\\Exceptions\\InvalidCredentialsException in /mnt/hgfs/app/my-api/infrastructure/Auth/LoginProxy.php:85\nStack trace:\n#0 /mnt/hgfs/app/my-api/infrastructure/Auth/LoginProxy.php(48): Infrastructure\\Auth\\LoginProxy->proxy('password', Array)\n#1 /mnt/hgfs/app/my-api/infrastructure/Auth/Controllers/LoginController.php(24): Infrastructure\\Auth\\LoginProxy->attemptLogin('esben@esben.dk', '1234')\n#2 [internal function]: Infrastructure\\Auth\\Controllers\\LoginController->login(Object(Infrastructure\\Auth\\Requests\\LoginRequest))\n#3 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(55): call_user_func_array(Array, Array)\n#4 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(44): Illuminate\\Routing\\Controller->callAction('login', Array)\n#5 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Infrastructure\\Auth\\Controllers\\LoginController), 'login')\n#6 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Route.php(160): Illuminate\\Routing\\Route->runController()\n#7 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(572): Illuminate\\Routing\\Route->run()\n#8 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#9 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#10 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(574): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))\n#11 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(533): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))\n#12 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(511): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))\n#13 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))\n#14 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))\n#15 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#16 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#17 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#18 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#19 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#20 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#21 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#22 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#23 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#24 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#25 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(148): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#26 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#27 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#28 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))\n#29 /mnt/hgfs/app/my-api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#30 /mnt/hgfs/app/my-api/public/index.php(53): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))\n#31 {main}",
  "line": 85,
  "file": "/mnt/hgfs/app/my-api/infrastructure/Auth/LoginProxy.php"
}

@flik  @Versoo  im having same issue . i am pretty much sure that i sent correct credentials

@Versoo i'm having the same issue on my ubuntu 16.04, locally it works just fine tho  for more info i'm using your fork @Versoo

Same issue on high sierra. Credentials are correct.

Hi guys, maybe it's dumb question but do you have Passport Clients keys in .env and in Database and what do you use to test your api? I'm using Postman and my request looks that: http://prntscr.com/jflktk and headers http://prntscr.com/jfll8z
My test server works on Vagrant with Ubuntu 14.04.5 LTS. I installed many version of this reposiotory and i didn't have problems.

Thank you! In my case not a dumb question. In my .env file i had
PERSONAL_CLIENT_ID=1
PERSONAL_CLIENT_SECRET=secret
PERSONAL_CLIENT_ID=2
PERSONAL_CLIENT_SECRET=secret
I change it to PASSWORD and works fine.

If you rerun the db migrations you also need to generate the passport secrets (artisan passport:install)
Otherwise these wont match and you get the InvalidCredentialsException.
So make sure you see the tokens match in youre env file and in the db table oauth_clients.

Make sure once you have done your migration you install passport and copy the secrets to the .env file. So
1. php artisan migrate
2. php artisan passport:install
3. Copy the secrets from the output into the .env file

See readme for more information

authors: Dokujin Versoo bolivir devRoshan esbenp flik luislora-es

repo: esbenp/larapi


text:
Change all instances of color (singular) to fill

We have some instances of color where it should be fill.
This isn't to be confused with colors, the plural noun, which takes a function that returns a color based on index (maybe we need a better name for that property).

Fixed in v0.3.0


text:
Database ---> Main : Merge database updates (data normalization, switching servers, and testing in docker).

In this pull request we've done 3 tasks:

Data Normalization

Solved the redundancy and dependency problems through data normalization tests (1NF, 2NF, and 3NF)

Switched to PostgreSQL Server for the sake of better performance

Separated the code into database-tables & database-features in PostgreSQL
Updated the Entity Relationship Diagram (ERD) of the database

Tested PostgreSQL in Docker

Created a docker container and setup our database inside it
Accessed the database outside the container in our host machine
Compared the speed between the two environments with Python scripts

Also, we documented the details of all tasks.

Biggest pull request so far, nice job to us ↗👏

Thank you so much for your support !


text:
no-callback-in-promise misses callback passed as argument

Description
The no-callback-in-promise rule only checks for CallExpressions. It does not check if a callback is passed to a third-party like setTimeout(callback). I think any time a callback is passed to another function, the assumption should be that the callback will be called.
Steps to Reproduce
function wait (callback) {
  return Promise.resolve()
    .then(() => {
      setTimeout(() => callback()); // this fails
      setTimeout(callback); // this does not fail
    });
}

Expected behavior: no-callback-in-promise flags error
Actual behavior: no-callback-in-promise rule does not flag error
Versions

Node version: 8
ESLint version: 4.19.1
eslint-plugin-promise version: 4.2.1

Additional Information
Potential implementation: in https://github.com/xjamundx/eslint-plugin-promise/blob/5b935bdd3c3760a2e58eea9b89c86b6d3243e321/rules/lib/is-callback.js, you can potentially check if any of the CallExpressions's arguments is a named callback.

Note that as per #220 the particular examples you cite with setTimeout are actually meant to pass. The plug-in could perhaps solve this by config which prevented even callbacks invoked by setTimeout and the like.

repo: eslint-community/eslint-plugin-promise

license: ISC


text:
fix(no-expression-statements): ignore Promise<void> when ignoreVoid is set

Fix #000
Proposed Changes

#866  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @RebeccaStevens and the rest of your teammates on  Graphite


text:
Chore: switch from Jekyll to Eleventy

refs https://github.com/eslint/website/issues/536
This is a work in progress. I know we haven't officially decided to use Eleventy, but I wanted to give it a shot to see what cutting over would look like. It's not all working yet, but it's looking promising!
There might be a few small things I need to fix still, but this is looking good to me. Would love to see what others thinks.
Note:
Eleventy is pretty flexible and allows you to pick the templating engine you want to use. The default is liquid (which is what Jekyll uses), which made converting fairly straightforward. If we go this route, going forward we'll have more flexibility in terms of templating engines and overall project structure.

Just to make sure that I understand it correctly. The biggest advantage of switching to this is that we don't have go through the pain of installing Jekyll any longer, right? Cause otherwise, it looks pretty much the same.

Yes, biggest benefit is that we'll be using a build tool that we can configure using JS. We'll consequently get rid of our dependency on Ruby. Build times also seem to be improved for me.

I'll also add that this will give us a lot more flexibility in the future. It looks a lot like Jekyll right now for the sake of conversion.

I see. Well getting rid of Jekyll is a very powerful reason, I absolutely hate it:-)

This is mostly working, if anyone else wants to play around with it! Known issues:

[ ] The fixable link at the top of every rule is broken. It's unfortunately generated in ESLint in the site generation script. I'll add a little hack on this end but we should change that if we decide to land this.

I'm not sure why Netlify isn't running...

Ah, looks like it's running now :+1: Should be able to check the deploy preview to test it.

:+1:

Some other notes:

Eleventy doesn’t allow YAML for data by default. There seem to be workarounds, but they involve monkeypatching and I’d like to avoid that.
It might be fixable with some more digging, but I had trouble rendering HTML in liquid loops in Markdown. It would output the the correct markup, but it was HTML encoded and so would render as a string. I ended up rewriting the problematic Markdown files as Liquid files, and I actually think it’s easier to read.

Okay, I think I have everything working, down to syntax highlighting (highlight.js's github theme is pretty much identical to the one we're currently using - I saw almost because some characters aren't bolded, but otherwise it seems to be the same). 🎉
Ready for evaluation from the team! Please let me know if you see anything amiss.
I turned some of the YAML data files into JSON files because Eleventy doesn't support YAML for data out of the box. I would want to make sure I update the data generation script in eslint/eslint (at least until we try moving site generation into this repo.

I haven't the time to review the PR itself, but I looked at the Netlify preview and everything looks nice!
Things I looked at:

Home
Rules list
Rule details
Formatters list/"demos"
Node.js API
Blog lists
Blog post
Espree demo
ESLint demo

Code edits, configuration edits, autofix, URL persistence

Thanks for taking a look! I just noticed some of the related rules links are broken on the rules pages.

Looks like the cause is trailing slash.
/docs/rules/no-labels is redirecting to /docs/rules/no-labels/, so the relative paths in the page point wrong hierarchy. I think that we should do the reverse of the redirecting because /docs/rules/no-labels is not a directory.

You're right - it's caused by the trailing slash that the deploy preview server is adding to the URL. I wonder if this is just a difference between deploy previews and production?

I've confirmed this works fine in our current setup with Jekyll in deploy previews, so it's something we'll need to fix here.

Per their docs, Netlify doesn't allow you to use redirects to remove slashes. However, it looks like we can fix this by generating the named HTML files directly instead of nesting them in a directory, because we're using Netlify's "Pretty URLs" feature.

This has been fixed. The only downside of this is that the default server that's built into Eleventy adds trailing slashes, so dev is broken. I'll add a small Express server we can use in dev and we should be all sorted then.

Dev should be fixed.

I'm having difficulty getting blog post links to work locally, even though they work in the deploy preview environment. Maybe someone else has an idea?
Currently, http://localhost:8080/blog/2019/10/eslint-v6.6.0-released is returning a 404. However, http://localhost:8080/blog/2019/10/eslint-v6.6.0-released.html resolves to the correct file. Any idea why this would be? Both locally and in the deploy preview environment, http://localhost:8080/blog/ always has a trailing slash, so that doesn't seem to be the issue.
The one clue I have is that this only occurs with . characters - so maybe that has something to do with it?

It's definitely the . character in the file name. Changing _posts/2019-10-25-eslint-v6.6.0-released.md to _posts/2019-10-25-eslint-v6-6-0-released.md fixes it.

I worked around the above issue (which seems like an upstream bug in Express) by writing a custom route handler that mimics the behavior of
express.static(path.join(__dirname, "../_site"), { extensions: ["html"] }))

with a TODO to try to figure it out later.
I believe this is finally in a mergeable state and would love feedback.

Adding "do not merge" because, while this should be ready to go, I'll need to update the scripts that generate data to output JSON instead of YAML before this will work.

@kaicataldo Any suggestions on how to review this efficiently? Do we need to look at the full diff, or can we ignore some of the files? Are there any files/diffs that you view as key to this change?

Good question! I think the most important feedback I’m looking for is if others support this change. Feedback around if this is an improved developer experience would also be great, if others have some time to pull down this branch and try out the local dev setup. Beyond that, I would appreciate eyes on any JS I wrote.

I'm also happy to just merge this and own any issues that crop up, if others don't have strong feelings either way. The one external thing that needs to be done before merging this is to update the YAML data files that are generated on release, as this is currently expecting JSON.

It might be easier to create a script that converts YAML data files into JSON before the website is built. That way, we can decouple making this change from changes in the main repo.
At that point, I’d say make sure the instructions to run in dev work correctly and feel free to merge.

Ah, I actually might have been wrong about it not supporting YAML. Had trouble finding info in the docs, but I came across this. Will try it out when I get back!

I guess that's coming in the next release. I've added a script to convert YAML -> JSON in the interim.

I believe this is ready to go! Will deploy sometime in the next few days.

@kaicataldo I pulled down this branch to try running it locally, but I can't seem to be able to either build or start anything. Here's the error below:
Converting YAML files found with glob "'_data/*.yml'" to JSON.
(node:20908) ExperimentalWarning: The fs.promises API is experimental
Trace: No files found for glob '_data/*.yml'.
    at c:\Users\Ilya\Documents\GitHub\eslint.github.io\_tools\yaml-to-json.js:37:17

I checked, _data directory does contain yml files, so I'm not sure why it's complaining.

@ilyavolodin Thanks for checking this out! What Node version are you using?

I'm on 10.14.1 currently. I was able to manually compile everything and run it (bypassing npm scripts, which are still failing). Everything looks fine to me. But just to make sure, I'm currently running the site through crawler, to catch errors.

Hmmm I'm unable to replicate locally on 10.17.0 on macOS. I wonder if it's a cross-compatibility issue in early versions of Node? I'll see if I can replicate on my Windows machine.

Would be good to start running CI in a Windows env in this repo as well.

I was able to replicate this in Windows 10 using Node 12.13.1. Probably some cross-compatibility issue.

Crawler finished testing local site. Everything looks pretty good. A few broken links, but I'm pretty sure those are broken in production as well. Here's the output:
http://localhost:8080/docs/maintainer-guide/governance links to missing page. List of links is ["http://localhost:8080/docs/maintainer-guide/contributing"]
Error 404 for http://localhost:8080/docs/maintainer-guide/contributing
http://localhost:8080/docs/6.0.0/user-guide/configuring links to missing page. List of links is ["http://localhost:8080/docs/6.0.0/rules/"]
Error 404 for http://localhost:8080/docs/6.0.0/rules/
http://localhost:8080/docs/5.0.0/developer-guide/working-with-rules links to missing page. List of links is ["http://localhost:8080/docs/5.0.0/rules/","http://localhost:8080/docs/5.0.0/rules/"]
Error 404 for http://localhost:8080/docs/5.0.0/rules/
http://localhost:8080/docs/5.0.0/user-guide/configuring links to missing page. List of links is ["http://localhost:8080/docs/5.0.0/rules/"]
http://localhost:8080/docs/4.0.0/user-guide/command-line-interface links to missing page. List of links is ["http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/","http://localhost:8080/docs/4.0.0/user-guide/formatters/"]
Error 404 for http://localhost:8080/docs/4.0.0/user-guide/formatters/
http://localhost:8080/blog/2016/02/eslint-v2.0.0-released links to missing page. List of links is ["http://localhost:8080/docs/developer-guide/code-path-analysis.html"]
Error 404 for http://localhost:8080/docs/developer-guide/code-path-analysis.html
http://localhost:8080/docs/2.0.0/developer-guide/working-with-rules links to missing page. List of links is ["http://localhost:8080/docs/2.0.0/developer-guide/code-path-analysis"]
http://localhost:8080/docs/2.0.0/developer-guide/code-path-analysis links to missing page. List of links is ["http://localhost:8080/docs/2.0.0/developer-guide/code-path-analysis/"]
Error 404 for http://localhost:8080/docs/2.0.0/developer-guide/code-path-analysis/
http://localhost:8080/blog/2015/06/eslint-0.24.0-released links to missing page. List of links is ["http://localhost:8080/blog/2015/preparing-for-1.0.0"]
Error 404 for http://localhost:8080/blog/2015/preparing-for-1.0.0
Total pages: 939. Errors found 7

Okay, this is now working for me in Windows 10 on Node 12.13.1. @ilyavolodin Can you check if it all looks good on your end?

npm run build:eleventy now works without errors. However, npm run start and npm run start:eleventy are still erroring out with the same error as before.

Could this be an issue with Node 10? I actually set the engines as >=12.0.0, since that's latest LTS and I figured this is just for local dev. If that doesn't seem like a good idea, I can change engines to >=10.0.0 and see if I can debug this issue (might not be able to use fs.promises).

Everything is working fine for me now. Sorry about the noise, I forgot to run npm install after I pulled latest changes. npm run start now correctly starts local environment. It's still not blazingly fast, but it is much faster then Jekyll (not a huge achievement, turtles are faster then Jekyll:-)

No problem! Appreciate the help :)

Yes, I'd love to make it faster in the future. Note that in Jekyll we were excluding a bunch of files from the build to speed it up, which doesn't seem possible with Eleventy at the moment. Would love to figure that out going forward. I'm also hoping Eleventy will eventually get incremental build support - right now it rebuilds the whole world on every file change.

authors: ilyavolodin kaicataldo mysticatea nzakas platinumazure

repo: eslint/website


text:
Failed to import - @aws-sdk/client-dynamodb

Failing module

GitHub: https://github.com/aws/aws-sdk-js-v3
npm: https://www.npmjs.com/package/@aws-sdk/client-dynamodb

import { DynamoDB } from "https://esm.sh/@aws-sdk/client-dynamodb"

Error message
After running deno bundle file.ts I got this:
[/* your error log here */](error: Node specifiers have not yet been implemented for this subcommand (https://github.com/denoland/deno/issues/15960). Found: node:buffer)

I do not want to switch to esbuild if I can avoid it. deno_emit currently throws exceptions with the package as well, but that is not an issue with esm.sh, but with deno_emit.

import { DynamoDB } from "https://esm.sh/@aws-sdk/client-dynamodb?target=deno" should work

@ije You're correct - this did work!
Thank you.


text:
Auto Theme Not Working in the Map View

System Info
OS: macOS Sequoia & iOS 18.1
Obsidian Version: v1.6.7
Obsidian Theme: AnuPpuccin
Map View Version: 5.0.3
What is the issue?
Changing System wide Dark/Light Mode does not affect the Map View's Color Palette.
How to replicate the issue?
Step 1: Set Settings -> Appearance -> Base Color Scheme -> "Adapt to system"
Step 2: Set View -> Auto
Step 3: Changing System to Dark Mode or Light Mode affects the Obsidian theme but not Map View
What is the expected result?
Changing the System theme should change the Map View's theme

This likely is a duplicate of #136


text:
Error: Stream Destroyed

Command that caused the error
&speed
Image that caused the error
https://media.tenor.co/videos/78b1555a3c3769d21ea7343b494afc72/mp4
To Reproduce

Post the image link above
Enter the command "&speed"

Self-hosted instance?
Did the error occur on a self-hosted instance (e.g. not the main esmBot or esmBot Dev instances)?
No
Error file
Message: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed

Stack Trace: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at new NodeError (node:internal/errors:363:5)
    at _write (node:internal/streams/writable:321:11)
    at Socket.Writable.write (node:internal/streams/writable:334:10)
    at /home/esmBot/esmBot/utils/image.js:155:21
    at new Promise (<anonymous>)
    at /home/esmBot/esmBot/utils/image.js:154:12
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Additional context
Done in a completely empty server with just me and the bot

Duplicate of #70

authors: TheEssem TheMattMoney

repo: esmBot/esmBot


text:
Async SPI

The esp-idf SPI peripheral driver has interrupt transactions which can be used for asynchronous operations and embedded-hal-async exists so esp-idf-hal just needs to fill in the gap.
Only issue is to make sure that the async runtime Waker is interrupt safe, otherwise we'd be forced to use threads or poll, which defeats the point.

I'm going to look into this soon/eventually but in case anybody else gets to it before me they can update this issue.

i think to start with a separate file is always ok, and if it makes sense to stay that way or be integrated is a question that should be answered when the driver is complete

(I'm not going to implement pooling..... I cannot be remotely bothered to do such)
yeah you do the heavy lifting and i implement the pooling :smile_cat:

Folks, how about actually starting in the current spi module? This way it would be easier for all of us to track the "async" "diff" compared to the existing sync one.  Otherwise, there will be a lot of copy paste between the "async" and "sync" driver, and the changes are difficult to spot. I had this issue when reviewing the code of @Vollbrecht for the current driver, and hence why I asked for a merge-back in the spi module.
Further, it might turn out that the "async" stuff is actually not that big. As in - I don't know - 20% to 30% max on top of the current SPI codebase. And even if we decide to split the current spi module, perhaps we would be better i9nformed how to split it once we have the sync and async bits in the same module, part of the same structures.
Related: one of the major decisions we have to take already up-front is if we are going to support "interrupt transaction" (in ESP IDF speak) for non-async code. (As in with callbacks or such.) While this would be symmetric with how a lot of "async" code is currently implemented on top of callback-based "sync" API's, like the timer service, event bus, and mqtt receiver in esp-idf-sys, I fear that here it would significantly complicate the implementation, as "sync" callback-based "interrupt transactions" mean that the SPI driver has to explicitly own the buffers provided by the user throughout the transaction duration. With native Futures (or async methods), this problem is completely offset in that the ownership of the buffer provided by the user is moved into the future itself, which is kinda neat and significantly simplifies the code.
So how about
(a) We try to implement it in the spi module
(b) Initially, we implement the "interrupt transactions" support only as part of a pub async API (i.e. async functions returning futures)?

Hmmm, on the other hand, perhaps supporting ESP IDF SPI "interrupt transactions" with sync callback-based code is maybe not that difficult:

We can introduce a Transaction structure (name not so important), that takes the buffer &'a mut reference and a &'a self reference to the driver
The new "transaction" write method signature might look something like: pub transaction_write<'a, F>(&'a mut self, &'a [u8], complete: F) -> Result<Transaction<'a, F>, EspError> where F: Fn()
It would be then the Transaction object that would call back the "complete" F callback
Transaction might have a pub is_complete(&self) as well

Layering async on top of that signature is quite trivial. What do you think?

I perfectly understand what you're trying to say.
Though, I doubt there's going to be a "diff". It'll pretty much be new lines only. I won't be able to reuse any of the code since it'll be written in a completely different style. i.e. state machines vs imperative code.
I'll merge the files before I make the PR.
I'll address the sync stuff in another comment.

And of course in the above by using the "transaction" word I did not mean e-hal transactions. I meant ESP IDF "tranactions", which are - in our Rust world - ... "operations"?

I won't be able to reuse any of the code since it'll be written in a completely different style. i.e. state machines vs imperative code.

If you go "callback style" there is not much of a state machine code really. Creating a new "Transaction" object (or maybe calling a Transaction::start method on it) fires a new ESP IDF interrupt transaction and possibly saves its ref in the Transaction object itself. But more or less, that's it. What am I missing?

Oh yeah. Shitty splitting. We can't shuffle the whole & [u8] via a single ESP IDF SPI "transaction".

You post too quickly :joy: , should this be a Matrix room instead?

... which is no big deal actually, but yeah, there will be some "state management" in the Transaction object.
Glad to join a Matrix room, but I really need to get some sleep (1:30am here). Perhaps we can sync over the weekend, or early next week.

Sure, get some sleep!  I'll take my time with my response and you can read it tomorrow.

So for the rest of this issue let's use the terms "idf transactions" and "ehal transactions".
I largely don't see a benefit to using idf's interrupt transactions in sync code besides taking advantage of the ability to chain them. i.e. queue multiple idf transactions. I'm happy to be convinced otherwise. (Fire and check later can be achieved with polling).
Assuming I'm not convinced :stuck_out_tongue: and correct, your suggested implementation won't allow for chaining.

The new "transaction" write method signature (method name not so important ATM) might look something like: pub transaction_write<'a, F>(&'a mut self, &'a [u8], complete: F) -> Result<WriteTransaction<'a, F>, EspError> where F: Fn()

This queues up a single write operation and you cannot queue up another one since it takes a &'a mut self reference to the driver. Though this can be remedied with an addition struct.
let trans = device.start_transactions()?; // takes &mut device and creates idf lock.
let write_handle = trans.write(&[....])?;  // takes &trans
let read_handle = trans.read(&mut [....])?; // takes &trans

// do some other work.

write_handle.join()?;

// do some other work.

read_handle.join()?;

drop(trans); // lock released

A super annoying thing about either of these implementations is that it'll require pinning a spi_transaction_t. Whatever struct we return from write or transaction_write is going to need to keep hold of a spi_transaction_t, but the act of returning it, moves it. This forces us to Box or Vec, which I heavily despise.
Fortunately Futures are pinned so at least the final implementation won't strictly need to allocate. Trying to write a reusable layer of code that'll be used by both the async driver and users will lead to sub-optimal code (because boxing) IMHO but I'm happy to be convinced otherwise.
Also, I'm guessing transaction_write is going to return immediately and complete will be called eventually in an interrupt. This complete will have to pinned as well.
Just to be clear, I'm only volunteering to write an implementation that conforms to esp-idf-hal's async SPI traits, since that's a task with a very obvious finish line. Exposing a separate API for idf's interrupt transactions is a non-goal of this issue, however if you have any ideas to solve the pinning issues without unsafe or boxing I'll be happy to implement the async API with it.
So taking this example here.
pub fn read(&mut self, words: &mut [u8]) -> Result<(), EspError> {
    for chunk in words.chunks_mut(self.trans_len) {
        self.polling_transmit(chunk.as_mut_ptr(), ptr::null(), chunk.len(), chunk.len())?;
    }
    Ok(())
}

In async Rust this will be written kinda like so.
pub struct ReadFuture<'w> {
    chunks: ChunksMut<'w, &mut [u8]>,
    waker: Option<&Waker>, // ref or owned. Not sure yet.
}

impl<'w> Future for ReadFuture<'w> {
    type Output = Result<(), EspError>;

    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
        // fire interrupt transaction and return Pending.
    }
}

pub fn read(&mut self, words: &'w mut [u8]) -> ReadFuture<'w> {
    ReadFuture { chunks: words.chunks_mut(self.trans_len), waker: None };
}

Writing code on GitHub and not CLion is stressing me out so I've given up on finishing the async code example above.
I'll just make the PR first then we can discuss. I'm happy to scrap and rewrite the whole thing if better ideas come along.

Just SpiBus for now. https://github.com/esp-rs/esp-idf-hal/pull/173
Feel free to bike shed names.
Yes yes I said I'd do it in the same file but I literally didn't change the original file beside some pub(crate) additions. Let's just get the design bit out of the way first.

So I just realised that the Operation structs could actually be shared between the sync and async code.
It could also be used for the potential sync interrupt API if/when it's hashed out.
It'll make the sync code ever so slightly harder to read but at the great benefit of reuse.
What do you think?

authors: Dominaezzz Vollbrecht ivmarkov

repo: esp-rs/esp-idf-hal


text:
Is there a function similiar to esp_wifi_set_max_tx_power?

I have a similar problem as this one. Does esp-idf-svc have a similar function as esp-wifi's esp_wifi_set_max_tx_power?

@weiying-chen the matrix chat is a better place to ask these questions. You have opened 3 issues (this one, plus #359 + https://github.com/esp-rs/embedded-svc/issues/73 for a single problem that you are having. Which might still be a hardware problem.
With that said, esp_wifi_set_max_tx_power should be available as unsafe function in esp-idf-sys (or esp_idf_svc::sys, which is the same; you should be able to call it on the raw Wifi "handle", i.e. wifi.driver().handle().

@ivmarkov Got it. I'll try the matrix chat next time. Thanks for all the help!

I still strongly suggest to try powering your board with a more powerful supply as a first step.

@ivmarkov Yes, I'll follow your advice. I'll buy a USB hub with its own power supply. Then connect my mini PC and ESP32-C3 to it. Note: I need my mini PC and ESP32-C3 to be connected so I can debug with ESPMonitor.

You can just use a USB power supply from a phone and connect it to the board. You won't get logs this way of course, but you can try pinging the IP of the board from your PC and see if the ping succeeds and stays stable. This way the power supply hypothesis can be confirmed / denied.

@ivmarkov Ah, that's a good idea. But how do I get the IP of the board?

Look at the DHCP leases of your router, in its WEB-UI.

@ivmarkov Okay, I'll try that. Thanks a lot for the help.

authors: ivmarkov weiying-chen

repo: esp-rs/esp-idf-svc


text:
Use PORT env var to customize script/develop port

This allows the port used by script/develop to be customized by setting the PORT env var, e.g:
> PORT=5432 ./script/develop

   ┌────────────────────────────────────────┐
   │                                        │
   │   Serving!                             │
   │                                        │
   │   - Local:    http://localhost:5432    │
   │   - Network:  http://10.0.0.10:5432    │
   │                                        │
   │   Copied local address to clipboard!   │
   │                                        │
   └────────────────────────────────────────┘

Otherwise defaults to the current 5001

Thanks

authors: balloob pzich

repo: esphome/esp-web-tools


text:
I had a communication exception when communicating with SDIO's host and slave (IDFGH-11524)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
5.1.1
Espressif SoC revision.
ESP32-WROOM
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-WROOM
Power Supply used.
USB
What is the expected behavior?
My expected behavior is to use one ESP32 as the host to burn the host code, another esp32 as the slave to burn the slave code, and to communicate between the two masters and slaves
What is the actual behavior?
In fact, the slave can run normally, the host side has an error, and the loop prints the slave initialization failure.
Steps to reproduce.

Increase the 20K pull-up resistance to 3.3V on IO2, 4,12,13,14,15 of the slave
Rewrite slave efuse to 3.3V
Burn the host and slave code
4.USB Power on the host and slave, and view the serial port information

Debug Logs.
SLAVE：

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7084
ho 0 tail 12 room 4
load:0x40078000,len:15584
load:0x40080400,len:4
0x40080400: _init at ??:?

load:0x40080404,len:3876
entry 0x4008064c
I (31) boot: ESP-IDF v5.1.1-dirty 2nd stage bootloader
I (31) boot: compile time Nov 21 2023 14:17:28
I (31) boot: Multicore bootloader
I (36) boot: chip revision: v1.1
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0a398h ( 41880) map
I (120) esp_image: segment 1: paddr=0001a3c0 vaddr=3ffb0000 size=029c4h ( 10692) load
I (124) esp_image: segment 2: paddr=0001cd8c vaddr=40080000 size=0328ch ( 12940) load
I (131) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=18e94h (102036) map
I (171) esp_image: segment 4: paddr=00038ebc vaddr=4008328c size=09028h ( 36904) load
I (193) boot: Loaded app from partition at offset 0x10000
I (193) boot: Disabling RNG early entropy source...
I (204) cpu_start: Multicore app
I (205) cpu_start: Pro cpu up.
I (205) cpu_start: Starting app cpu, entry point is 0x40081110
0x40081110: call_start_cpu1 at E:/esp/esp-idf/components/esp_system/port/cpu_start.c:154

I (0) cpu_start: App cpu up.
I (223) cpu_start: Pro cpu start user code
I (223) cpu_start: cpu freq: 160000000 Hz
I (223) cpu_start: Application information:
I (227) cpu_start: Project name:     sdio_slave
I (233) cpu_start: App version:      1
I (237) cpu_start: Compile time:     Nov 21 2023 14:16:57
I (243) cpu_start: ELF file SHA256:  799e749fe5a333af...
I (249) cpu_start: ESP-IDF:          v5.1.1-dirty
I (254) cpu_start: Min chip rev:     v0.0
I (259) cpu_start: Max chip rev:     v3.99
I (264) cpu_start: Chip rev:         v1.1
I (269) heap_init: Initializing. RAM available for dynamic allocation:
I (276) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (282) heap_init: At 3FFB3238 len 0002CDC8 (179 KiB): DRAM
I (288) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (295) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (301) heap_init: At 4008C2B4 len 00013D4C (79 KiB): IRAM
I (309) spi_flash: detected chip: generic
I (312) spi_flash: flash io: dio
W (316) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (329) app_start: Starting scheduler on CPU0
I (334) app_start: Starting scheduler on CPU1
I (334) main_task: Started on CPU0
I (344) main_task: Calling app_main()
I (344) example_slave: ================ slave ready ================

HOST：
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7084
ho 0 tail 12 room 4
load:0x40078000,len:15584
load:0x40080400,len:4
0x40080400: _init at ??:?

load:0x40080404,len:3876
entry 0x4008064c
I (31) boot: ESP-IDF v5.1.1-dirty 2nd stage bootloader
I (31) boot: compile time Nov 22 2023 14:42:25
I (31) boot: Multicore bootloader
I (36) boot: chip revision: v1.1
I (40) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (85) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0c438h ( 50232) map
I (123) esp_image: segment 1: paddr=0001c460 vaddr=3ffb0000 size=03bb8h ( 15288) load
I (129) esp_image: segment 2: paddr=00020020 vaddr=400d0020 size=1d934h (121140) map
I (173) esp_image: segment 3: paddr=0003d95c vaddr=3ffb3bb8 size=005c0h (  1472) load
I (174) esp_image: segment 4: paddr=0003df24 vaddr=40080000 size=0c264h ( 49764) load
I (206) boot: Loaded app from partition at offset 0x10000
I (206) boot: Disabling RNG early entropy source...
I (218) cpu_start: Multicore app
I (218) cpu_start: Pro cpu up.
I (218) cpu_start: Starting app cpu, entry point is 0x40081104
0x40081104: call_start_cpu1 at E:/esp/esp-idf/components/esp_system/port/cpu_start.c:154

I (0) cpu_start: App cpu up.
I (236) cpu_start: Pro cpu start user code
I (236) cpu_start: cpu freq: 160000000 Hz
I (236) cpu_start: Application information:
I (241) cpu_start: Project name:     sdio_host
I (246) cpu_start: App version:      1
I (251) cpu_start: Compile time:     Nov 22 2023 14:41:53
I (257) cpu_start: ELF file SHA256:  19d3dc9d90f53943...
I (263) cpu_start: ESP-IDF:          v5.1.1-dirty
I (268) cpu_start: Min chip rev:     v0.0
I (273) cpu_start: Max chip rev:     v3.99
I (278) cpu_start: Chip rev:         v1.1
I (282) heap_init: Initializing. RAM available for dynamic allocation:
I (290) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (296) heap_init: At 3FFB4A48 len 0002B5B8 (173 KiB): DRAM
I (302) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (308) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (315) heap_init: At 4008C264 len 00013D9C (79 KiB): IRAM
I (322) spi_flash: detected chip: generic
I (325) spi_flash: flash io: dio
W (329) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (343) app_start: Starting scheduler on CPU0
I (348) app_start: Starting scheduler on CPU1
I (348) main_task: Started on CPU0
I (358) main_task: Calling app_main()
I (358) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (2368) example_host: host ready, start initializing slave...
I (2368) example_host: Probe using SD 4-bit...

I (2368) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
E (3408) sdmmc_periph: disabling clk failed
E (3408) sdmmc_periph: sdmmc_host_set_card_clk: sdmmc_host_clock_update_command returned 0x107
E (3408) sdmmc_common: failed to switch bus frequency (0x107)
W (3418) example_host: slave init failed, retry...
W (6418) example_host: slave init failed, retry...
W (9418) example_host: slave init failed, retry...

More Information.
No response

I met the same problem, sdmmc_periph: disabling clk failed,   anybody can help us?

repo: espressif/esp-idf


text:
ESP-MESH not possible to power down WiFi without reinitializing entire mesh stack (IDFGH-4720)

Is your feature request related to a problem? Please describe.
I am designing a MESH-connected light which is battery powered. To keep power consumption low, MESH is only enabled periodically to synchronize measurements and setup. However, to power down WiFi and successfully reconnect to MESH, it is necessary to initialize MESH nearly from scratch every time, otherwise MESH will be unable to connect. An additional problem arises as esp_mesh_start() seems to duplicate a queue every time it is started, leading to a memory leak. This has been reported as a seperate issue.
Describe the solution you'd like
I feel esp_mesh_stop() and esp_mesh_start() should be more equivalent to esp_wifi_stop() and esp_wifi_start(), i.e. that esp_mesh_start() can be successfully rerun after esp_mesh_stop() is called, and any functions that require reinit of the mesh should happen in esp_mesh_deinit().
Any other solutions that allow WiFi to be powered down intermittently while using MESH would be very helpful.
Ideally I would like to be able to power down WiFi while using mesh in one of the following manners (examples below do not work):
Example 1: (Does not work, as it will not connect to other AP's on enable - I have been unable to figure out why, as it very rarely does successfully connect. My feeling is that this sometimes happens after it has not connected successfully for a minimum of approx. 15 minutes, but I do not have any good data.)
Disable:
esp_mesh_set_self_organized(false, false);
esp_mesh_disconnect();
esp_wifi_stop();

Enable:
esp_wifi_start();
esp_mesh_set_self_organized(true, false);
esp_mesh_connect();

Example 2: (Does not work as esp_mesh_stop() deinits the mesh stack, and requires esp_mesh_init() and full configuration to be run again)
Disable:
esp_mesh_stop();
esp_wifi_stop();

Enable:
esp_wifi_start();
esp_mesh_start();
esp_mesh_set_self_organized(true, false);
esp_mesh_connect();

Describe alternatives you've considered
I have tried hundreds of permutations to get the MESH to reliably restart after it has been disconnected and WiFi powered down, but so far my only working alternative has been to reinit pretty much everything every time I want to set up the MESH again.
These are my current functions that do work, but were very difficult to get working and also suffer from the aforementioned memory leak:
esp_err_t mesh_disable(void) {  // LAST_VERSION
  if (mesh_on) {
    is_mesh_connected = false;
    if (esp_mesh_is_root()) {
      node_status[0].connected = false;
    }
    if (!esp_mesh_is_root()) {
      esp_wifi_scan_stop();
    }
    vTaskDelay(100 / portTICK_PERIOD_MS);
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_flush_scan_result());
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_flush_upstream_packets());
    vTaskDelay(500 / portTICK_PERIOD_MS);
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_stop());
    vTaskDelay(100 / portTICK_PERIOD_MS);
    vTaskSuspend(get_message_handle);
    if (esp_mesh_is_root()) {
      vTaskSuspend(send_ota_to_node_handle);
      vTaskSuspend(send_ota_chunk_handle);
    }
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_deinit());
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_stop());
    mesh_on = false;
  } else {
    ESP_LOGE(MESH_TAG, "Mesh network already disabled!");
  }
  return ESP_OK;
}

esp_err_t mesh_enable(void) {
  esp_err_t err = ESP_OK;
  if (!mesh_on) {
    if (mesh_init_done == false) {
      ESP_LOGW(MESH_TAG, "Initializing mesh network");
    } else {
      ESP_LOGW(MESH_TAG, "Enabling mesh network");
    }
    if (mesh_init_done == false) {
      disableCore0WDT();
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_netif_init());
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_event_loop_create_default());
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_netif_create_default_wifi_mesh_netifs(&netif_sta, NULL));
      wifi_init_config_t config = WIFI_INIT_CONFIG_DEFAULT();
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_init(&config));
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &ip_event_handler, NULL));
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_set_storage(WIFI_STORAGE_RAM));
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_set_mode(WIFI_MODE_APSTA));
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_set_ps(WIFI_PS_NONE));
    }
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_LR));
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_LR));

    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_start());

    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_set_max_tx_power(78));

    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_init());
    ESP_ERROR_CHECK_WITHOUT_ABORT(setup_root());
    if (mesh_init_done == false) {
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_event_handler_register(MESH_EVENT, ESP_EVENT_ANY_ID, &mesh_event_handler, NULL));
    }
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_topology(MESH_TOPO_CHAIN));
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_max_layer(mesh_settings.max_layer));
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_vote_percentage(1));
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_xon_qsize(64));
    if (mesh_settings.pwr_save) {
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_enable_ps());
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_ap_assoc_expire(60));
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_announce_interval(5000, 30000));
    } else {
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_disable_ps());
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_ap_assoc_expire(10));
    }
    mesh_cfg_t cfg = MESH_INIT_CONFIG_DEFAULT();
    memcpy((uint8_t *)&cfg.mesh_id, mesh_settings.id, 6);
    cfg.channel = mesh_settings.channel;
    cfg.allow_channel_switch = true;
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_ap_authmode(mesh_settings.auth_mode));
    esp_mesh_set_ie_crypto_key(mesh_settings.crypt_key, strlen(mesh_settings.crypt_key));
    cfg.mesh_ap.max_connection = mesh_settings.max_conn;
    memcpy((uint8_t *)&cfg.mesh_ap.password, mesh_settings.ap_pass, strlen(mesh_settings.ap_pass));
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_config(&cfg));
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_start());
    mesh_on = true;
    if (mesh_init_done == false) {
      ESP_LOGI(MESH_TAG, "Creating mesh receive task, mesh_init_done now %d", mesh_init_done);
      xTaskCreate(&get_message, "get_message", 9216, NULL, 5, &get_message_handle);
      if (esp_mesh_is_root()) {
        ESP_LOGI(MESH_TAG, "Creating root mesh tasks");
        ota_send_queue = xQueueCreate(10, sizeof(mesh_ota_message_t));
        xTaskCreate(&send_ota_to_node, "send_ota_to_node", 2184, NULL, 5, &send_ota_to_node_handle);
        xTaskCreate(&send_ota_chunk, "send_ota_chunk", 4980, NULL, 5, &send_ota_chunk_handle);
      }
      enableCore0WDT();
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_read_mac(mesh_self_addr.addr, 0));
    } else {
      ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_comm_p2p_start());
    }
    ESP_ERROR_CHECK_WITHOUT_ABORT(esp_mesh_set_self_organized(true, false));
    if (mesh_init_done == false) {
      if (esp_mesh_is_root()) {
        memcpy(&mesh_root_addr, &mesh_self_addr, sizeof(mesh_addr_t));
        memcpy(&node_status[0].address, &mesh_self_addr, sizeof(mesh_addr_t));
        node_status[0].exists = true;
        node_status[0].connected = true;
        node_status[0].current_version = SOFTWARE_VERSION;
        node_status[0].uptime = (uint32_t)(esp_timer_get_time() / 1000000ULL);
        node_status[0].mesh_layer = esp_mesh_get_layer();
      }
      mesh_init_done = true;
      ESP_LOGI(MESH_TAG, "Set mesh_init_done to %d", mesh_init_done);
    }
  } else {
    ESP_LOGW(MESH_TAG, "Mesh network already enabled!");
  }
  return err;
}

Additional context
Add any other context or screenshots about the feature request here.

I've been looking into this some more, and it seems the reason method #1 from above doesn't work is that it leaves to opposing flags in place so the mesh handler believes it is both connected and disconnected, disallowing both, this is with the following code run with a mesh connected:
ESP_ERROR_CHECK(esp_wifi_start());
vTaskDelay(3 * 1000 / portTICK_PERIOD_MS);
ESP_ERROR_CHECK(esp_mesh_set_self_organized(true, true));

Event handler subclause for stop_reconnect:
case MESH_EVENT_STOP_RECONNECTION:
    {
        ESP_LOGI(MESH_TAG, "<MESH_EVENT_STOP_RECONNECTION>");
        ESP_ERROR_CHECK(esp_mesh_disconnect());
        vTaskDelay(1000 / portTICK_PERIOD_MS);
        ESP_ERROR_CHECK(esp_mesh_connect());
    }

Output:
I (62036) wifi:mode : sta (30:c6:f7:2f:e0:fc) + softAP (30:c6:f7:2f:e0:fd)
I (62037) wifi:enable tsf
W (62038) wifi:<MESH AP>adjust channel:1, secondary channel offset:1(40U)
I (62041) wifi:Total power save buffer number: 16
I (65073) mesh: [IO]enable self-organizing, search parent<adaptive>
I (65684) mesh: [SCAN][ch:1]AP:4, other(ID:0, RD:0), MAP:1, idle:0, candidate:1, root:1, topMAP:0[c:2,i:2][00:00:00:00:00:00][FIXED-ROOT]<>
I (65685) mesh: 7369[selection]try rssi_threshold:-78, backoff times:0, max:5<-78,-82,-85>
I (65694) mesh: [DONE]connect to parent:ESPM_715EA0, channel:1, rssi:-42, ac:67:b2:71:5e:a1[layer:1, assoc:0], my_vote_num:0/voter_num:0, rc[00:00:00:00:00:00/-120/2]
I (65735) mesh: <mesh_parent_select_done,1662>parent is set<stop reconnect>g_is_wifi_connecting:1, g_is_wifi_disconnecting:0, g_mesh_stop_reconnection:2
I (00:01:02.323) mesh: <MESH_EVENT_STOP_RECONNECTION>
I (65743) mesh: <MESH_NWK_PARENT_DISCONNECTED>already disconnected, ignore it
I (66743) mesh: <MESH_NWK_PARENT_DISCONNECTED>already reconnecting, ignore it, stop_reconnection:2

I want to know how to switch layer 2 nodes to another root, when the current root is down or disappear.
I tried more method, but it did not work ok.
So I must restart the layer 2 nodes to swtich to another root.
I use esp_mesh_fix_root(true);
In sample mesh, maybe include some root(wifi or ethernet or usb modem), if the current root is down, I want the layer2 can swtich to another automatic.

I want to know how to switch layer 2 nodes to another root, when the current root is down or disappear.
I tried more method, but it did not work ok.
So I must restart the layer 2 nodes to swtich to another root.
I use esp_mesh_fix_root(true);
In sample mesh, maybe include some root(wifi or ethernet or usb modem), if the current root is down, I want the layer2 can swtich to another automatic.

I want to know how to switch layer 2 nodes to another root, when the current root is down or disappear.
I tried more methods, but it did not work ok.
So I must restart the layer 2 nodes to swtich to another root.
I use esp_mesh_fix_root(true);
In sample mesh, maybe include some root(wifi or ethernet or usb modem), if the current root is down, I want the layer2 can swtich to another automatic.

@Leadrive For release v4.4, 8756d9545f2208ce4a56718eceea6f4d91b27502 this MR has fixed the layer2 connect issue when fixed root disappear, please update your branch and have a try.

Hi @Leadrive Plz have a try and feel free to reopen if issue still exist.

Hi, this one did diverge a bit from the original, but the feature request is still valid:)

@MisterScience5 we will consider feature request, but the priority is not high.

authors: Leadrive MaxwellAlan MisterScience5 zhangyanjiaoesp


text:
LEDs are not initialized (EUB-32)

Hello, just notice that the LED of serial TX & RX and JTAG are not initialized,  the led cannot blink normally because it is not initialized.
here is my code for reference
diff --git a/main/jtag.c b/main/jtag.c
index dab5e48..7cbaf13 100644
--- a/main/jtag.c
+++ b/main/jtag.c
@@ -253,6 +253,15 @@ void jtag_task_resume(void)

 void jtag_task(void *pvParameters)
 {
+
+    gpio_config_t io_conf = {
+        .mode = GPIO_MODE_OUTPUT,
+        .pin_bit_mask = (1ULL << LED_JTAG),
+        .pull_down_en = 0,
+        .pull_up_en = 0,
+    };
+    ESP_ERROR_CHECK(gpio_config(&io_conf));
+
     s_task_handle = xTaskGetCurrentTaskHandle();
     init_jtag_gpio();

diff --git a/main/serial.c b/main/serial.c
index 540e032..0dd7bea 100644
--- a/main/serial.c
+++ b/main/serial.c
@@ -294,6 +294,15 @@ void start_serial_task(void *pvParameters)
         .gpio0_trigger_pin = GPIO_BOOT,
     };

+
+    gpio_config_t io_conf = {
+        .mode = GPIO_MODE_OUTPUT,
+        .pin_bit_mask = (1ULL << LED_TX) | (1ULL << LED_RX),
+        .pull_down_en = 0,
+        .pull_up_en = 0,
+    };
+    ESP_ERROR_CHECK(gpio_config(&io_conf));
+
     if (loader_port_esp32_init(&serial_conf) == ESP_LOADER_SUCCESS) {
         ESP_LOGI(TAG, "UART & GPIO have been initialized");

Hi @wuxx The LEDs are initialized in the init_led_gpios() function (https://github.com/espressif/esp-usb-bridge/blob/master/main/main.c#L217) executed immediately in the beginning.
Have you tried to set the appropriate GPIO numbers for LED1, LED2 and LED3 in idf.py menuconfig?

Hi @dobairoland ，yep just see it, but would it be better to modify CONFIG_BRIDGE_GPIO_LED1/CONFIG_BRIDGE_GPIO_LED2/CONFIG_BRIDGE_GPIO_LED3 to LED_TX/LED_RX/LED_JTAG ?
it's my fault that I always hardcode the main/io.h for quick compile ....

Thanks for your feedback but I don't think we will change this right now. There is no official HW for this firmware right now we could follow and one is expected to use it as a template only. Thanks for understanding!

OK, got it.

authors: dobairoland wuxx

repo: espressif/esp-usb-bridge


text:
Nodemcu does not active relay

Dear Colleagues,
I'm facing some issues to get the relay 5v working, i have change from d0 and d1 but it does not work with mine nodemcu v3. Also i change from active low/high and few the same! D1 is not active and d2 is alsmot all active IN of my relay. May you help me to figure out my fault?

Use Active Low Relay Type and Momentary option. It works by me...

repo: esprfid/esp-rfid


text:
gbmusic: setting to disable touch controls (and a small bugfix)

My sleeve touching the screen causing random song skips was bugging me, and I pretty much coded "completely disable touch controls" before realizing these were happening while the screen was off. So now it has three options :-p
Maybe we should just stick with a unconditional isLDCOn check?
But when the weather improves (i.e. no more long sleeves) blindly swiping to the next song might be nice. (At least that's the excuse I tell myself for not throwing away my shiny new code.)
Also a minor bugfix for dynamic colors, to make them actually behave as the comments claim they do.

Great - thanks! Although you're saying you get touch events when the screen is off?
I was pretty sure those should be disabled - but maybe you don't get button presses but you do get swipe/etc?

Both apparently: I just tested it by running:
Bangle.on("touch", side => {console.log('touch:', side, 'LCD:', Bangle.isLCDOn());});
Bangle.on("swipe", dir  => {console.log('swipe:', dir,  'LCD:', Bangle.isLCDOn());});

and got this
>
{"t":"status","bat":85}
>
 ____                 _
|  __|___ ___ ___ _ _|_|___ ___
|  __|_ -| . |  _| | | |   | . |
|____|___|  _|_| |___|_|_|_|___|
         |_| espruino.com
 2v09 (c) 2021 G.Williams
>
swipe: -1 LCD: true
swipe: 1 LCD: true
touch: 2 LCD: true
touch: 2 LCD: true
touch: 1 LCD: true
touch: 2 LCD: true
touch: 2 LCD: true
swipe: -1 LCD: false
swipe: 1 LCD: false
touch: 2 LCD: false
touch: 1 LCD: false
>

Ok, thanks - I've just pushed a change to fix that - but obviously that'll only hit in the 2v10 firmware

Awesome, that was fast :-)

authors: gfwilliams rigrig

repo: espruino/BangleApps


text:
Mount option cleanup

Extend the manifest with mount options for resources and binds. Adjust the proc mount options.
Fixes #101

@alfonsoros88: for some reason GH doesn't allow me to add you as a reviewer. Would be great if you can have a look.

repo: esrlabs/northstar


text:
No space after tag in schedules

closing this one because draft and schedule list items will be changed to look like feed post list item  #92

authors: fildunsky talhasch

repo: esteemapp/esteem-surfer


text:
How do you change the date format?

I might've missed it in the docs somehow, but I can't seem to find how to specify a custom date format instead of the default one.

This should set ya straight:
https://docs.rs/log4rs/1.0.0-alpha-1/log4rs/encode/pattern/index.html#formatters

Thanks, no idea how I missed that.


text:
Another Problem with require.js and ngtable

I am using ngtable with requires.js and got the following error:
TypeError: angular is undefined in line 49, var app = angular.module('ngTable', []);
I have the requirejs configure like this:
require.config({
paths: {
'angular': "../Scripts/angular",
'angular-route': "../Scripts/angular-route",
'ng-table': "../Scripts/ng-table",
...
},
shim: {
'angular': ['jquery'],
'angular-route': ['angular'],
'ng-table': "../Scripts/ng-table",
...
The result htmp page head shows angular.js is before ngTable. Why 'angular' is undefined in ngtable.js?
Thanks,
jwu

I'm hoping you already figured this out. Just in case, the value of the property 'ng-table' in your shim object should be
['angular']

not
"../Scripts/ng-table"

Thus you end up with
require.config({

paths: {
'angular': "../Scripts/angular",
'angular-route': "../Scripts/angular-route",
'ng-table': "../Scripts/ng-table",
...
},
shim: {
'angular': ['jquery'],
'angular-route': ['angular'],
'ng-table': ['angular'],
...

Hope this helps.

don't forget to export angular in shim otherwise u'll get angular' is undefined

repo: esvit/ng-table


text:
Updates cdn links for ngTable css & js

both links are giving a 404 so I searched (and found) working links.  is this correct?

not sure why this is failing... my change was to the overview.html page


text:
[doc] Add modules = nomod to example configuration file

A laptop would generally not have modules, so saying that explicitly
will help highlight to new users that a module setting can be
useful. There is a modules setting below for daint, but at least one
user skimmed over the more complex case.
The line numbers for the literal includes need to be bumped if they
are greater than 15, and a range including 15 is shown, then the
highlighting can need a bump. Note that the latter index within the
range shown, so don't always need a bump.
Fixes #1887

Can I test this patch?

I'd proof-read this if I could. Is the build docs artifact online somewhere, or would have to build it myself?

I am also of the opinion to keep the tutorials as light as possible and this was the initial principle. I would go for a warning issued by nomod whenever a test tries a module operation. I just haven't had the time to open an issue for this. Let's see how this works and if it produces false noise, we might consider updating the documentation as proposed in this PR.

Replaced by #1932

authors: jenkins-cscs mabraham vkarak

repo: eth-cscs/reframe


text:
Rename withdrawal recipient to address

Originally thought this would be clearer than address, but since the CL spec and API does not use recipient it is probably better to conform.
Raised here: https://github.com/ethereum/go-ethereum/issues/26657

✅ BTW this closes https://github.com/ethereum/execution-apis/issues/378

authors: lightclient ryanschneider

repo: ethereum/execution-apis


text:
Move genesis out of Frontier

What was wrong?
Genesis was part of the Frontier fork. This is incorrect especially since other chains can have a genesis block that isn't part of Frontier (e.g. has a base_fee_per_gas).
How was it fixed?
Move genesis logic out of frontier into an independent genesis.py.
Cute Animal Picture

Codecov Report
Base: 72.04% // Head: 72.04% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (d30aceb) compared to base (f60a1b2).
Patch coverage: 81.81% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #701   +/-   ##
=======================================
  Coverage   72.04%   72.04%
=======================================
  Files         531      531
  Lines       29214    29215    +1
=======================================
+ Hits        21046    21048    +2
+ Misses       8168     8167    -1

Flag
Coverage Δ

unittests
72.04% <81.81%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/ethereum/frontier/spec.py
97.31% <ø> (+3.49%)
:arrow_up:

src/ethereum/genesis.py
80.00% <80.00%> (ø)

src/ethereum/utils/hexadecimal.py
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: codecov-commenter petertdavies

repo: ethereum/execution-specs


text:
Cover examples in CI

What was wrong?
Examples often break after CI changes
How can it be fixed?
Run examples in CI and do assertions on the output

This landed

repo: ethereum/lahja


text:
Drop Python 3.5 support

What was wrong?
Issue #
How was it fixed?
Summary of approach.
Cute Animal Picture

Need to add 3.7 too (though not necessarily here)

authors: cburgdorf pipermerriam


text:
Deprecate MergeReadiness

Description

Removes notifications related to The Merge
Removes MergeReadiness checklist page
Moves pertinent information from this page to corresponding places in the existing FAQ and Checklist pages
This includes information related to setting up a JWT and fee recipient
Adds client-diversity notice to Lighthouse page
Updates copy to be correct in a post-merge environment
Updates notes about Shanghai to inform that withdrawal functionality is proposed to be included in this upgrade. Removing stating inclusion as fact until further decisions have been made regarding this upgrade.

Added a few commits to clean up some of the links... original used the name of the document from each client docs page like "Configure Fee Recipient" but this ended up being redundant, and would just add to the number of strings that need to be translated.
I removed these labels, pulled any client specific links into the clientInfo object, and render these links as just pipe-separated inline lists, adding some text in front of each to identify the type of doc.

repo: ethereum/staking-launchpad


text:
Add ms-resolution to log messages

Part of the eth2 interop cleanup.
From @lithp .
More data!
Cute Animal Picture

In particular, this was added to try to debug a race condition where Trinity might have been creating and gossipping a block before lighthouse had noticed that a new slot had started. Because Trinity was only giving us second-resolution logs it was impossible to tell when exactly the block was gossiped, and I think this additional data is generally useful!
I feels weird to approve my own PR though, so roping @carver in :)

going to go ahead and merge this in so we can keep moving on the interop front...
@carver feel free to revisit if you have more input to add here :)

I think my ideal would be something like: show ms in the debug log file, show the truncated %S in the console output. I don't have any advice on implementing that, would just be digging into the logging docs to figure it out.

authors: carver lithp ralexstokes

repo: ethereum/trinity


text:
Unable to Run Basic Example - Shader

Using a fresh copy of the repo the Basic example is unable to be ran.
error: expected global item ('struct', 'const', 'var', 'alias', ';', 'fn') or the end of the file, found 'https'
    ┌─ src/shaders/terrain.wgsl:253:2
    │
253 │  https://github.com/nicopap/bevy_mod_paramap/blob/main/src/parallax_map.wgsl
    │  ^^^^^ expected global item ('struct', 'const', 'var', 'alias', ';', 'fn') or the end of the file
    │
    = expected global item ('struct', 'const', 'var', 'alias', ';', 'fn') or the end of the file, found 'https'

PC Info
2024-04-27T20:50:19.793748Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 39 Fedora Linux", kernel: "6.8.6-200.fc39.x86_64", cpu: "Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz", core_count: "10", memory: "31.3 GiB" }

sorry ! botched a comment.  fixed

Found the problem..
In src/shaders/terrain.wgsl you accidentally forgot to copy out the line with the URL https://github.com/ethereumdegen/bevy_mesh_terrain/blob/0df1cdb27df3790437d7ceabc6007a04360bc7a5/src/shaders/terrain.wgsl#L253

authors: bryvin ethereumdegen


text:
initial accounts balance not respected?

passing an accounts param to the options passed in to testrpc provider does not seem to work
The doc mentions passing a 2d array but looking at the code it actually accept an object {balance:, secretKey:}
Either way the resulting balance is way off  : 1.208925819614629174706176e+24 instead of 100 ether
Any idea?

My mistake, hex vs decimal

repo: ethereumjs/testrpc


text:
Deterministic cargo run --example sputnikvm

While it works, the hash it generates seems to differ each time it runs.

Figured out. This is the intended behaviour. sputnikvm example would generate a new private key each time it runs. That's why the block hashes are different.

repo: ethereumproject/etcommon-rs


text:
Cannot import Utils

I am trying to import Utils so that I can use the hex conversion functions. I get the following error with Node 16:
/Users/attila/Projects/swarm-pubsub/node_modules/ts-node/src/index.ts:293
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/index.ts:6:15 - error TS2305: Module '"../../../../../Users/attila/Projects/swarm-pubsub/node_modules/@ethersphere/bee-js/dist/types"' has no exported member 'Utils'.

6 import { Bee, Utils } from '@ethersphere/bee-js'
                ~~~~~

    at createTSError (/Users/attila/Projects/swarm-pubsub/node_modules/ts-node/src/index.ts:293:12)
    at reportTSError (/Users/attila/Projects/swarm-pubsub/node_modules/ts-node/src/index.ts:297:19)
    at getOutput (/Users/attila/Projects/swarm-pubsub/node_modules/ts-node/src/index.ts:399:34)
    at Object.compile (/Users/attila/Projects/swarm-pubsub/node_modules/ts-node/src/index.ts:457:32)
    at Module.m._compile (/Users/attila/Projects/swarm-pubsub/node_modules/ts-node/src/index.ts:536:43)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/attila/Projects/swarm-pubsub/node_modules/ts-node/src/index.ts:539:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

Please reopen if you run into this again.
I haven't seen this issue for a long time. I have just tested this with node + CJS as well as ts-node + CJS based on your logs and could not reproduce.

repo: ethersphere/bee-js


text:
fix: remove default volume declarations (#1620)

Fix for #1620

This change is

I am closing this as commented in #1620

repo: ethersphere/bee