Skip to content

Commit 7327d5f

Browse files
committed
esp8266/scripts/port_diag: Add network diagnostic output.
1 parent a676a41 commit 7327d5f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

esp8266/scripts/port_diag.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import esp
22
import uctypes
3+
import lwip
34

45

56
def main():
67

78
ROM = uctypes.bytearray_at(0x40200000, 16)
89
fid = esp.flash_id()
910

11+
print("FlashROM:")
1012
print("Flash ID: %x (Vendor: %x Device: %x)" % (fid, fid & 0xff, fid & 0xff00 | fid >> 16))
1113

1214
print("Flash bootloader data:")
@@ -15,5 +17,12 @@ def main():
1517
print("Byte @2: %02x" % ROM[2])
1618
print("Byte @3: %02x (Flash size: %s Flash freq: %s)" % (ROM[3], SZ_MAP.get(ROM[3] >> 4, "?"), FREQ_MAP.get(ROM[3] & 0xf)))
1719

20+
print("\nNetworking:")
21+
print("Free WiFi driver buffers of type:")
22+
for i in range(5):
23+
print("%d: %d" % (i, esp.esf_free_bufs(i)))
24+
print("lwIP PCBs:")
25+
lwip.print_pcbs()
26+
1827

1928
main()

0 commit comments

Comments
 (0)