[{"element_type":"text","content":"\n        \u003cp\u003emore of a personal note to remember some commands that were useful. I figure this is more likely to survive or be found compared to a gist/repo/onenote/whatever.\u003c/p\u003e\n\u003cp\u003eCurrently contains powershell to set environment variables properly, list content of partition table on any device from the esp32 families, and an oEmbed test of a \u003ca href=\"https://www.lottiefiles.com\" target=\"_blank\"\u003eLottieFiles\u003c/a\u003e animation (success). See TOC!\u003c/p\u003e\n\u003ch3\u003e\u003cstrong\u003eGitHub Expand All Diffs\u003c/strong\u003e\u003c/h3\u003e\n\u003cp\u003e\u003ccode\u003ejavascript:(function(){document.querySelectorAll('button').forEach(function(button){if(button.textContent.includes('Load Diff')){button.click(); button.click();}});})();\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003ch3\u003e\n\u003cstrong\u003ePicture in Picture \u003c/strong\u003e\u003cstrong\u003efor all videos currently on page, removing the disabled attribute if present:\u003c/strong\u003e\n\u003c/h3\u003e\n\u003cp\u003e\u003cem\u003e(Add this as a bookmark then save with a name like 'pip - picture in picture' so it comes up easily in the URL bar)\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003ejavascript:document.querySelectorAll(\"video\").forEach(x=\u0026gt;{if(x.networkState!=2)return;x.attributes.getNamedItem(\"disablepictureinpicture\")\u0026amp;\u0026amp;x.attributes.removeNamedItem(\"disablepictureinpicture\");x.focus();x.requestPictureInPicture();})\u003c/code\u003e\u003c/p\u003e\n      ","metadata":{}},{"element_type":"alert","content":"\u003cp\u003eView this page with Embeds (so you can see the Lottie file animation:\u003c/p\u003e\n\n\u003cp\u003e\u003ca href=\"https://adafruit-playground.com/u/tyeth/pages/commands-for-the-future?embeds=allow\"\u003ehttps://adafruit-playground.com/u/tyeth/pages/commands-for-the-future?embeds=allow\u003c/a\u003e\u003c/p\u003e","metadata":{"markdown":"View this page with Embeds (so you can see the Lottie file animation:\n\n[https://adafruit-playground.com/u/tyeth/pages/commands-for-the-future?embeds=allow](https://adafruit-playground.com/u/tyeth/pages/commands-for-the-future?embeds=allow)","alert_type":"primary","icon":null}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003e\n\u003ca href=\"https://www.lottiefiles.com\" target=\"_blank\"\u003eLottie\u003c/a\u003e Element oEmbed test of open window animation:\u003c/h3\u003e\n      \n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://lottie.host/embed/c23058d9-f1f0-43cb-8cda-f58d335c9fd1/mIihrlmsJD.json"},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003chr\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003ePowershell to add an environment variable permanently(?) at the user/whatever level:\u003c/h3\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"[System.Environment]::SetEnvironmentVariable(\"DOTNET_ASPIRE_CONTAINER_RUNTIME\", \"podman\", \"User\")","metadata":{"language":"auto","linenums":false,"filename":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003chr\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003ePowershell\u0026nbsp;for getting the\u0026nbsp;partition table\u0026nbsp;from any esp32/etc based device\u003c/h3\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch4\u003e\n\u003cspan style=\"text-decoration: underline;\"\u003e\u003cstrong\u003ePowershell\u003c/strong\u003e\u003c/span\u003e for getting the \u003cstrong\u003epartition table\u003c/strong\u003e from any esp32/etc based device\u003c/h4\u003e\n\u003cp\u003e*assuming the partition table is at 0x8000, but it can also be at 0x9000 on newer boards.\u003c/p\u003e\n\u003cp\u003eif you get an error and a board is in bootloader mode attached then change offset to 0x9000 and repeat. You need to have already run .\\export from the esp-idf folder (for IDF_PATH).\u003c/p\u003e\n\u003cp\u003eShould only read 0xc00 bytes instead of 0x1000 but wanted to be sure and read two full blocks, doesn't hurt. Change 0x1000 to 0xc00 if you have sense / or want to google what the frick this does\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"$offset=\"0x8000\"; rm .\\esp32c3_$($offset)_0xc00.bin ; python \"$($env:IDF_PATH)/components/esptool_py/esptool/esptool.py\" read_flash $offset 0x1000 esp32c3_$($offset)_0xc00.bin ; python \"$($env:IDF_PATH)/components/partition_table/gen_esp32part.py\" .\\esp32c3_$($offset)_0xc00.bin","metadata":{"language":"auto","linenums":false,"filename":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eNote to self:\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eI\u003c/span\u003e\u003cspan\u003e've created a modified version of ESPTOOL for the web \u003c/span\u003e\u003cspan\u003e(forked from esptool\u003c/span\u003e\u003cspan\u003e-js\u003c/span\u003e\u003cspan\u003e)\u003c/span\u003e\u003cspan\u003e, which allows reading and displaying the partition table of a device\u003c/span\u003e\u003cspan\u003e, along with downloading any of the partitions \u003c/span\u003e\u003cspan\u003e(with sensible filenames\u003c/span\u003e\u003cspan\u003e!\u003c/span\u003e\u003cspan\u003e) Available to use here\u003c/span\u003e\u003cspan\u003e: \u003c/span\u003e\u003ca class=\"anchor_af404b anchorUnderlineOnHover_af404b\" title=\"https://tyeth.github.io/read-partitions-esptool-js/\" href=\"https://tyeth.github.io/read-partitions-esptool-js/\" target=\"_blank\"\u003e\u003cspan\u003ehttps://tyeth.github.io/read-partitions-esptool-js/\u003c/span\u003e\u003c/a\u003e\u003cspan\u003e The ported version of gen\u003c/span\u003e\u003cspan\u003e_esp32part\u003c/span\u003e\u003cspan\u003e.py is here\u003c/span\u003e\u003cspan\u003e: \u003c/span\u003e\u003ca class=\"anchor_af404b anchorUnderlineOnHover_af404b\" title=\"https://github.com/tyeth/read-partitions-esptool-js/tree/readCurrentPartitions/src\" href=\"https://github.com/tyeth/read-partitions-esptool-js/tree/readCurrentPartitions/src\" target=\"_blank\"\u003e\u003cspan\u003ehttps://github.com/tyeth/read-partitions-esptool-js/tree/readCurrentPartitions/src\u003c/span\u003e\u003c/a\u003e \u003cspan class=\"timestamp_f9f2ca\"\u003e\u003cspan class=\"edited_f9f2ca\"\u003e(edited)\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/392/original/image_%289%29.png?1731545977","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n        \u003ch2\u003elibtools, LD PATHs, LD_LIBRARY_PATH, LIBDIR, locally installed usbip\u003c/h2\u003e\n\u003cp\u003eLibraries have been installed in:\u003cbr\u003e\u0026nbsp; \u0026nbsp;/usr/local/lib\u003c/p\u003e\n\u003cp\u003eIf you ever happen to want to link against installed libraries\u003cbr\u003ein a given directory, LIBDIR, you must either use libtool, and\u003cbr\u003especify the full pathname of the library, or use the '-LLIBDIR'\u003cbr\u003eflag during linking and do at least one of the following:\u003cbr\u003e\u0026nbsp; \u0026nbsp;- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable\u003cbr\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp;during execution\u003cbr\u003e\u0026nbsp; \u0026nbsp;- add LIBDIR to the 'LD_RUN_PATH' environment variable\u003cbr\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp;during linking\u003cbr\u003e\u0026nbsp; \u0026nbsp;- use the '-Wl,-rpath -Wl,LIBDIR' linker flag\u003cbr\u003e\u0026nbsp; \u0026nbsp;- have your system administrator add LIBDIR to '/etc/ld.so.conf'\u003c/p\u003e\n\u003cp\u003eSee any operating system documentation about shared libraries for\u003cbr\u003emore information, such as the ld(1) and ld.so(8) manual pages.\u003c/p\u003e\n\u003ch3\u003eRef - WSL2 installing usbip from source for remote ssh usb devices linked in to WSL2 ubuntu, original issue:\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/microsoft/WSL/issues/40259#issuecomment-4324133143\" target=\"_blank\"\u003ehttps://github.com/microsoft/WSL/issues/40259#issuecomment-4324133143\u003c/a\u003e\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eHi\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003ca class=\"user-mention notranslate\" href=\"https://github.com/tyeth\"\u003e@tyeth\u003c/a\u003e, the wsl ubuntu distro does not ship a linux-tools package. You may resolve this by building and installing usbip from source. You may follow these steps:\u003c/p\u003e\n\u003cpre class=\"notranslate\"\u003e\u003ccode class=\"notranslate\"\u003esudo apt install build-essential libudev-dev autoconf automake libtool pkg-config\ngit clone https://github.com/microsoft/WSL2-Linux-Kernel.git\ncd WSL2-Linux-Kernel/tools/usb/usbip\n./autogen.sh\n./configure\nmake\nsudo make install\nsudo ldconfig\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThen you should be able to use\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003ccode class=\"notranslate\"\u003e/usr/local/sbin/usbip\u003c/code\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eto setup the usb device.\u003c/p\u003e\n\u003c/blockquote\u003e\n      \n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n        \u003cp\u003eusbip auto-bind all devices, related commands / debugging etc\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/echoes341/66c61923660b590f82f663f49a88a76e\" target=\"_blank\"\u003ehttps://gist.github.com/echoes341/66c61923660b590f82f663f49a88a76e\u003c/a\u003e\u003c/p\u003e\n      \n","metadata":{}}]