{"id":23430146,"url":"https://github.com/softplus/openbk-tools","last_synced_at":"2025-04-09T14:18:23.557Z","repository":{"id":155417271,"uuid":"542730473","full_name":"softplus/openbk-tools","owner":"softplus","description":"A collection of scripts \u0026 tools to make development for OpenBK / OpenBK7231N firmware a bit easier.","archived":false,"fork":false,"pushed_at":"2022-10-08T13:36:08.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T08:15:47.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2022-09-28T18:15:03.000Z","updated_at":"2022-10-01T20:20:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"a4267bd5-e76f-407d-94c0-d60082546a01","html_url":"https://github.com/softplus/openbk-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fopenbk-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fopenbk-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fopenbk-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fopenbk-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softplus","download_url":"https://codeload.github.com/softplus/openbk-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054196,"owners_count":21039952,"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","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":[],"created_at":"2024-12-23T08:15:53.449Z","updated_at":"2025-04-09T14:18:23.538Z","avatar_url":"https://github.com/softplus.png","language":"Shell","readme":"# openbk-tools\n\nClone into a directory within your main OpenBK firmware.\nMade \u0026 tested in Ubuntu 20.X, YMMV.\nAutomatically activates/deactivates .venv where Python is used.\n\nMade for https://github.com/openshwprojects/OpenBK7231T_App\n\nTested with BK7231N, BK7231T chips. \n\n[MIT License](LICENSE) / (c) John Mueller\n\n## Setup\n\nFor BK7231N:\n\n```bash\nmkdir whateverdir \u0026\u0026 cd whateverdir\ngit clone https://github.com/openshwprojects/OpenBK7231N .\nchmod +x *.sh\ngit clone https://github.com/openshwprojects/OpenBK7231T_App apps/OpenBK7231N_App\ngit clone https://github.com/OpenBekenIOT/hid_download_py\ngit clone https://github.com/softplus/openbk-tools\n\n# setup python stuff\ncd openbk-tools\nchmod +x *.sh\n# setup virtualenv -- recommended\nvirtualenv .venv \u0026\u0026 source .venv/bin/activate\npip install -r requirements.txt\ndeactivate\ncd ..\n```\n\nFor BK7231N / personal repos:\n\n```bash\nmkdir whateverdir \u0026\u0026 cd whateverdir\ngit clone https://github.com/softplus/tuya-iotos-embeded-sdk-wifi-ble-bk7231n . -b branch_sdk\nchmod +x *.sh\ngit clone https://github.com/softplus/OpenBK7231T_App apps/OpenBK7231N_App -b branch_app\ngit clone https://github.com/OpenBekenIOT/hid_download_py\ngit clone https://github.com/softplus/openbk-tools -b branch_too\n\n# setup python stuff\ncd openbk-tools\nchmod +x *.sh\n# setup virtualenv -- recommended\nvirtualenv .venv \u0026\u0026 source .venv/bin/activate\npip install -r requirements.txt\ndeactivate\ncd ..\n# done\n```\n\n# Tools\n\n## Wifi-level tools\n\n## wifi_logs - monitor logs via wifi, port 9000\n\nTries to connect to device via port 9000, requests logs.\nSaves a local version of the logs to your /tmp-dir. \n\n```bash\nwifi_logs.sh IPADDRESS\n# eg:  openbk-tools/wifi_logs.sh 192.168.4.1\n```\n\n### ota - upload firmware via wifi\n\nUploads the current firmware via wifi.\nReboots the device afterwards and checks for availability.\n\nExpects firmware at: SCRIPT_DIR/../platforms/{PLATFORM}/{PLATFORM}_os/tools/generate/Open{PLATFORM^^}_App_1.0.0.rbl\n\n```bash\nota.sh IPADDRESS PLATFORM\n# Eg:  openbk-tools/ota.sh 192.168.4.1 bk7231n\n```\n\n### scanwifi - shows open access-points\n\nNothing fancy, just easier than manually. \nUpdates automatically in the terminal window.\nRuns `nmcli dev wifi`.\n\n```bash\nopenbk-tools/scanwifi.sh\n```\n\n## Serial port tools\n\n### serial_monitor - monitor serial port for logs\n\nRetries serial port automatically.\nPauses when uploading firmware with flash_serial.sh.\n\n```bash\nserial_monitor.sh PORTNAME\n# eg:  openbk-tools/serial_monitor.sh /dev/ttyUSB1\n```\n\n### flash_serial - upload firmware via serial\n\nUploads the current firmware to the device with the serial port.\nWatches out for starting memory address.\n\nExpects firmware at: SCRIPT_DIR/../platforms/{PLATFORM}/{PLATFORM}_os/tools/generate/Open{PLATFORM^^}_App_QIO_1.0.0.bin\n\n\n```bash\nflash_serial.sh PORTNAME PLATFORM\n# Eg:  openbk-tools/flash_serial.sh /dev/ttyUSB1 bk7231n\n```\n\n### read_flash - download flash binary via serial\n\nDownloads the device's flash contents with the serial port.\nSaves the full downloaded file as _data, creates a _full version,\nsaves partitions based on best knowledge.\nTested for BK7231N, BK7231T.\n\nUses `hid_download_py/uartserial`.\n\n```bash\nread_flash.sh PORTNAME PLATFORM\n# Eg:  openbk-tools/read_flash.sh /dev/ttyUSB1 bk7231n\n```\n\n## Change settings / make actions\n\n### set_reboot - reboot device\n\nSends reboot request to REST API. Device should reboot in 3 seconds.\n\n```bash\nset_reboot.sh IPADDRESS\n# eg: openbk-tools/set_reboot.sh 192.168.4.1\n```\n\n### set_wifi - set WIFI AP \u0026 password\n\nSets the device WIFI accesspoint \u0026 password.\nCan use the `_SECRETS.sh` file to make it easier for you to set.\nCreate your own `_SECRETS.sh` file by copying `_SECRETS_EXAMPLE.sh`.\n\n```bash\nset_wifi.sh IPADDRESS APNAME PASSWORD\n# eg: openbk-tools/set_wifi.sh 192.168.4.1 \"My-AP\" \"12345\"\n#  or openbk-tools/set_wifi.sh 192.168.4.1 # use settings file\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Fopenbk-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftplus%2Fopenbk-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Fopenbk-tools/lists"}