【M5 Stamp】PICOで、DroneBridge for ESP32ができるんかなぁ??【Ardupilot】

Ardupilotのテレメトリ

Xbeeを使ったテレメトリが、国内では技適などの関係もあってよく使われていますね。

https://akizukidenshi.com/catalog/g/gM-14651/

created by Rinker
DIGI INTERNATIONAL
¥1,690 (2024/09/19 10:53:08時点 Amazon調べ-詳細)

いいんですが。。

ちょっとした距離しか使わないなら。。これもありかな?と。。

https://ardupilot.org/copter/docs/common-esp32-telemetry.html

M5 Stamp Picoで動けばいいな。。と思って試してみました。 軽くできるしね。。

DroneBridge

https://github.com/DroneBridge/ESP32#installationflashing-using-precompiled-binaries

からダウンロードしてきて

PS C:\DroneBridgeESP32_v1_1> esptool.py -p COM23 erase_flash

として。。

esptool.py v3.2-dev
Serial port COM23
Connecting......
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Detecting chip type... ESP32
Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 4c:75:25:c1:69:38
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.8s
Hard resetting via RTS pin...

と一回、全部、イレースされて。。

次にダウンロードしてきたところから、

PS C:\DroneBridgeESP32_v1_1> esptool.py -p COM23 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x110000 www.bin

とすると。。

esptool.py v3.2-dev
Serial port COM23
Connecting...
Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 4c:75:25:c1:69:38
Stub is already running. No upload is necessary.
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x000d5fff...
Flash will be erased from 0x00110000 to 0x0030ffff...
Compressed 25072 bytes to 15392...
Wrote 25072 bytes (15392 compressed) at 0x00001000 in 0.6 seconds (effective 349.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 116...
Wrote 3072 bytes (116 compressed) at 0x00008000 in 0.0 seconds (effective 741.4 kbit/s)...
Hash of data verified.
Compressed 810176 bytes to 545145...
Wrote 810176 bytes (545145 compressed) at 0x00010000 in 12.7 seconds (effective 511.7 kbit/s)...
Hash of data verified.
Compressed 2097152 bytes to 52702...
Wrote 2097152 bytes (52702 compressed) at 0x00110000 in 7.2 seconds (effective 2327.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin..

動くはずだが。。動かない(笑)

 

I (30) boot: ESP-IDF v4.3 2nd stage bootloader
I (31) boot: compile time 23:04:51
I (31) boot: chip revision: 1
I (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed : 40MHz
I (45) boot.esp32: SPI Mode : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label Usage Type ST Offset Length
I (70) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (78) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (85) boot: 2 factory factory app 00 00 00010000 00100000
I (93) boot: 3 www Unknown data 01 82 00110000 00200000
I (100) boot: End of partition table
I (104) boot_comm: chip revision: 1, min. application chip revision: 0
I (112) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1c024h (114724) map
I (164) esp_image: segment 1: paddr=0002c04c vaddr=3ffb0000 size=03fcch ( 16332) load
I (170) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=8fe1ch (589340) map
I (393) esp_image: segment 3: paddr=000bfe44 vaddr=3ffb3fcc size=00164h ( 356) load
I (393) esp_image: segment 4: paddr=000bffb0 vaddr=40080000 size=15ccch ( 89292) load
I (437) esp_image: segment 5: paddr=000d5c84 vaddr=50000000 size=00010h ( 16) load
I (449) boot: Loaded app from partition at offset 0x10000
I (449) boot: Disabling RNG early entropy source...
I (461) cpu_start: Pro cpu up.
I (461) cpu_start: Starting app cpu, entry point is 0x40081398
I (0) cpu_start: App cpu up.
I (477) cpu_start: Pro cpu start user code
I (477) cpu_start: cpu freq: 160000000
I (477) cpu_start: Application information:
I (482) cpu_start: Project name: db_esp32
I (487) cpu_start: App version: v0.6-10-g4e9995a-dirty
I (493) cpu_start: Compile time: Jul 19 2021 22:06:12
I (499) cpu_start: ELF file SHA256: b74d468a4179ef37...
I (505) cpu_start: ESP-IDF: v4.3
I (510) heap_init: Initializing. RAM available for dynamic allocation:
I (517) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (523) heap_init: At 3FFBA598 len 00025A68 (150 KiB): DRAM
I (529) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (536) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (542) heap_init: At 40095CCC len 0000A334 (40 KiB): IRAM
I (549) spi_flash: detected chip: gd
I (553) spi_flash: flash io: dio
I (558) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (632) DB_ESP32: Reading settings from NVS
I (652) wifi:wifi driver task: 3ffc3a44, prio:23, stack:6656, core=0
I (652) system_api: Base MAC address is not set
I (652) system_api: read default base MAC address from EFUSE
I (662) wifi:wifi firmware version: c7d0450
I (662) wifi:wifi certification version: v7.0
I (662) wifi:config NVS flash: enabled
I (662) wifi:config nano formating: disabled
I (672) wifi:Init data frame dynamic rx buffer num: 32
I (672) wifi:Init management frame dynamic rx buffer num: 32
I (682) wifi:Init management short buffer num: 32
I (682) wifi:Init dynamic tx buffer num: 64
I (692) wifi:Init static rx buffer size: 1600
I (692) wifi:Init static rx buffer num: 10
I (692) wifi:Init dynamic rx buffer num: 32
I (702) wifi_init: rx ba win: 6
I (702) wifi_init: tcpip mbox: 32
I (712) wifi_init: udp mbox: 6
I (712) wifi_init: tcp mbox: 6
I (712) wifi_init: tcp tx win: 5744
I (722) wifi_init: tcp rx win: 5744
I (722) wifi_init: tcp mss: 1440
I (732) wifi_init: WiFi IRAM OP enabled
I (732) wifi_init: WiFi RX IRAM OP enabled
I (742) wifi:set country: cc=XX

コンソールにこういうのが吐き出されているんですが。。

Githubで調べたら、CompatibilityのIssueがあった。。

https://github.com/DroneBridge/ESP32/issues/10

https://github.com/DroneBridge/ESP32/issues/17

ちゃんと読もうっと(笑)

ーーーー

とりあえず。。 つづく。。

ESP32 DEV-KIT-C では??

同じことを、手持ちのESP32 DEV-KIT-Cでやってみると。。。

あっけなく動きました!! ちなみにConsoleにはこんな感じで動きが見えます。

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:7004
ho 0 tail 12 room 4
load:0x40078000,len:14296
ho 0 tail 12 room 4
load:0x40080400,len:3688
entry 0x40080678
I (31) boot: ESP-IDF v4.3 2nd stage bootloader
I (31) boot: compile time 23:04:51
I (31) boot: chip revision: 1
I (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (41) boot.esp32: SPI Speed : 40MHz
I (45) boot.esp32: SPI Mode : DIO
I (50) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label Usage Type ST Offset Length
I (70) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (78) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (85) boot: 2 factory factory app 00 00 00010000 00100000
I (93) boot: 3 www Unknown data 01 82 00110000 00200000
I (100) boot: End of partition table
I (104) boot_comm: chip revision: 1, min. application chip revision: 0
I (112) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1c024h (114724) map
I (164) esp_image: segment 1: paddr=0002c04c vaddr=3ffb0000 size=03fcch ( 16332) load
I (170) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=8fe1ch (589340) map
I (393) esp_image: segment 3: paddr=000bfe44 vaddr=3ffb3fcc size=00164h ( 356) load
I (394) esp_image: segment 4: paddr=000bffb0 vaddr=40080000 size=15ccch ( 89292) load
I (437) esp_image: segment 5: paddr=000d5c84 vaddr=50000000 size=00010h ( 16) load
I (449) boot: Loaded app from partition at offset 0x10000
I (449) boot: Disabling RNG early entropy source...
I (461) cpu_start: Pro cpu up.
I (461) cpu_start: Starting app cpu, entry point is 0x40081398
I (0) cpu_start: App cpu up.
I (477) cpu_start: Pro cpu start user code
I (477) cpu_start: cpu freq: 160000000
I (477) cpu_start: Application information:
I (482) cpu_start: Project name: db_esp32
I (487) cpu_start: App version: v0.6-10-g4e9995a-dirty
I (493) cpu_start: Compile time: Jul 19 2021 22:06:12
I (499) cpu_start: ELF file SHA256: b74d468a4179ef37...
I (505) cpu_start: ESP-IDF: v4.3
I (510) heap_init: Initializing. RAM available for dynamic allocation:
I (517) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (523) heap_init: At 3FFBA598 len 00025A68 (150 KiB): DRAM
I (529) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (536) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (542) heap_init: At 40095CCC len 0000A334 (40 KiB): IRAM
I (549) spi_flash: detected chip: generic
I (553) spi_flash: flash io: dio
I (558) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (632) DB_ESP32: Reading settings from NVS
I (652) wifi:wifi driver task: 3ffc3a44, prio:23, stack:6656, core=0
I (652) system_api: Base MAC address is not set
I (652) system_api: read default base MAC address from EFUSE
I (662) wifi:wifi firmware version: c7d0450
I (662) wifi:wifi certification version: v7.0
I (662) wifi:config NVS flash: enabled
I (662) wifi:config nano formating: disabled
I (672) wifi:Init data frame dynamic rx buffer num: 32
I (672) wifi:Init management frame dynamic rx buffer num: 32
I (682) wifi:Init management short buffer num: 32
I (682) wifi:Init dynamic tx buffer num: 64
I (692) wifi:Init static rx buffer size: 1600
I (692) wifi:Init static rx buffer num: 10
I (692) wifi:Init dynamic rx buffer num: 32
I (702) wifi_init: rx ba win: 6
I (702) wifi_init: tcpip mbox: 32
I (712) wifi_init: udp mbox: 6
I (712) wifi_init: tcp mbox: 6
I (712) wifi_init: tcp tx win: 5744
I (722) wifi_init: tcp rx win: 5744
I (722) wifi_init: tcp mss: 1440
I (732) wifi_init: WiFi IRAM OP enabled
I (732) wifi_init: WiFi RX IRAM OP enabled
I (742) wifi:set country: cc=XX schan=1 nchan=13 policy=1

I (742) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (842) wifi:mode : softAP (98:cd:ac:61:5a:59)
I (852) wifi:Total power save buffer number: 32
I (852) wifi:Init max length of beacon: 752/752
I (852) wifi:Init max length of beacon: 752/752
I (852) DB_ESP32: AP started!
I (1072) DB_ESP32: Partition size: total: 1920401, used: 102408
I (1072) DB_HTTP_REST: Starting HTTP Server
I (1072) TCP_SERVER_SETUP: Opened TCP server on port 5760
I (1072) DB_CONTROL: Opened UDP socket on port 14550
I (1082) DB_CONTROL: Started control module
I (1092) TCP_SERVER_SETUP: Opened TCP server on port 1603
I (1092) COMM: Started communication module
I (8792) wifi:new:<6,0>, old:<6,0>, ap:<6,0>, sta:<255,255>, prof:6
I (8802) wifi:station: 7c:67:a2:eb:99:52 join, AID=1, b, 20
I (8872) DB_ESP32: Client connected - station:7c:67:a2:eb:99:52, AID=1
I (8902) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.2.2
I (15812) DB_HTTP_REST: File sending complete
I (15922) DB_HTTP_REST: File sending complete
I (16112) DB_HTTP_REST: File sending complete
I (16122) DB_HTTP_REST: File sending complete
W (16122) httpd: httpd_accept_conn: error in accept (23)
W (16132) httpd: httpd_server: error accepting new connection
W (16132) httpd: httpd_accept_conn: error in accept (23)
W (16132) httpd: httpd_server: error accepting new connection
I (16382) DB_HTTP_REST: File sending complete
I (16532) DB_HTTP_REST: File sending complete
I (93092) DB_CONTROL: TCP: New client connected: 192.168.2.2
I (124892) DB_CONTROL: TCP client disconnected
I (135902) wifi:station: 7c:67:a2:eb:99:52 leave, AID = 1, bss_flags is 655393, bss:0x3ffbc9b4
I (135902) wifi:new:<6,0>, old:<6,0>, ap:<6,0>, sta:<255,255>, prof:6
I (135912) DB_ESP32: Client disconnected - station:7c:67:a2:eb:99:52, AID=1

ちょっとでかいけど。。まぁ、まずはこれで使ってみるかな??(笑)

何が違うのか?よくわかってないけど。。

とりあえずTX17 RX16で、PixHawk Miniに繋いでみよう!!

つづく。。

 

投稿者 tom2rd

コメントを残していただけるとありがたいです

Loading Facebook Comments ...

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください