{"id":20316052,"url":"https://github.com/lupyuen/remote-bl602","last_synced_at":"2025-10-05T21:49:32.158Z","repository":{"id":87767161,"uuid":"448138205","full_name":"lupyuen/remote-bl602","owner":"lupyuen","description":"Flash and test BL602 remotely via a Linux Single-Board Computer","archived":false,"fork":false,"pushed_at":"2024-06-21T01:32:28.000Z","size":90,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T17:50:31.676Z","etag":null,"topics":["bl602","bl604","github-actions","gpio","linux","nuttx","pinecone","riscv32"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lupyuen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["lupyuen"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["paypal.me/lupyuen"]}},"created_at":"2022-01-14T23:49:53.000Z","updated_at":"2024-06-21T01:32:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"e987d39b-4193-4bc9-a801-b0a54a0d797d","html_url":"https://github.com/lupyuen/remote-bl602","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lupyuen/remote-bl602","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupyuen%2Fremote-bl602","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupyuen%2Fremote-bl602/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupyuen%2Fremote-bl602/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupyuen%2Fremote-bl602/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lupyuen","download_url":"https://codeload.github.com/lupyuen/remote-bl602/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupyuen%2Fremote-bl602/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278526244,"owners_count":26001325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bl602","bl604","github-actions","gpio","linux","nuttx","pinecone","riscv32"],"created_at":"2024-11-14T18:24:02.841Z","updated_at":"2025-10-05T21:49:32.115Z","avatar_url":"https://github.com/lupyuen.png","language":"Shell","funding_links":["https://github.com/sponsors/lupyuen","paypal.me/lupyuen"],"categories":[],"sub_categories":[],"readme":"# Flash and Test BL602 Remotely via a Linux Single-Board Computer\n\nRead the articles...\n\n-   [\"Auto Flash and Test NuttX on RISC-V BL602\"](https://lupyuen.github.io/articles/auto)\n\n-   [\"(Mostly) Automated Testing of Apache NuttX RTOS on PineDio Stack BL604 RISC-V Board\"](https://lupyuen.github.io/articles/auto2)\n\nWatch the demos on YouTube...\n\n-   [\"Auto Flash and Test on PineDio Stack BL604\"](https://youtu.be/JX7rWqWTOW4)\n\n-   [\"Auto Flash and Test on PineCone BL602\"](https://youtu.be/JtnOyl5cYjo)\n\nThis script runs on a Linux Single-Board Computer (SBC) to automagically Flash and Test BL602, with the Latest Daily Build of Apache NuttX OS.\n\nThe script sends the \"`lorawan_test`\" command to BL602 after booting, to test the LoRaWAN Stack.\n\nIf BL602 crashes, the script runs a Crash Analysis to show the RISC-V Disassembly of the addresses in the Stack Trace.\n\nThe scripts are here...\n\n-   [scripts/task.sh](scripts/task.sh): Automated Task for BL602 Flash and Test\n\n-   [scripts/ssh.exp](scripts/ssh.exp): Expect Script for SSH to SBC\n\n-   [scripts/test.sh](scripts/test.sh): Auto Flash and Test PineCone BL602 on SBC\n\n-   [scripts/pinedio.sh](scripts/pinedio.sh): Auto Flash and Test PineDio Stack BL604\n\n-   [scripts/pinedio2.sh](scripts/pinedio2.sh): Called by pinedio.sh\n\n-   [scripts/upload.sh](scripts/upload.sh): Upload Test Log to GitHub Release Notes\n\nNuttX Builds are done by GitHub Actions...\n\n-  [Daily Upstream Build](https://github.com/lupyuen/incubator-nuttx/blob/master/.github/workflows/bl602.yml) (Without the LoRaWAN Stack)\n\n-  [Release Build](https://github.com/lupyuen/incubator-nuttx/blob/master/.github/workflows/bl602-commit.yml) (Includes the LoRaWAN Stack)\n\n-  [Downstream Build](https://github.com/lupyuen/incubator-nuttx/blob/master/.github/workflows/bl602-downstream.yml) (Merges the LoRaWAN Stack with upstream updates)\n\n-  [PineDio Stack BL604 Build](https://github.com/lupyuen/incubator-nuttx/blob/pinedio/.github/workflows/pinedio.yml) (Includes the LoRaWAN Stack, ST7789 Display Driver, Touch Panel Driver, LVGL Test App)\n\nWhy are we doing this?\n\n-   Might be useful for __Release Testing__ of NuttX (and other operating systems) on real hardware\n\n-   By auto-testing the __LoRaWAN Stack__ on NuttX, we can be sure that GPIO Input / Output / Interrupts, SPI, ADC, Timers, Message Queues, PThreads, Strong Random Number Generator and Internal Temperature Sensor are all working OK with the latest Daily Build of NuttX\n\n-   I write articles about NuttX OS. I need to pick the __Latest Stable Build__ of NuttX for testing the NuttX code in my articles. [(Like these)](https://lupyuen.github.io/articles/book#nuttx-on-bl602)\n\n# Run The Script\n\nWatch the demo on YouTube...\n\n-   [\"Auto Flash and Test on PineCone BL602\"](https://youtu.be/JtnOyl5cYjo)\n\nConnect SBC to BL602 and SX1262 like so...\n\n| SBC     | BL602    | SX1262 | Function\n| --------|----------|--------|----------\n| GPIO 2  | GPIO 8   |        | Flashing Mode\n| GPIO 3  | RST      | RESET  | Reset\n| GND     | GND      |        | Ground\n| USB     | USB      |        | USB UART\n\nFor auto-testing LoRaWAN, also connect BL602 to SX1262 as described below...\n\n- [\"Connect SX1262\"](https://lupyuen.github.io/articles/spi2#connect-sx1262)\n\nTo run the flash and test script for the __Daily Upstream Build__ (without LoRaWAN)...\n\n```bash\n##  Allow the user to access the GPIO and UART ports\nsudo usermod -a -G gpio    $USER\nsudo usermod -a -G dialout $USER\n\n##  Logout and login to refresh the permissions\nlogout\n\n##  TODO: Install rustup, select default option.\n##  See https://rustup.rs\n\n##  Install blflash for flashing PineDio Stack\n##  https://github.com/spacemeowx2/blflash\ncargo install blflash\n\n##  Download the flash and test script\ngit clone --recursive https://github.com/lupyuen/remote-bl602/\n\n##  Always sync the clock before running the script\nsudo apt install ntpdate\nsudo ntpdate -u time.nist.gov\ndate\n\n##  Run the script for Auto Flash and Test.\n##  Capture the Test Log in /tmp/release.log\nscript -c remote-bl602/scripts/test.sh /tmp/release.log\n\n##  TODO: Install the GitHub CLI for uploading Release Notes: https://cli.github.com\n##  Log in a GitHub Token that has \"repo\" and \"read:org\" permissions\n\n##  Optional: Upload the Test Log to the GitHub Release Notes\nremote-bl602/scripts/upload.sh\n```\n\n(See the output log below)\n\nTo run the flash and test script for the __Release Build__ (includes LoRaWAN)...\n\n```bash\n##  Tell the script to download the Release Build (instead of the Upstream Build)\nexport BUILD_PREFIX=release\n\n##  Auto flash and test BL602\nremote-bl602/scripts/test.sh\n```\n\n(See the output log below)\n\nTo select the __Downstream Build__ by __Build Date__...\n\n```bash\n##  Tell the script to download the Downstream Build for 2022-05-04\nexport BUILD_PREFIX=downstream\nexport BUILD_DATE=2022-05-04\n\n##  Run the script for Auto Flash and Test.\n##  Capture the Test Log in /tmp/release.log\nscript -c remote-bl602/scripts/test.sh /tmp/release.log\n```\n\nFor __PineDio Stack BL604__...\n\n```bash\n##  Run the script for Auto Flash and Test for PineDio Stack BL604.\n##  Capture the Test Log in /tmp/release.log\nscript -c remote-bl602/scripts/pinedio.sh /tmp/release.log\n```\n\n[(See the Test Log)](https://github.com/lupyuen/incubator-nuttx/releases/tag/pinedio-2022-05-10)\n\nWe may also __flash and test BL602 remotely__ over SSH...\n\n```bash\nssh my-sbc remote-bl602/scripts/test.sh\n```\n\n# PineDio Stack BL604\n\nWatch the demo on YouTube...\n\n-   [\"Auto Flash and Test on PineDio Stack BL604\"](https://youtu.be/JX7rWqWTOW4)\n\nWe connect PineDio Stack BL604 to the SBC for Auto Flash and Test like so...\n\n| SBC     | BL604    | Function\n| --------|----------|----------\n| GPIO 5  | GPIO 8 _(GPIO Port)_  | Flashing Mode\n| GPIO 6  | RST _(JTAG Port)_     | Reset\n| GND     | GND _(JTAG Port)_     | Ground\n| USB     | USB Port              | USB UART\n\n__GPIO 8 Jumper must be set to Low (Non-Flashing Mode)!__\n\n(Or the LoRaWAN Test App will fail because the timers will get triggered too quickly)\n\n# Test PineDio Stack BL604\n\nWe auto flash and test PineDio Stack BL604 in two scripts.\n\nThe first script auto-flashes the PineDio Stack Firmware [(auto-built by GitHub Actions)](https://github.com/lupyuen/incubator-nuttx/blob/pinedio/.github/workflows/pinedio.yml) and runs the [LoRaWAN Test App](https://github.com/lupyuen/lorawan_test)...\n\n-   [scripts/pinedio.sh](scripts/pinedio.sh)\n\nThe [LoRaWAN Test App](https://github.com/lupyuen/lorawan_test) connects to a LoRaWAN Gateway (ChirpStack) and sends a LoRaWAN Data Packet to the Gateway.\n\n(Which means that Timers, SPI, GPIO Input / Ouput / Interrupt are working OK)\n\nThe second script auto-restarts PineDio Stack and runs the [LVGL Test App](https://github.com/lupyuen/lvgltest-nuttx) (to test the touchscreen)...\n\n-   [scripts/pinedio2.sh](scripts/pinedio2.sh)\n\nThe [LVGL Test App](https://github.com/lupyuen/lvgltest-nuttx) renders a screen to the ST7789 SPI Display and waits for a Touch Event from the CST816S I2C Touch Panel.\n\nFor the test to succeed, we must tap the screen to generate a Touch Event.\n\n[(Later we might automate this with a \"Robot Finger\")](https://youtu.be/mb3zcacDGPc)\n\n(See the output log below)\n\n# Select USB Device\n\nWhen we connect both PineDio Stack BL604 and PineCone BL602 to the SBC, we'll see two USB Devices: `/dev/ttyUSB0` and `/dev/ttyUSB1`\n\nHow will we know which USB Device is for PineDio Stack and PineCone?\n\n```bash\n## Show /dev/ttyUSB0\nlsusb -v -s 1:3 2\u003e\u00261 | grep bcdDevice | colrm 1 23\n\n## Show /dev/ttyUSB1\nlsusb -v -s 1:4 2\u003e\u00261 | grep bcdDevice | colrm 1 23\n\n## Output for Pinedio Stack BL604:\n## 2.64\n## See https://gist.github.com/lupyuen/dc8c482f2b31b25d329cd93dc44f0044\n\n## Output for PineCone BL602:\n## 2.63\n## See https://gist.github.com/lupyuen/3ba0dc0789fd282bbfcf9dd5c3ff8908\n```\n\nHere's how we override the Default USB Device for PineDio Stack...\n\n```bash\n##  Tell the script to use /dev/ttyUSB1\nexport USB_DEVICE=/dev/ttyUSB1\n\n##  Auto flash and test PineDio Stack BL604\nremote-bl602/scripts/pinedio.sh\n```\n\nTODO: Fix the script to use the correct USB Device\n\n# Upload Test Log\n\nTo __upload the Test Log__ to GitHub Release Notes...\n\n```bash\n##  Run the script for Auto Flash and Test, capture the Test Log\nscript -c remote-bl602/scripts/test.sh /tmp/release.log\n\n##  TODO: Install the GitHub CLI for uploading Release Notes: https://cli.github.com\n##  Log in a GitHub Token that has \"repo\" and \"read:org\" permissions\n\n##  Upload the Test Log to the GitHub Release Notes\nremote-bl602/scripts/upload.sh\n```\n\n[(See the Test Log)](https://github.com/lupyuen/incubator-nuttx/releases/tag/pinedio-2022-05-10)\n\nThe `script` command runs the Auto Flash and Test Script `test.sh`, and captures the Test Log to `/tmp/release.log`.\n\nThen we run this script to upload the Test Log to GitHub Release Notes...\n\n-   [scripts/upload.sh](scripts/upload.sh)\n\nThe `upload.sh` script begins by calling the GitHub CLI to download the Auto-Generated GitHub Release Notes (populated by the GitHub Actions Build)...\n\n```bash\n##  Assumes the following files are present...\n##  /tmp/release.log: Test Log\n##  /tmp/release.tag: Release Tag (like pinedio-2022-05-10)\n\n##  Preserve the Auto-Generated GitHub Release Notes.\n##  Fetch the current GitHub Release Notes and extract the body text, like:\n##  \"Merge updates from master by @lupyuen in https://github.com/lupyuen/incubator-nuttx/pull/82\"\ngh release view \\\n    `cat /tmp/release.tag` \\\n    --json body \\\n    --jq '.body' \\\n    --repo lupyuen/incubator-nuttx \\\n    \u003e/tmp/release.old\n```\n\nIn case the script is run twice, we search for the Previous Test Log...\n\n```bash\n##  Find the position of the Previous Test Log, starting with \"```\"\ncat /tmp/release.old \\\n    | grep '```' --max-count=1 --byte-offset \\\n    | sed 's/:.*//g' \\\n    \u003e/tmp/previous-log.txt\nprev=`cat /tmp/previous-log.txt`\n```\n\nAnd we remove the Previous Test Log, while preserving the Auto-Generated GitHub Release Notes...\n\n```bash\n##  If Previous Test Log exists, discard it\nif [ \"$prev\" != '' ]; then\n    cat /tmp/release.old \\\n        | head --bytes=$prev \\\n        \u003e\u003e/tmp/release2.log\nelse\n    ##  Else copy the entire Release Notes\n    cat /tmp/release.old \\\n        \u003e\u003e/tmp/release2.log\n    echo \"\" \u003e\u003e/tmp/release2.log\nfi\n```\n\nJust before adding the Test Log, we insert the Test Status...\n\n```bash\n##  Show the Test Status, like \"All OK! BL602 has successfully joined the LoRaWAN Network\"\ngrep \"^===== \" /tmp/release.log \\\n    | colrm 1 6 \\\n    \u003e\u003e/tmp/release2.log\n```\n\nThen we embed the Test Log, taking care of the Special Characters...\n\n```bash\n##  Enquote the Test Log without Carriage Return and Terminal Control Characters\n##  https://stackoverflow.com/questions/17998978/removing-colors-from-output\necho '```text' \u003e\u003e/tmp/release2.log\ncat /tmp/release.log \\\n    | tr -d '\\r' \\\n    | sed 's/\\x1B[@A-Z\\\\\\]^_]\\|\\x1B\\[[0-9:;\u003c=\u003e?]*[-!\"#$%\u0026'\"'\"'()*+,.\\/]*[][\\\\@A-Z^_`a-z{|}~]//g' \\\n    \u003e\u003e/tmp/release2.log\necho '```' \u003e\u003e/tmp/release2.log\n```\n\nFinally we call the GitHub CLI to upload the Auto-Generated GitHub Release Notes appended with the Test Log...\n\n```bash\n##  Upload the Test Log to the GitHub Release Notes\ngh release edit \\\n    `cat /tmp/release.tag` \\\n    --notes-file /tmp/release2.log \\\n    --repo lupyuen/incubator-nuttx\n```\n\n# SPI Test Failure\n\nOur Auto Test Scripts `test.sh` and `pinedio.sh` will check that the SX1262 LoRa Transceiver responds correctly to SPI Commands (like reading registers)...\n\n```text\nnsh\u003e spi_test2\nGet Status: received\n  a2 22 \nSX1262 Status is 2\nRead Register 8: received\n  a2 a2 a2 a2 80 \nSX1262 Register 8 is 0x80\nSX1262 is OK\n```\n\nThis says that SX1262 Register 8 has value `0x80`, which is correct.\n\nIf we see this error on BL602...\n\n```text\nSX1262 Register 8 is 0x00\nError: SX1262 is NOT OK. Check the SPI connection\n```\n\nCheck that the SX1262 Reset Pin is connected properly to the BL602 Reset Pin.\n\n(Which is connected to SBC GPIO 3)\n\n# LoRaWAN Test Failure\n\nTODO\n\n# Output Log for Upstream Build\n\nBelow is the log for the __Daily Upstream Build__ (without the LoRaWAN Stack)...\n\nhttps://github.com/lupyuen/incubator-nuttx/releases/tag/upstream-2022-05-05\n\n```text\npi@raspberrypi:~ $ ./upstream.sh\n+ cd /home/pi/remote-bl602\n+ git pull\nAlready up to date.\n+ /home/pi/remote-bl602/scripts/test.sh\n+ '[' '' == '' ']'\n+ export BUILD_PREFIX=upstream\n+ BUILD_PREFIX=upstream\n+ '[' '' == '' ']'\n++ date +%Y-%m-%d\n+ export BUILD_DATE=2022-05-05\n+ BUILD_DATE=2022-05-05\n+ '[' '' == '' ']'\n+ export USB_DEVICE=/dev/ttyUSB0\n+ USB_DEVICE=/dev/ttyUSB0\n+ source /home/pi/.cargo/env\n++ export PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n++ PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n+ set +x\n----- Download the latest upstream NuttX build for 2022-05-05\n+ wget -q https://github.com/lupyuen/incubator-nuttx/releases/download/upstream-2022-05-05/nuttx.zip -O /tmp/nuttx.zip\n+ pushd /tmp\n/tmp ~/remote-bl602\n+ unzip -o nuttx.zip\nArchive:  nuttx.zip\n  inflating: nuttx\n  inflating: nuttx.S\n  inflating: nuttx.bin\n  inflating: nuttx.config\n  inflating: nuttx.hex\n  inflating: nuttx.manifest\n  inflating: nuttx.map\n+ popd\n~/remote-bl602\n+ set +x\n----- Enable GPIO 2 and 3\n----- Set GPIO 2 and 3 as output\n----- Set GPIO 2 to High (BL602 Flashing Mode)\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- Toggle GPIO 3 High-Low-High (Reset BL602 again)\n----- BL602 is now in Flashing Mode\n----- Flash BL602 over USB UART with blflash\n+ blflash flash /tmp/nuttx.bin --port /dev/ttyUSB0\n[INFO  blflash::flasher] Start connection...\n[TRACE blflash::flasher] 5ms send count 55\n[TRACE blflash::flasher] handshake sent elapsed 394.944µs\n[INFO  blflash::flasher] Connection Succeed\n[INFO  blflash] Bootrom version: 1\n[TRACE blflash] Boot info: BootInfo { len: 14, bootrom_version: 1, otp_info: [0, 0, 0, 0, 3, 0, 0, 0, 61, 9d, c0, 5, b9, 18, 1d, 0] }\n[INFO  blflash::flasher] Sending eflash_loader...\n[INFO  blflash::flasher] Finished 2.553035396s 11.19KiB/s\n[TRACE blflash::flasher] 5ms send count 500\n[TRACE blflash::flasher] handshake sent elapsed 5.208118ms\n[INFO  blflash::flasher] Entered eflash_loader\n[INFO  blflash::flasher] Skip segment addr: 0 size: 47504 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: e000 size: 272 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: f000 size: 272 sha256 matches\n[INFO  blflash::flasher] Erase flash addr: 10000 size: 135824\n[INFO  blflash::flasher] Program flash... 1895df5ad1ea24dcab7c6ba5f86692424ce419d1da4e4c5b7dc06b4324d2cd59\n[INFO  blflash::flasher] Program done 1.614955738s 82.18KiB/s\n[INFO  blflash::flasher] Skip segment addr: 1f8000 size: 5671 sha256 matches\n[INFO  blflash] Success\n+ set +x\n----- Set GPIO 2 to Low (BL602 Normal Mode)\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- BL602 is now in Normal Mode\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- Here is the BL602 Output...\n▒gpio_pin_register: Registering /dev/gpio0\ngpio_pin_register: Registering /dev/gpio1\ngpint_enable: Disable the interrupt\ngpio_pin_register: Registering /dev/gpio2\nbl602_spi_setfrequency: frequency=400000, actual=0\nbl602_spi_setbits: nbits=8\nbl602_spi_setmode: mode=0\n\nNuttShell (NSH) NuttX-10.3.0-RC1\nnsh\u003e uname -a\nNuttX 10.3.0-RC1 fdef3a7b92 May  5 2022 02:23:24 risc-v bl602evb\nnsh\u003e ls /dev\n/dev:\n console\n gpio0\n gpio1\n gpio2\n i2c0\n null\n spi0\n timer0\n zero\nnsh\u003e\n----- Send command to BL602: lorawan_test\nlorawan_test\nnsh: lorawan_test: command not found\nnsh\u003e\n===== Boot OK\n\n+ read -p 'Press Enter to shutdown'\nPress Enter to shutdown\n```\n\n# Output Log for Upstream Build with Crash Analysis\n\nBelow is the log for the __Daily Upstream Build__ with Crash Analysis (without the LoRaWAN Stack)...\n\n```text\npi@raspberrypi:~/remote-bl602 $ sudo ./scripts/test.sh\n+ '[' '' == '' ']'\n+ export BUILD_PREFIX=upstream\n+ BUILD_PREFIX=upstream\n+ '[' '' == '' ']'\n++ date +%Y-%m-%d\n+ export BUILD_DATE=2022-01-16\n+ BUILD_DATE=2022-01-16\n+ source /root/.cargo/env\n++ case \":${PATH}:\" in\n++ export PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n++ PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n+ set +x\n----- Download the latest upstream NuttX build for 2022-01-16\n+ wget -q https://github.com/lupyuen/incubator-nuttx/releases/download/upstream-2022-01-16/nuttx.zip -O /tmp/nuttx.zip\n+ pushd /tmp\n/tmp /home/pi/remote-bl602\n+ unzip -o nuttx.zip\nArchive:  nuttx.zip\n  inflating: nuttx\n  inflating: nuttx.S\n  inflating: nuttx.bin\n  inflating: nuttx.config\n  inflating: nuttx.hex\n  inflating: nuttx.manifest\n  inflating: nuttx.map\n+ popd\n/home/pi/remote-bl602\n+ set +x\n----- Enable GPIO 2 and 3\n----- Set GPIO 2 and 3 as output\n----- Set GPIO 2 to High (BL602 Flashing Mode)\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- Toggle GPIO 3 High-Low-High (Reset BL602 again)\n----- BL602 is now in Flashing Mode\n----- Flash BL602 over USB UART with blflash\n+ blflash flash /tmp/nuttx.bin --port /dev/ttyUSB0\n[INFO  blflash::flasher] Start connection...\n[TRACE blflash::flasher] 5ms send count 55\n[TRACE blflash::flasher] handshake sent elapsed 233.442µs\n[INFO  blflash::flasher] Connection Succeed\n[INFO  blflash] Bootrom version: 1\n[TRACE blflash] Boot info: BootInfo { len: 14, bootrom_version: 1, otp_info: [0, 0, 0, 0, 3, 0, 0, 0, 61, 9d, c0, 5, b9, 18, 1d, 0] }\n[INFO  blflash::flasher] Sending eflash_loader...\n[INFO  blflash::flasher] Finished 2.551582797s 11.20KiB/s\n[TRACE blflash::flasher] 5ms send count 500\n[TRACE blflash::flasher] handshake sent elapsed 5.459475ms\n[INFO  blflash::flasher] Entered eflash_loader\n[INFO  blflash::flasher] Skip segment addr: 0 size: 47504 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: e000 size: 272 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: f000 size: 272 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: 10000 size: 85056 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: 1f8000 size: 5671 sha256 matches\n[INFO  blflash] Success\n+ set +x\n----- Set GPIO 2 to Low (BL602 Normal Mode)\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- BL602 is now in Normal Mode\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- Here is the BL602 Output...\n▒\nNuttShell (NSH) NuttX-10.2.0\nnsh\u003e irq_unexpected_isr: ERROR irq: 1\nup_assert: Assertion failed at file:irq/irq_unexpectedisr.c line: 51 task: Idle Task\nriscv_registerdump: EPC: deadbeee\nriscv_registerdump: A0: 00000002 A1: 420146b0 A2: 42015140 A3: 4201481c\nriscv_registerdump: A4: 420150d0 A5: 00000000 A6: 00000002 A7: 00000000\nriscv_registerdump: T0: 00006000 T1: 00000003 T2: 41bd5488 T3: 00000064\nriscv_registerdump: T4: 00000000 T5: 00000000 T6: c48af7e4\nriscv_registerdump: S0: deadbeef S1: deadbeef S2: 420146b0 S3: 42014000\nriscv_registerdump: S4: 42015000 S5: 42012510 S6: 00000001 S7: 23007000\nriscv_registerdump: S8: 4201fa38 S9: 00000001 S10: 00000c40 S11: 42010510\nriscv_registerdump: SP: 420126b0 FP: deadbeef TP: 005952e5 RA: deadbeef\nriscv_dumpstate: sp:     420144b0\nriscv_dumpstate: IRQ stack:\nriscv_dumpstate:   base: 42012540\nriscv_dumpstate:   size: 00002000\nriscv_stackdump: 420144a0: 00001fe0 23011000 420144f0 230053a0 deadbeef deadbeef 23010ca4 00000033\nriscv_stackdump: 420144c0: deadbeef 00000001 4201fa38 23007000 00000001 42012510 42015000 00000001\nriscv_stackdump: 420144e0: 420125a8 42014000 42014500 230042e2 42014834 80007800 42014510 23001d3e\nriscv_stackdump: 42014500: 420171c0 42014000 42014520 23001cdc deadbeef deadbeef 42014540 23000db4\nriscv_stackdump: 42014520: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef 00000000 23000d04\nriscv_dumpstate: sp:     420126b0\nriscv_dumpstate: User stack:\nriscv_dumpstate:   base: 42010530\nriscv_dumpstate:   size: 00001fe0\nriscv_showtasks:    PID    PRI      USED     STACK   FILLED    COMMAND\nriscv_showtasks:   ----   ----      8088      8192    98.7%!   irq\nriscv_dump_task:      0      0       436      8160     5.3%    Idle Task\nriscv_dump_task:      1    100       516      8144     6.3%    nsh_main\n\n----- Crash Analysis\n\n----- Code Address 230053a0\n23005396:       854e                    mv      a0,s3\n23005398:       00000097                auipc   ra,0x0\n2300539c:       c8c080e7                jalr    -884(ra) # 23005024 \u003criscv_stackdump\u003e\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/arch/risc-v/src/common/riscv_assert.c:364\n      if (CURRENT_REGS)\n230053a0:       7f0a2783                lw      a5,2032(s4)\n230053a4:       c399                    beqz    a5,230053aa \u003cup_assert+0x274\u003e\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/arch/risc-v/src/common/riscv_assert.c:366\n          sp = CURRENT_REGS[REG_SP];\n230053a6:       0087a983                lw      s3,8(a5)\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/arch/risc-v/src/common/riscv_assert.c:369\n\n----- Address 230042e2\n  up_assert(filename, linenum);\n230042da:       00001097                auipc   ra,0x1\n230042de:       e5c080e7                jalr    -420(ra) # 23005136 \u003cup_assert\u003e\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/libs/libc/assert/lib_assert.c:37\n  exit(EXIT_FAILURE);\n230042e2:       4505                    li      a0,1\n230042e4:       ffffe097                auipc   ra,0xffffe\n230042e8:       138080e7                jalr    312(ra) # 2300241c \u003cexit\u003e\n\n230042ec \u003c__errno\u003e:\n__errno():\n\n----- Code Address 23001d3e\n\n#else /* CONFIG_SMP */\n\nint sched_lock(void)\n{\n23001d3e:       1141                    addi    sp,sp,-16\n23001d40:       c422                    sw      s0,8(sp)\n23001d42:       c226                    sw      s1,4(sp)\n23001d44:       c606                    sw      ra,12(sp)\n23001d46:       0800                    addi    s0,sp,16\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/sched/sched/sched_lock.c:228\n\n----- Code Address 23001cdc\n  /* Record the new \"running\" task.  g_running_tasks[] is only used by\n   * assertion logic for reporting crashes.\n   */\n\n  g_running_tasks[this_cpu()] = this_task();\n23001cdc:       420147b7                lui     a5,0x42014\n23001ce0:       7fc7a703                lw      a4,2044(a5) # 420147fc \u003cg_readytorun\u003e\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/sched/irq/irq_dispatch.c:201\n}\n23001ce4:       40b2                    lw      ra,12(sp)\n23001ce6:       4422                    lw      s0,8(sp)\n\n----- Code Address 23000db4\n   * point state and the establish the correct address environment before\n   * returning from the interrupt.\n   */\n\n  if (regs != CURRENT_REGS)\n23000db4:       7f04a503                lw      a0,2032(s1)\n23000db8:       01250663                beq     a0,s2,23000dc4 \u003criscv_dispatch_irq+0x70\u003e\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/arch/risc-v/src/chip/bl602_irq_dispatch.c:106\n    {\n#ifdef CONFIG_ARCH_FPU\n      /* Restore floating point registers */\n\n----- Code Address 23000d04\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/arch/risc-v/src/common/riscv_exception_common.S:120\n\n  /* If context switch is needed, return a new sp     */\n\n  mv         sp, a0\n23000d04:       812a                    mv      sp,a0\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/arch/risc-v/src/common/riscv_exception_common.S:121\n  REGLOAD    s0, REG_EPC(sp)     /* restore mepc      */\n23000d06:       4402                    lw      s0,0(sp)\n/home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/nuttx/arch/risc-v/src/common/riscv_exception_common.S:122\n  csrw       mepc, s0\n\n----- Data Address 4201481c\n4201481c g     O .bss   00000008 g_pendingtasks\n\n----- Data Address 42012510\n42012510 l    d  .bss   00000000 .bss\n42012510 l     O .bss   00000008 g_idleargv\n42012510 g       .bss   00000000 __bss_start\n\n----- Data Address 42010510\n42010510 l    d  .noinit        00000000 .noinit\n42010510 g       .data  00000000 __boot2_pt_addr_end\n42010510 g     O .noinit        00002000 g_idle_stack\n42010510 g       .data  00000000 _data_run_end\n42010510 g       .data  00000000 __boot2_pt_addr_start\n42010510 g       .data  00000000 __boot2_flash_cfg_start\n42010510 g       .data  00000000 __boot2_flash_cfg_end\n\n----- Data Address 42012540\n42012540 g     O .bss   00002000 g_intstackalloc\n\n----- Data Address 42012510\n42012510 l    d  .bss   00000000 .bss\n42012510 l     O .bss   00000008 g_idleargv\n42012510 g       .bss   00000000 __bss_start\n\n----- Data Address 42014540\n42014540 l     O .bss   00000080 g_uart0rxbuffer\n42014540 g     O .bss   00000000 g_intstacktop\n\npi@raspberrypi:~/remote-bl602 $\n```\n\n# Output Log for Release Build\n\nBelow is the log for the __Release Build__ (includes the LoRaWAN Stack)...\n\nhttps://github.com/lupyuen/incubator-nuttx/releases/tag/release-2022-04-27\n\n```text\npi@raspberrypi:~ $ export BUILD_PREFIX=release; remote-bl602/scripts/test.sh \u0026\u0026\n read -p \"Press Enter to shutdown\" \u0026\u0026 sudo shutdown now\n+ '[' release == '' ']'\n+ '[' '' == '' ']'\n++ date +%Y-%m-%d\n+ export BUILD_DATE=2022-04-27\n+ BUILD_DATE=2022-04-27\n+ source /home/pi/.cargo/env\n++ export PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n++ PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n+ set +x\n----- Download the latest release NuttX build for 2022-04-27\n+ wget -q https://github.com/lupyuen/incubator-nuttx/releases/download/release-2022-04-27/nuttx.zip -O /tmp/nuttx.zip\n+ pushd /tmp\n/tmp ~\n+ unzip -o nuttx.zip\nArchive:  nuttx.zip\n  inflating: nuttx\n  inflating: nuttx.S\n  inflating: nuttx.bin\n  inflating: nuttx.board\n  inflating: nuttx.config\n  inflating: nuttx.hex\n  inflating: nuttx.manifest\n  inflating: nuttx.map\n+ popd\n~\n+ set +x\n----- Enable GPIO 2 and 3\n----- Set GPIO 2 and 3 as output\n----- Set GPIO 2 to High (BL602 Flashing Mode)\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- Toggle GPIO 3 High-Low-High (Reset BL602 again)\n----- BL602 is now in Flashing Mode\n----- Flash BL602 over USB UART with blflash\n+ blflash flash /tmp/nuttx.bin --port /dev/ttyUSB0\n[INFO  blflash::flasher] Start connection...\n[TRACE blflash::flasher] 5ms send count 55\n[TRACE blflash::flasher] handshake sent elapsed 255.849µs\n[INFO  blflash::flasher] Connection Succeed\n[INFO  blflash] Bootrom version: 1\n[TRACE blflash] Boot info: BootInfo { len: 14, bootrom_version: 1, otp_info: [0, 0, 0, 0, 3, 0, 0, 0, 61, 9d, c0, 5, b9, 18, 1d, 0] }\n[INFO  blflash::flasher] Sending eflash_loader...\n[INFO  blflash::flasher] Finished 2.555431143s 11.18KiB/s\n[TRACE blflash::flasher] 5ms send count 500\n[TRACE blflash::flasher] handshake sent elapsed 5.185616ms\n[INFO  blflash::flasher] Entered eflash_loader\n[INFO  blflash::flasher] Skip segment addr: 0 size: 47504 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: e000 size: 272 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: f000 size: 272 sha256 matches\n[INFO  blflash::flasher] Erase flash addr: 10000 size: 361712\n[INFO  blflash::flasher] Program flash... 4284f227db04f3377f490bf455879ac200761a00cdfcbba9f0a7f28333c4e2d5\n[INFO  blflash::flasher] Program done 4.301111592s 82.13KiB/s\n[INFO  blflash::flasher] Skip segment addr: 1f8000 size: 5671 sha256 matches\n[INFO  blflash] Success\n+ set +x\n----- Set GPIO 2 to Low (BL602 Normal Mode)\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- BL602 is now in Normal Mode\n----- Toggle GPIO 3 High-Low-High (Reset BL602)\n----- Here is the BL602 Output...\n▒bme280_register: Failed to init: -134\nbl602_bringup: ERROR: Failed to register BME280\n\nNuttShell (NSH) NuttX-10.3.0-RC0\nnsh\u003e\n----- Send command to BL602: lorawan_test\nuname -a\nNuttX 10.3.0-RC0 8afcc5bbf9-dirty Apr 27 2022 00:13:15 risc-v bl602evb\nnsh\u003e lorawan_test\ninit_entropy_pool\noffset = 2204\ntemperature = 32.116600 Celsius\noffset = 2204\ntemperature = 35.470142 Celsius\noffset = 2204\ntemperature = 33.277439 Celsius\noffset = 2204\ntemperature = 32.245583 Celsius\n\n###### ===================================== ######\n\nApplication name   : lorawan_test\nApplication version: 1.2.0\nGitHub base version: 5.0.0\n\n###### ===================================== ######\n\ninit_event_queue\nTimerInit:     0x42017408\nTimerInit:     0x42017424\nTimerInit:     0x42017440\nTimerInit:     0x420174bc\nTimerInit:     0x42017570\nTimerInit:     0x4201758c\nTimerInit:     0x420175a8\nTimerInit:     0x420175c4\nTODO: RtcGetCalendarTime\nTODO: SX126xReset\ninit_gpio\nDIO1 pintype before=5\ninit_gpio: change DIO1 to Trigger GPIO Interrupt on Rising Edge\ngpio_ioctl: Requested pintype 8, but actual pintype 5\nDIO1 pintype after=5\nStarting process_dio1\ninit_spi\nSX126xSetTxParams: power=22, rampTime=7\nSX126xSetPaConfig: paDutyCycle=4, hpMax=7, deviceSel=, paLut=1\nTimerInit:     0x42016508\nTimerInit:     0x42016474\nRadioSetModem\nRadioSetModem\nRadioSetPublicNetwork: public syncword=3444\nRadioSleep\ncallout_handler: lock\nprocess_dio1 started\nprocess_dio1: event=0x42016530\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nRadioSetModem\nRadioSetPublicNetwork: public syncword=3444\nDevEui      : 4B-C1-5E-E7-37-7B-B1-5B\nJoinEui     : 00-00-00-00-00-00-00-00\nPin         : 00-00-00-00\n\nTimerInit:     0x42017060\nTimerInit:     0x4201707c\nTimerInit:     0x42016f40\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nTODO: RtcBkupRead\nRadioSetChannel: freq=923400000\nRadioSetTxConfig: modem=1, power=13, fdev=0, bandwidth=0, datarate=10, coderate=1, preambleLen=8, fixLen=0, crcOn=1, freqHopOn=0, hopPeriod=0, iqInverted=0, timeout=4000\nRadioSetTxConfig: SpreadingFactor=10, Bandwidth=4, CodingRate=1, LowDatarateOptimize=0, PreambleLength=8, HeaderType=0, PayloadLength=255, CrcMode=1, InvertIQ=0\nRadioStandby\nRadioSetModem\nSX126xSetTxParams: power=13, rampTime=7\nSX126xSetPaConfig: paDutyCycle=4, hpMax=7, deviceSel=0, paLut=1\nSecureElementRandomNumber: 0xcee1903f\nRadioSend: size=23\n00 00 00 00 00 00 00 00 00 5b b1 7b 37 e7 5e c1 4b 3f 90 dc e8 b4 45\nRadioSend: PreambleLength=8, HeaderType=0, PayloadLength=23, CrcMode=1, InvertIQ=0\nTimerStop:     0x42016508\nTimerStart2:   0x42016508, 4000 ms\ncallout_reset: evq=0x42013010, ev=0x42016508\n\n###### =========== MLME-Request ============ ######\n######               MLME_JOIN               ######\n###### ===================================== ######\nSTATUS      : OK\nStartTxProcess\nTimerInit:     0x42015954\nTimerSetValue: 0x42015954, 42249 ms\nOnTxTimerEvent: timeout in 42249 ms, event=0\nTimerStop:     0x42015954\nTimerSetValue: 0x42015954, 42249 ms\nTimerStart:    0x42015954\nTimerStop:     0x42015954\nTimerStart2:   0x42015954, 42249 ms\ncallout_reset: evq=0x42013010, ev=0x42015954\nhandle_event_queue\nDIO1 add event\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_TX_DONE\nTimerStop:     0x42016508\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nDIO1 add event\nTimerSetValue: 0x42017424, 4988 ms\nTimerStart:    0x42017424\nTimerStop:     0x42017424\nTimerStart2:   0x42017424, 4988 ms\ncallout_reset: evq=0x42013010, ev=0x42017424\nTimerSetValue: 0x42017440, 5988 ms\nTimerStart:    0x42017440\nTimerStop:     0x42017440\nTimerStart2:   0x42017440, 5988 ms\ncallout_reset: evq=0x42013010, ev=0x42017440\nTODO: RtcGetCalendarTime\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nRadioOnDioIrq\nRadioIrqProcess\ncallout_handler: unlock\ncallout_handler: evq=0x42013010, ev=0x42017424\ncallout_handler: lock\nhandle_event_queue: ev=0x42017424\nTimerStop:     0x42017424\nRadioStandby\nRadioSetChannel: freq=923400000\nRadioSetRxConfig\nRadioStandby\nRadioSetModem\nRadioSetRxConfig done\nRadioRx\nTimerStop:     0x42016474\nTimerStart2:   0x42016474, 3000 ms\ncallout_reset: evq=0x42013010, ev=0x42016474\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_PREAMBLE_DETECTED\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_HEADER_VALID\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_RX_DONE\nTimerStop:     0x42016474\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nDIO1 add event\nTimerStop:     0x42017440\nOnTxData\n\n###### =========== MLME-Confirm ============ ######\nSTATUS      : OK\nOnJoinRequest\n###### ===========   JOINED     ============ ######\n\nOTAA\n\nDevAddr     :  011832DF\n\n\nDATA RATE   : DR_2\n\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nUplinkProcess\nPrepareTxFrame: Transmit to LoRaWAN: Hi NuttX (9 bytes)\nPrepareTxFrame: status=0, maxSize=11, currentSize=11\nLmHandlerSend: Data frame\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nRadioSetChannel: freq=923200000\nRadioSetTxConfig: modem=1, power=13, fdev=0, bandwidth=0, datarate=9, coderate=1, preambleLen=8, fixLen=0, crcOn=1, freqHopOn=0, hopPeriod=0, iqInverted=0, timeout=4000\nRadioSetTxConfig: SpreadingFactor=9, Bandwidth=4, CodingRate=1, LowDatarateOptimize=0, PreambleLength=8, HeaderType=0, PayloadLength=128, CrcMode=1, InvertIQ=0\nRadioStandby\nRadioSetModem\nSX126xSetTxParams: power=13, rampTime=7\nSX126xSetPaConfig: paDutyCycle=4, hpMax=7, deviceSel=0, paLut=1\nRadioSend: size=22\n40 df 32 18 01 00 01 00 01 d6 ef 78 3b 57 fa 20 ec a3 da 88 17 2a\nRadioSend: PreambleLength=8, HeaderType=0, PayloadLength=22, CrcMode=1, InvertIQ=0\nTimerStop:     0x42016508\nTimerStart2:   0x42016508, 4000 ms\ncallout_reset: evq=0x42013010, ev=0x42016508\n\n###### =========== MCPS-Request ============ ######\n######           MCPS_UNCONFIRMED            ######\n###### ===================================== ######\nSTATUS      : OK\nPrepareTxFrame: Transmit OK\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_TX_DONE\nTimerStop:     0x42016508\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nDIO1 add event\nTimerSetValue: 0x42017424, 980 ms\nTimerStart:    0x42017424\nTimerStop:     0x42017424\nTimerStart2:   0x42017424, 980 ms\ncallout_reset: evq=0x42013010, ev=0x42017424\nTimerSetValue: 0x42017440, 1988 ms\nTimerStart:    0x42017440\nTimerStop:     0x42017440\nTimerStart2:   0x42017440, 1988 ms\ncallout_reset: evq=0x42013010, ev=0x42017440\nTODO: RtcGetCalendarTime\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nRadioOnDioIrq\nRadioIrqProcess\ncallout_handler: unlock\ncallout_handler: evq=0x42013010, ev=0x42017424\ncallout_handler: lock\nhandle_event_queue: ev=0x42017424\nTimerStop:     0x42017424\nRadioStandby\nRadioSetChannel: freq=923200000\nRadioSetRxConfig\nRadioStandby\nRadioSetModem\nRadioSetRxConfig done\nRadioRx\nTimerStop:     0x42016474\nTimerStart2:   0x42016474, 3000 ms\ncallout_reset: evq=0x42013010, ev=0x42016474\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_RX_TX_TIMEOUT\nTimerStop:     0x42016474\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nDIO1 add event\nTimerStop:     0x42017440\nTimerStop:     0x42017408\nOnTxData\n\n###### =========== MCPS-Confirm ============ ######\nSTATUS      : OK\n\n###### =====   UPLINK FRAME        1   ===== ######\n\nCLASS       : A\n\nTX PORT     : 1\nTX DATA     : UNCONFIRMED\n48 69 20 4E 75 74 74 58 00\n\nDATA RATE   : DR_3\nU/L FREQ    : 923200000\nTX POWER    : 0\nCHANNEL MASK: 0003\n\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nUplinkProcess\nhandle_event_queue: ev=0x42016530\nRadioOnDioIrq\nRadioIrqProcess\nRadioOnDioIrq\nRadioIrqProcess\nUplinkProcess\n\n===== All OK! BL602 has successfully joined the LoRaWAN Network\n\nPress Enter to shutdown\n```\n\n# Output Log for PineDio Stack BL604 Build\n\nBelow is the log for the __PineDio Stack BL604 Build__ (includes the LoRaWAN Stack, ST7789 Display Driver, Touch Panel Driver, LVGL Test App)...\n\nhttps://github.com/lupyuen/incubator-nuttx/releases/tag/pinedio-2022-05-05\n\n```text\npi@raspberrypi:~ $ ./pinedio.sh\n+ cd /home/pi/remote-bl602\n+ git pull\nAlready up to date.\n+ lsusb -v -s 1:3\n+ grep bcdDevice\n+ colrm 1 23\n2.63\n+ lsusb -v -s 1:4\n+ grep bcdDevice\n+ colrm 1 23\n2.64\n+ export USB_DEVICE=/dev/ttyUSB1\n+ USB_DEVICE=/dev/ttyUSB1\n+ /home/pi/remote-bl602/scripts/pinedio.sh\n+ '[' '' == '' ']'\n+ export BUILD_PREFIX=pinedio\n+ BUILD_PREFIX=pinedio\n+ '[' '' == '' ']'\n++ date +%Y-%m-%d\n+ export BUILD_DATE=2022-05-05\n+ BUILD_DATE=2022-05-05\n+ '[' /dev/ttyUSB1 == '' ']'\n+ source /home/pi/.cargo/env\n++ export PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n++ PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n+ set +x\n----- Download the latest pinedio NuttX build for 2022-05-05\n+ wget -q https://github.com/lupyuen/incubator-nuttx/releases/download/pinedio-2022-05-05/nuttx.zip -O /tmp/nuttx.zip\n+ pushd /tmp\n/tmp ~/remote-bl602\n+ unzip -o nuttx.zip\nArchive:  nuttx.zip\n  inflating: nuttx\n  inflating: nuttx.S\n  inflating: nuttx.bin\n  inflating: nuttx.board\n  inflating: nuttx.bringup\n  inflating: nuttx.config\n  inflating: nuttx.hex\n  inflating: nuttx.manifest\n  inflating: nuttx.map\n+ popd\n~/remote-bl602\n+ set +x\n----- Enable GPIO 5 and 6\n----- Set GPIO 5 and 6 as output\n----- Set GPIO 5 to High (BL602 Flashing Mode)\n----- Toggle GPIO 6 High-Low-High (Reset BL602)\n----- Toggle GPIO 6 High-Low-High (Reset BL602 again)\n----- BL602 is now in Flashing Mode\n----- Flash BL602 over USB UART with blflash\n+ blflash flash /tmp/nuttx.bin --port /dev/ttyUSB1\n[INFO  blflash::flasher] Start connection...\n[TRACE blflash::flasher] 5ms send count 55\n[TRACE blflash::flasher] handshake sent elapsed 297.388µs\n[INFO  blflash::flasher] Connection Succeed\n[INFO  blflash] Bootrom version: 1\n[TRACE blflash] Boot info: BootInfo { len: 14, bootrom_version: 1, otp_info: [0, 0, 0, 0, 3, 0, 4, 40, ad, b8, e3, 4c, b9, 7c, 15, 0] }\n[INFO  blflash::flasher] Sending eflash_loader...\n[INFO  blflash::flasher] Finished 2.559526151s 11.17KiB/s\n[TRACE blflash::flasher] 5ms send count 500\n[TRACE blflash::flasher] handshake sent elapsed 5.21273ms\n[INFO  blflash::flasher] Entered eflash_loader\n[INFO  blflash::flasher] Skip segment addr: 0 size: 47504 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: e000 size: 272 sha256 matches\n[INFO  blflash::flasher] Skip segment addr: f000 size: 272 sha256 matches\n[INFO  blflash::flasher] Erase flash addr: 10000 size: 504288\n[INFO  blflash::flasher] Program flash... 2bea6e72b3247483532ea61fb9415a9f6718d50bb9e7ffa8992ed078185a8f3f\n[INFO  blflash::flasher] Program done 6.002709982s 82.05KiB/s\n[INFO  blflash::flasher] Skip segment addr: 1f8000 size: 5671 sha256 matches\n[INFO  blflash] Success\n+ set +x\n----- Set GPIO 5 to Low (BL602 Normal Mode)\n----- Toggle GPIO 6 High-Low-High (Reset BL602)\n----- BL602 is now in Normal Mode\n----- Toggle GPIO 6 High-Low-High (Reset BL602)\n----- Here is the BL602 Output...\n▒gplh_enable: WARNING: pin9: Already detached\ngplh_enable: WARNING: pin12: Already detached\ngplh_enable: WARNING: pin19: Already detached\ncst816s_register: path=/dev/input0, addr=21\ncst816s_register: Driver registered\n\nNuttShell (NSH) NuttX-10.3.0-RC0\nnsh\u003e uname -a\nNuttX 10.3.0-RC0 4db8d2954d May  5 2022 08:58:49 risc-v bl602evb\nnsh\u003e ls /dev\n/dev:\n console\n gpio10\n gpio12\n gpio14\n gpio15\n gpio19\n gpio20\n gpio21\n gpio3\n gpio9\n i2c0\n input0\n lcd0\n null\n spi0\n spitest0\n timer0\n urandom\n zero\nnsh\u003e\n----- Send command to BL602: lorawan_test\nlorawan_test\ninit_entropy_pool\noffset = 2209\ntemperature = 22.055979 Celsius\noffset = 2209\ntemperature = 26.957306 Celsius\noffset = 2209\ntemperature = 25.667484 Celsius\noffset = 2209\ntemperature = 25.667484 Celsius\n\n###### ===================================== ######\n\nApplication name   : lorawan_test\nApplication version: 1.2.0\nGitHub base version: 5.0.0\n\n###### ===================================== ######\n\ninit_event_queue\nTimerInit:     0x4201c76c\nTimerInit:     0x4201c788\nTimerInit:     0x4201c7a4\nTimerInit:     0x4201c820\nTimerInit:     0x4201c8d4\nTimerInit:     0x4201c8f0\nTimerInit:     0x4201c90c\nTimerInit:     0x4201c928\nTODO: RtcGetCalendarTime\nTODO: SX126xReset\ninit_gpio\nDIO1 pintype before=5\ninit_gpio: change DIO1 to Trigger GPIO gInterrupt on Rising Edge\nplh_enable: WARNING: pin19: Already detached\nDIO1 pintype after=8\nStarting process_dio1\ninit_spi\nSX126xSetTxParams: power=22, rampTime=7\nSX126xSetPaConfig: paDutyCycle=4, hpMax=7, deviceSel=0, paLut=1\nTimerInit:     0x4201b86c\nTimerInit:     0x4201b7d8\nRadioSetModem\nRadioSetModem\nRadioSetPublicNetwork: public syncword=3444\nRadioSleep\ncallout_handler: lock\nprocess_dio1 started\nprocess_dio1: event=0x4201b894\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nTODO: EepromMcuReadBuffer\nRadioSetModem\nRadioSetPublicNetwork: public syncword=3444\nDevEui      : 4B-C1-5E-E7-37-7B-B1-5B\nJoinEui     : 00-00-00-00-00-00-00-00\nPin         : 00-00-00-00\n\nTimerInit:     0x4201c3c4\nTimerInit:     0x4201c3e0\nTimerInit:     0x4201c2a4\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nTODO: RtcBkupRead\nRadioSetChannel: freq=923200000\nRadioSetTxConfig: modem=1, power=13, fdev=0, bandwidth=0, datarate=10, coderate=1, preambleLen=8, fixLen=0, crcOn=1, freqHopOn=0, hopPeriod=0, iqInverted=0, timeout=4000\nRadioSetTxConfig: SpreadingFactor=10, Bandwidth=4, CodingRate=1, LowDatarateOptimize=0, PreambleLength=8, HeaderType=0, PayloadLength=255, CrcMode=1, InvertIQ=0\nRadioStandby\nRadioSetModem\nSX126xSetTxParams: power=13, rampTime=7\nSX126xSetPaConfig: paDutyCycle=4, hpMax=7, deviceSel=0, paLut=1\nSecureElementRandomNumber: 0x2365edd0\nRadioSend: size=23\n00 00 00 00 00 00 00 00 00 5b b1 7b 37 e7 5e c1 4b d0 ed d6 02 42 41\nRadioSend: PreambleLength=8, HeaderType=0, PayloadLength=23, CrcMode=1, InvertIQ=0\nTimerStop:     0x4201b86c\nTimerStart2:   0x4201b86c, 4000 ms\ncallout_reset: evq=0x420131a8, ev=0x4201b86c\n\n###### =========== MLME-Request ============ ######\n######               MLME_JOIN               ######\n###### ===================================== ######\nSTATUS      : OK\nStartTxProcess\nTimerInit:     0x4201a90c\nTimerSetValue: 0x4201a90c, 42249 ms\nOnTxTimerEvent: timeout in 42249 ms, event=0\nTimerStop:     0x4201a90c\nTimerSetValue: 0x4201a90c, 42249 ms\nTimerStart:    0x4201a90c\nTimerStop:     0x4201a90c\nTimerStart2:   0x4201a90c, 42249 ms\ncallout_reset: evq=0x420131a8, ev=0x4201a90c\nhandle_event_queue\nDIO1 add event\nhandle_event_queue: ev=0x4201b894\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_TX_DONE\nTimerStop:     0x4201b86c\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nTimerSetValue: 0x4201c788, 4988 ms\nTimerStart:    0x4201c788\nTimerStop:     0x4201c788\nTimerStart2:   0x4201c788, 4988 ms\ncallout_reset: evq=0x420131a8, ev=0x4201c788\nTimerSetValue: 0x4201c7a4, 5988 ms\nTimerStart:    0x4201c7a4\nTimerStop:     0x4201c7a4\nTimerStart2:   0x4201c7a4, 5988 ms\ncallout_reset: evq=0x420131a8, ev=0x4201c7a4\nTODO: RtcGetCalendarTime\ncallout_handler: unlock\ncallout_handler: evq=0x420131a8, ev=0x4201c788\ncallout_handler: lock\nhandle_event_queue: ev=0x4201c788\nTimerStop:     0x4201c788\nRadioStandby\nRadioSetChannel: freq=923200000\nRadioSetRxConfig\nRadioStandby\nRadioSetModem\nRadioSetRxConfig done\nRadioRx\nTimerStop:     0x4201b7d8\nTimerStart2:   0x4201b7d8, 3000 ms\ncallout_reset: evq=0x420131a8, ev=0x4201b7d8\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x4201b894\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_PREAMBLE_DETECTED\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x4201b894\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_HEADER_VALID\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x4201b894\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_RX_DONE\nTimerStop:     0x4201b7d8\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nTimerStop:     0x4201c7a4\nOnTxData\n\n###### =========== MLME-Confirm ============ ######\nSTATUS      : OK\nOnJoinRequest\n###### ===========   JOINED     ============ ######\n\nOTAA\n\nDevAddr     :  00F76FBF\n\n\nDATA RATE   : DR_2\n\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nUplinkProcess\nPrepareTxFrame: Transmit to LoRaWAN: Hi NuttX (9 bytes)\nPrepareTxFrame: status=0, maxSize=11, currentSize=11\nLmHandlerSend: Data frame\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nRadioSetChannel: freq=923400000\nRadioSetTxConfig: modem=1, power=13, fdev=0, bandwidth=0, datarate=9, coderate=1, preambleLen=8, fixLen=0, crcOn=1, freqHopOn=0, hopPeriod=0, iqInverted=0, timeout=4000\nRadioSetTxConfig: SpreadingFactor=9, Bandwidth=4, CodingRate=1, LowDatarateOptimize=0, PreambleLength=8, HeaderType=0, PayloadLength=128, CrcMode=1, InvertIQ=0\nRadioStandby\nRadioSetModem\nSX126xSetTxParams: power=13, rampTime=7\nSX126xSetPaConfig: paDutyCycle=4, hpMax=7, deviceSel=0, paLut=1\nRadioSend: size=22\n40 bf 6f f7 00 00 01 00 01 34 9a 34 20 a6 ed 59 55 ae 23 55 11 70\nRadioSend: PreambleLength=8, HeaderType=0, PayloadLength=22, CrcMode=1, InvertIQ=0\nTimerStop:     0x4201b86c\nTimerStart2:   0x4201b86c, 4000 ms\ncallout_reset: evq=0x420131a8, ev=0x4201b86c\n\n###### =========== MCPS-Request ============ ######\n######           MCPS_UNCONFIRMED            ######\n###### ===================================== ######\nSTATUS      : OK\nPrepareTxFrame: Transmit OK\nDIO1 add event\nhandle_event_queue: ev=0x4201b894\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_TX_DONE\nTimerStop:     0x4201b86c\nTODO: RtcGetCalendarTime\nTODO: RtcBkupRead\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nTimerSetValue: 0x4201c788, 980 ms\nTimerStart:    0x4201c788\nTimerStop:     0x4201c788\nTimerStart2:   0x4201c788, 980 ms\ncallout_reset: evq=0x420131a8, ev=0x4201c788\nTimerSetValue: 0x4201c7a4, 1988 ms\nTimerStart:    0x4201c7a4\nTimerStop:     0x4201c7a4\nTimerStart2:   0x4201c7a4, 1988 ms\ncallout_reset: evq=0x420131a8, ev=0x4201c7a4\nTODO: RtcGetCalendarTime\ncallout_handler: unlock\ncallout_handler: evq=0x420131a8, ev=0x4201c788\ncallout_handler: lock\nhandle_event_queue: ev=0x4201c788\nTimerStop:     0x4201c788\nRadioStandby\nRadioSetChannel: freq=923400000\nRadioSetRxConfig\nRadioStandby\nRadioSetModem\nRadioSetRxConfig done\nRadioRx\nTimerStop:     0x4201b7d8\nTimerStart2:   0x4201b7d8, 3000 ms\ncallout_reset: evq=0x420131a8, ev=0x4201b7d8\nRadioOnDioIrq\nRadioIrqProcess\nDIO1 add event\nhandle_event_queue: ev=0x4201b894\nRadioOnDioIrq\nRadioIrqProcess\nIRQ_RX_TX_TIMEOUT\nTimerStop:     0x4201b7d8\nRadioOnDioIrq\nRadioIrqProcess\nRadioSleep\nTimerStop:     0x4201c7a4\nTimerStop:     0x4201c76c\nOnTxData\n\n###### =========== MCPS-Confirm ============ ######\nSTATUS      : OK\n\n###### =====   UPLINK FRAME        1   ===== ######\n\nCLASS       : A\n\nTX PORT     : 1\nTX DATA     : UNCONFIRMED\n48 69 20 4E 75 74 74 58 00\n\nDATA RATE   : DR_3\nU/L FREQ    : 923400000\nTX POWER    : 0\nCHANNEL MASK: 0003\n\nTODO: EepromMcuWriteBuffer\nTODO: EepromMcuWriteBuffer\nUplinkProcess\n\n===== All OK! BL602 has successfully joined the LoRaWAN Network\n\n+ /home/pi/remote-bl602/scripts/pinedio2.sh\n+ '[' '' == '' ']'\n+ export BUILD_PREFIX=pinedio\n+ BUILD_PREFIX=pinedio\n+ '[' '' == '' ']'\n++ date +%Y-%m-%d\n+ export BUILD_DATE=2022-05-05\n+ BUILD_DATE=2022-05-05\n+ '[' /dev/ttyUSB1 == '' ']'\n+ source /home/pi/.cargo/env\n++ export PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n++ PATH=/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/home/pi/.cargo/bin:/usr/lib/go-1.13.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games\n+ set +x\n----- Enable GPIO 5 and 6\n----- Set GPIO 5 and 6 as output\n----- Set GPIO 5 to Low (BL602 Normal Mode)\n----- Toggle GPIO 6 High-Low-High (Reset BL602)\n----- BL602 is now in Normal Mode\n----- Toggle GPIO 6 High-Low-High (Reset BL602)\n----- Here is the BL602 Output...\n▒gplh_enable: WARNING: pin9: Already detached\ngplh_enable: WARNING: pin12: Already detached\ngplh_enable: WARNING: pin19: Already detached\ncst816s_register: path=/dev/input0, addr=21\ncst816s_register: Driver registered\n\nNuttShell (NSH) NuttX-10.3.0-RC0\nnsh\u003e uname -a\nNuttX 10.3.0-RC0 4db8d2954d May  5 2022 08:58:49 risc-v bl602evb\nnsh\u003e ls /dev\n/dev:\n console\n gpio10\n gpio12\n gpio14\n gpio15\n gpio19\n gpio20\n gpio21\n gpio3\n gpio9\n i2c0\n input0\n lcd0\n null\n spi0\n spitest0\n timer0\n urandom\n zero\nnsh\u003e\n----- Send command to BL602: lvgltest\nlvgltest\ntp_init: Opening /dev/input0\ncst816s_open:\n\n----- HELLO HUMAN: TOUCH PINEDIO STACK NOW\ncst816s_poll_notify:\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=0, y=0\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       0\ncst816s_get_touch_data:   y:       0\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: DOWN: id=0, touch=0, x=83, y=106\ncst816s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   19\ncst816s_get_touch_data:   x:      83\ncst816s_get_touch_data:   y:       106\ncst816s_get_touch_data:\ncst816s_i2c_read:\nbl602_i2c_transfer: i2c transfer success\nbl602_i2c_transfer: i2c transfer success\ncst816s_get_touch_data: Invalid touch data: id=9, touch=2, x=639, y=1688\ncst816s_get_touch_data: UP: id=0, touch=2, x=83, y=106\ncst16s_get_touch_data:   id:      0\ncst816s_get_touch_data:   flags:   0c\ncst816s_get_touch_data:   x:       83\ncst816s_get_touch_data:   y:       106\n\n===== All OK! BL604 has responded to touch\n\n+ read -p 'Press Enter to shutdown'\nPress Enter to shutdown\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupyuen%2Fremote-bl602","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flupyuen%2Fremote-bl602","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupyuen%2Fremote-bl602/lists"}