lora-gateway / esxp1302

An 8-channel ESP32 LoRa Gateway based on SX1302
Other
33 stars 17 forks source link

about "webpage.html" how to convert to "webpage.h" #11

Closed majorzpley closed 2 months ago

majorzpley commented 2 months ago

Hello, I am using ur code trying to run on ESP32 DEVKIT_C board,it works great!I was planning to make some changes to the web page"webpage.html".After I modified this web page file,I cleared the contents of the file,then i try with "./run_me.sh make",however,There is nothing in the webpage.h file.It seems that there is something wired with the "scripts/dump_html.py" file.i am unfamiliar with Python,plz help me get over it,this is my virtual mathine configurations: 屏幕截图 2024-04-15 200900

danielkucera commented 2 months ago

Hi @majorzpley ,

can you post the output of the script you run?

majorzpley commented 2 months ago

Hello @danielkucera,

1、This is ". export.sh" under file "esp-idf" output:

**majorzpley@ubuntu:~/esp-idf$ . export.sh

Setting IDF_PATH to '/home/majorzpley/esp-idf' Detecting the Python interpreter Checking "python" ... Command 'python' not found, did you mean: command 'python3' from deb python3 command 'python' from deb python-is-python3 Checking "python3" ... Python 3.8.10 "python3" has been detected Adding ESP-IDF tools to PATH... Using Python interpreter in /home/majorzpley/.espressif/python_env/idf4.4_py3.8_env/bin/python Checking if Python packages are up to date... /home/majorzpley/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources Python requirements from /home/majorzpley/esp-idf/requirements.txt are satisfied. Added the following directories to PATH: /home/majorzpley/esp-idf/components/esptool_py/esptool /home/majorzpley/esp-idf/components/espcoredump /home/majorzpley/esp-idf/components/partition_table /home/majorzpley/esp-idf/components/app_update /home/majorzpley/.espressif/tools/xtensa-esp-elf-gdb/11.2_20220823/xtensa-esp-elf-gdb/bin /home/majorzpley/.espressif/tools/riscv32-esp-elf-gdb/11.2_20220823/riscv32-esp-elf-gdb/bin /home/majorzpley/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin /home/majorzpley/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s2-elf/bin /home/majorzpley/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin /home/majorzpley/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin /home/majorzpley/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin /home/majorzpley/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/bin /home/majorzpley/.espressif/python_env/idf4.4_py3.8_env/bin /home/majorzpley/esp-idf/tools Done! You can now compile ESP-IDF projects. Go to the project directory and run:

idf.py build

/home/majorzpley/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources**

2、This the output of the script "./runme.sh make":

*majorzpley@ubuntu:/mnt/hgfs/shared/esxp1302_debug$ ./run_me.sh make /home/majorzpley/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources Executing action: app Running make in directory /mnt/hgfs/shared/esxp1302_debug/build Executing "make -j 4 app"... [ 0%] Built target custom_bundle [ 1%] Built target partition_table_bin [ 1%] Built target _project_elf_src [ 1%] Built target memory_ld [ 1%] Built target idf_ulp [ 1%] Built target idf_esp_serial_slave_link [ 1%] Built target idf_sdmmc [ 1%] Built target idf_esp_https_ota [ 2%] Built target idf_esp_http_server [ 2%] Built target __idf_esp_http_client [ 3%] Built target idf_tcp_transport [ 3%] Built target idf_esp-tls [ 6%] Built target __idf_nghttp [ 6%] Built target idf_app_trace [ 6%] Built target idf_cxx [ 7%] Built target __idf_newlib [ 8%] Built target idf_freertos [ 8%] Built target idf_esp_timer [ 8%] Built target idf_esp_common [ 9%] Built target idf_xtensa [ 12%] Built target __idf_esp_hw_support [ 14%] Built target idf_soc [ 15%] Built target idf_heap [ 15%] Built target __idf_log [ 23%] Built target idf_lwip [ 25%] Built target idf_console [ 25%] Built target idf_esp_wifi [ 31%] Built target idf_wpa_supplicant [ 32%] Built target idf_esp_event [ 32%] Built target idf_esp_netif [ 32%] Built target idf_tcpip_adapter [ 33%] Built target idf_esp_eth [ 34%] Built target __idf_vfs [ 38%] Built target idf_hal [ 39%] Built target idf_esp_rom [ 42%] Built target idf_esp_system [ 43%] Built target idf_esp_phy [ 44%] Built target idf_espcoredump [ 44%] Built target idf_esp_gdbstub [ 45%] Built target idf_pthread [ 46%] Built target idf_nvs_flash [ 48%] Built target idf_spi_flash [ 49%] Built target idf_bootloader_support [ 50%] Built target idf_app_update [ 58%] Built target mbedcrypto [ 59%] Built target mbedx509 [ 60%] Built target mbedtls [ 60%] Built target idf_mbedtls [ 60%] Built target idf_esp_pm [ 63%] Built target idf_driver [ 63%] Built target idf_esp_ipc [ 64%] Built target idf_efuse [ 64%] Built target idf_esp_ringbuf [ 65%] Built target idf_json [ 65%] Built target idf_protobuf-c [ 65%] Built target idf_mdns [ 65%] Built target __idf_asio [ 66%] Built target idf_cbor [ 66%] Built target idf_unity [ 66%] Built target __idf_esp_adc_cal [ 69%] Built target idf_coap [ 70%] Built target idf_esp_hid [ 71%] Built target idf_esp_lcd [ 72%] Built target idf_esp_websocket_client [ 73%] Built target __idf_expat [ 74%] Built target idf_wear_levelling [ 74%] Built target idf_jsmn [ 77%] Built target __idf_mqtt [ 79%] Built target idf_freemodbus [ 80%] Built target idf_openssl [ 90%] Built target __idf_libsodium [ 90%] Built target idf_perfmon [ 91%] Built target idf_spiffs [ 92%] Built target __idf_protocomm [ 92%] Built target idf_cmock [ 93%] Built target idf_fatfs [ 94%] Built target __idf_esp_local_ctrl [ 95%] Built target idf_wifi_provisioning Scanning dependencies of target __idf_main [ 95%] Building C object esp-idf/main/CMakeFiles/idf_main.dir/packet_forwarder/lora_pkt_fwd.c.obj [ 95%] Building C object esp-idf/main/CMakeFiles/idf_main.dir/packet_forwarder/http_server.c.obj /mnt/hgfs/shared/esxp1302_debug/main/packet_forwarder/lora_pkt_fwd.c: In function 'start_reboot_timer_ms': /mnt/hgfs/shared/esxp1302_debug/main/packet_forwarder/lora_pkt_fwd.c:3912:25: warning: initialization of 'void ()(void )' from incompatible pointer type 'void ()(void)' [-Wincompatible-pointer-types] .callback = &reboot_timer_callback, ^ /mnt/hgfs/shared/esxp1302_debug/main/packet_forwarder/lora_pkt_fwd.c:3912:25: note: (near initialization for 'reboot_timer_args.callback') [ 96%] Linking C static library libmain.a [100%] Built target __idf_main [100%] Generating ld/sections.ld [100%] Built target __ldgen_output_sections.ld [100%] Linking CXX executable ESXP1302-Pkt-Fwd.elf [100%] Built target ESXP1302-Pkt-Fwd.elf make[3]: Warning: File 'ESXP1302-Pkt-Fwd.elf' has modification time 0.13 s in the future [100%] Generating binary image from built executable esptool.py v3.3.4-dev Creating esp32 image... Merged 25 ELF sections Successfully created esp32 image. Generated /mnt/hgfs/shared/esxp1302_debug/build/ESXP1302-Pkt-Fwd.bin make[3]: warning: Clock skew detected. Your build may be incomplete. [100%] Built target gen_project_binary ESXP1302-Pkt-Fwd.bin binary size 0xfa080 bytes. Smallest app partition is 0x100000 bytes. 0x5f80 bytes (2%) free. [100%] Built target app_check_size [100%] Built target app

App build complete. To flash, run this command: /home/majorzpley/.espressif/python_env/idf4.4_py3.8_env/bin/python ../../../../home/majorzpley/esp-idf/components/esptool_py/esptool/esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash 0x10000 build/ESXP1302-Pkt-Fwd.bin or run 'idf.py -p (PORT) app-flash'**

dennis4lora commented 2 months ago

In earlier versions (such as v0.8), run_me.sh does produce main/webpage.h; but now that file is moved to folder main/packet_forwarder instead, where is more reasonable.

Sorry for the confusion. It's my fault not removing the old one from the code in time. I'll fix it soon.

BTW: I'll also remove the black web theme to avoid the duplication and save some space.

majorzpley commented 2 months ago

@dennis4lora

thanks a lot!This question has been bothering me for a long time.Can I close issues after you submit a new project?

dennis4lora commented 2 months ago

@majorzpley You are welcome, and sorry for not answering it in time. :smile:

I've made a commit to address above issue.

I guess you can close this issue if you see no further problem anymore. Thanks.

majorzpley commented 2 months ago

@dennis4lora ok,I'll verify it as soon as possible.

majorzpley commented 2 months ago

@dennis4lora i have already test the script on my machine,it works fine,thanks a lot.👍

valcarcexyz commented 1 month ago

This should also be generated when using PlatformIO or it won't compile