Error Can't open serial uploading Mini Web Server


#1

Hi, I just virtualized my NodeMCU v2 (Windows 10) and tried to uplink the script Mini Web Server, but I’m getting the error “[error] Can’t open serial: COM11”

This is the result of the compilation:
[info] ########## STEP 4 - generate binary
[info] Resource table at 1276 0x4fc
[info] Saving to C:\Users\aom_o\zerynth2\tmp\zstudio.vbo
[info] Compilation Ok

And part of the uplink process:
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\netapp.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\evnt_handler.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\drv\cc3000_ifc.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\cc3000_common.c from cache
[info] Linking…
[info] ########## STEP 4 - generate binary
[info] Resource table at 1276 0x4fc
[info] Saving to C:\Users\aom_o\zerynth2\tmp\zstudio.vbo
[info] Compilation Ok
[info] Searching for device e7a4bc050dddcfcc95a52881d92f1d4634052f87 with alias zs:nodemcu2:e7a4bc050dddcfcc95a52881d92f1d4634052f87
[error] Can’t open serial: COM11

And the message below appears in the console:

Lost connection!

Am I doing something wrong?

Thanks a lot

Angel Ortiz


#2

There seems to be a problem with the serial communication with the board.
can you open the COM port through any serial terminal application?


#3

Hi, I’m so sorry it took me so long to get back. Yes, I was able to see some data being received, I was not able to set the baud rate right so it looked like garbage, also I got a brand new NodeMCU v2 board (I suspected the old one was damaged), connected it, created the VM, virtualized it and tried to uplink the mini web server project again, this time came back the message below and the uplinking task never ended.

[info] Resource table at 1276 0x4fc
[info] Saving to C:\Users\aom_o\zerynth2\tmp\zstudio.vbo
[info] Compilation Ok
[info] Searching for device e7a4bc050dddcfcc95a52881d92f1d4634052f87 with alias zs:nodemcu2:e7a4bc050dddcfcc95a52881d92f1d4634052f87
[info] Checking layout…
[info] No active layout found
[info] Got header: eNo$l nro sln oNl |or$pn r co|p|~o$l eonl oro #lpo { " N| "oN $eonl or r ~reebeb#l#| #p$llBneon$lll$l{ldon’t use rtc mem data
[info] Got header: Neb#b" l"{l{l

Any help is so welcome!

Thanks,
Angel


#4

This should not happen if the device had been virtualized successfuly.
Can you reset the device when the log says :compilation OK. ?
Let me know the output.:smile:


#5

Hi, sorry one more time to taking so long in getting back.
I registered, created a new VM and virtualized the board again just in case, uplinked the program and I got a different result this time: “Lost connection” after uplinking the program doing exactly what you told me to do. It looks like I got back to the point before getting the new board, I feel like I’m missing something, what could it be?

If it helps, I’ve attached the logs.

Thanks

[info] Starting device registration
[info] Burning bootloader...
[info] Burning bin
[info] esptool.py v1.3
[info] Connecting....
[info] Running Cesanta flasher stub...
[info] Flash params set to 0x0240
[info] Writing 28672 @ 0x0... 0 (0 %)1024 (3 %)2048 (7 %)3072 (10 %)4096 (14 %)5120 (17 %)6144 (21 %)7168 (25 %)8192 (28 %)9216 (32 %)10240 (35 %)11264 (39 %)12288 (42 %)13312 (46 %)14336 (50 %)15360 (53 %)16384 (57 %)17408 (60 %)18432 (64 %)19456 (67 %)20480 (71 %)21504 (75 %)22528 (78 %)23552 (82 %)24576 (85 %)25600 (89 %)26624 (92 %)27648 (96 %)28672 (100 %)
[info] Wrote 28672 bytes at 0x0 in 2.5 seconds (91.7 kbit/s)...
[info] Writing 266240 @ 0x20000... 0 (0 %)1024 (0 %)2048 (0 %)3072 (1 %)4096 (1 %)5120 (1 %)6144 (2 %)7168 (2 %)8192 (3 %)9216 (3 %)10240 (3 %)11264 (4 %)12288 (4 %)13312 (5 %)14336 (5 %)15360 (5 %)16384 (6 %)17408 (6 %)18432 (6 %)19456 (7 %)20480 (7 %)21504 (8 %)22528 (8 %)23552 (8 %)24576 (9 %)25600 (9 %)26624 (10 %)27648 (10 %)28672 (10 %)29696 (11 %)30720 (11 %)31744 (11 %)32768 (12 %)33792 (12 %)34816 (13 %)35840 (13 %)36864 (13 %)37888 (14 %)38912 (14 %)39936 (15 %)40960 (15 %)41984 (15 %)43008 (16 %)44032 (16 %)45056 (16 %)46080 (17 %)47104 (17 %)48128 (18 %)49152 (18 %)50176 (18 %)51200 (19 %)52224 (19 %)53248 (20 %)54272 (20 %)55296 (20 %)56320 (21 %)57344 (21 %)58368 (21 %)59392 (22 %)60416 (22 %)61440 (23 %)62464 (23 %)63488 (23 %)64512 (24 %)65536 (24 %)66560 (25 %)67584 (25 %)68608 (25 %)69632 (26 %)70656 (26 %)71680 (26 %)72704 (27 %)73728 (27 %)74752 (28 %)75776 (28 %)76800 (28 %)77824 (29 %)78848 (29 %)79872 (30 %)80896 (30 %)81920 (30 %)82944 (31 %)83968 (31 %)84992 (31 %)86016 (32 %)87040 (32 %)88064 (33 %)89088 (33 %)90112 (33 %)91136 (34 %)92160 (34 %)93184 (35 %)94208 (35 %)95232 (35 %)96256 (36 %)97280 (36 %)98304 (36 %)99328 (37 %)100352 (37 %)101376 (38 %)102400 (38 %)103424 (38 %)104448 (39 %)105472 (39 %)106496 (40 %)107520 (40 %)108544 (40 %)109568 (41 %)110592 (41 %)111616 (41 %)112640 (42 %)113664 (42 %)114688 (43 %)115712 (43 %)116736 (43 %)117760 (44 %)118784 (44 %)119808 (45 %)120832 (45 %)121856 (45 %)122880 (46 %)123904 (46 %)124928 (46 %)125952 (47 %)126976 (47 %)128000 (48 %)129024 (48 %)130048 (48 %)131072 (49 %)132096 (49 %)133120 (50 %)134144 (50 %)135168 (50 %)136192 (51 %)137216 (51 %)138240 (51 %)139264 (52 %)140288 (52 %)141312 (53 %)142336 (53 %)143360 (53 %)144384 (54 %)145408 (54 %)146432 (55 %)147456 (55 %)148480 (55 %)149504 (56 %)150528 (56 %)151552 (56 %)152576 (57 %)153600 (57 %)154624 (58 %)155648 (58 %)156672 (58 %)157696 (59 %)158720 (59 %)159744 (60 %)160768 (60 %)161792 (60 %)162816 (61 %)163840 (61 %)164864 (61 %)165888 (62 %)166912 (62 %)167936 (63 %)168960 (63 %)169984 (63 %)171008 (64 %)172032 (64 %)173056 (65 %)174080 (65 %)175104 (65 %)176128 (66 %)177152 (66 %)178176 (66 %)179200 (67 %)180224 (67 %)181248 (68 %)182272 (68 %)183296 (68 %)184320 (69 %)185344 (69 %)186368 (70 %)187392 (70 %)188416 (70 %)189440 (71 %)190464 (71 %)191488 (71 %)192512 (72 %)193536 (72 %)194560 (73 %)195584 (73 %)196608 (73 %)197632 (74 %)198656 (74 %)199680 (75 %)200704 (75 %)201728 (75 %)202752 (76 %)203776 (76 %)204800 (76 %)205824 (77 %)206848 (77 %)207872 (78 %)208896 (78 %)209920 (78 %)210944 (79 %)211968 (79 %)212992 (80 %)214016 (80 %)215040 (80 %)216064 (81 %)217088 (81 %)218112 (81 %)219136 (82 %)220160 (82 %)221184 (83 %)222208 (83 %)223232 (83 %)224256 (84 %)225280 (84 %)226304 (85 %)227328 (85 %)228352 (85 %)229376 (86 %)230400 (86 %)231424 (86 %)232448 (87 %)233472 (87 %)234496 (88 %)235520 (88 %)236544 (88 %)237568 (89 %)238592 (89 %)239616 (90 %)240640 (90 %)241664 (90 %)242688 (91 %)243712 (91 %)244736 (91 %)245760 (92 %)246784 (92 %)247808 (93 %)248832 (93 %)249856 (93 %)250880 (94 %)251904 (94 %)252928 (95 %)253952 (95 %)254976 (95 %)256000 (96 %)257024 (96 %)258048 (96 %)259072 (97 %)260096 (97 %)261120 (98 %)262144 (98 %)263168 (98 %)264192 (99 %)265216 (99 %)266240 (100 %)
[info] Wrote 266240 bytes at 0x20000 in 23.2 seconds (92.0 kbit/s)...
[info] Writing 4096 @ 0x3fc000... 0 (0 %)1024 (25 %)2048 (50 %)3072 (75 %)4096 (100 %)
[info] Wrote 4096 bytes at 0x3fc000 in 0.4 seconds (89.8 kbit/s)...
[info] Writing 4096 @ 0x61000... 0 (0 %)1024 (25 %)2048 (50 %)3072 (75 %)4096 (100 %)
[info] Wrote 4096 bytes at 0x61000 in 0.4 seconds (89.9 kbit/s)...
[info] Leaving...
[info] Verifying just-written flash...
[info] Flash params set to 0x0240
[info] Verifying 0x6d60 (28000) bytes @ 0x00000000 in flash against C:\Users\aom_o\zerynth2\tmp\tmpj_2irutb\tmp.bin...
[info] -- verify OK (digest matched)
[info] Verifying 0x4080c (264204) bytes @ 0x00020000 in flash against C:\Users\aom_o\zerynth2\tmp\tmpj28mk0vt\tmp.bin...
[info] -- verify OK (digest matched)
[info] Verifying 0x80 (128) bytes @ 0x003fc000 in flash against C:\Users\aom_o\zerynth2\tmp\tmp94m8dmd2\tmp.bin...
[info] -- verify OK (digest matched)
[info] Verifying 0x400 (1024) bytes @ 0x00061000 in flash against C:\Users\aom_o\zerynth2\tmp\tmp0ds7e9vy\tmp.bin...
[info] -- verify OK (digest matched)
[info] Chip id retrieved: 883300002000eef072000b0000483fbe
[info] Device NodeMcu v2 registered with uid: UzztYzcDSuqOnaD-tF07lQ
Registration successful! Now you can virtualize your nodemcu2


Registration successful! Now you can virtualize your nodemcu2
Creating VM for nodemcu2...
[info] Creating vm for device UzztYzcDSuqOnaD-tF07lQ
[info] VM NodeMcu v2 r2.2.0 created with uid: j7RstZyVRbKghAyCxcvOtQ
[info] Downloaded Virtual Machine in C:\Users\aom_o\zerynth2\vms\nodemcu2\883300002000eef072000b0000483fbe with uid j7RstZyVRbKghAyCxcvOtQ
VM created! You can now virtualize your nodemcu2
[info] Starting Virtualization...
[info] Burning bin
[info] esptool.py v1.3
[info] Connecting....
[info] Running Cesanta flasher stub...
[info] Flash params set to 0x0240
[info] Writing 45056 @ 0x0... 0 (0 %)1024 (2 %)2048 (4 %)3072 (6 %)4096 (9 %)5120 (11 %)6144 (13 %)7168 (15 %)8192 (18 %)9216 (20 %)10240 (22 %)11264 (25 %)12288 (27 %)13312 (29 %)14336 (31 %)15360 (34 %)16384 (36 %)17408 (38 %)18432 (40 %)19456 (43 %)20480 (45 %)21504 (47 %)22528 (50 %)23552 (52 %)24576 (54 %)25600 (56 %)26624 (59 %)27648 (61 %)28672 (63 %)29696 (65 %)30720 (68 %)31744 (70 %)32768 (72 %)33792 (75 %)34816 (77 %)35840 (79 %)36864 (81 %)37888 (84 %)38912 (86 %)39936 (88 %)40960 (90 %)41984 (93 %)43008 (95 %)44032 (97 %)45056 (100 %)
[info] Wrote 45056 bytes at 0x0 in 3.9 seconds (91.8 kbit/s)...
[info] Writing 327680 @ 0x20000... 0 (0 %)1024 (0 %)2048 (0 %)3072 (0 %)4096 (1 %)5120 (1 %)6144 (1 %)7168 (2 %)8192 (2 %)9216 (2 %)10240 (3 %)11264 (3 %)12288 (3 %)13312 (4 %)14336 (4 %)15360 (4 %)16384 (5 %)17408 (5 %)18432 (5 %)19456 (5 %)20480 (6 %)21504 (6 %)22528 (6 %)23552 (7 %)24576 (7 %)25600 (7 %)26624 (8 %)27648 (8 %)28672 (8 %)29696 (9 %)30720 (9 %)31744 (9 %)32768 (10 %)33792 (10 %)34816 (10 %)35840 (10 %)36864 (11 %)37888 (11 %)38912 (11 %)39936 (12 %)40960 (12 %)41984 (12 %)43008 (13 %)44032 (13 %)45056 (13 %)46080 (14 %)47104 (14 %)48128 (14 %)49152 (15 %)50176 (15 %)51200 (15 %)52224 (15 %)53248 (16 %)54272 (16 %)55296 (16 %)56320 (17 %)57344 (17 %)58368 (17 %)59392 (18 %)60416 (18 %)61440 (18 %)62464 (19 %)63488 (19 %)64512 (19 %)65536 (20 %)66560 (20 %)67584 (20 %)68608 (20 %)69632 (21 %)70656 (21 %)71680 (21 %)72704 (22 %)73728 (22 %)74752 (22 %)75776 (23 %)76800 (23 %)77824 (23 %)78848 (24 %)79872 (24 %)80896 (24 %)81920 (25 %)82944 (25 %)83968 (25 %)84992 (25 %)86016 (26 %)87040 (26 %)88064 (26 %)89088 (27 %)90112 (27 %)91136 (27 %)92160 (28 %)93184 (28 %)94208 (28 %)95232 (29 %)96256 (29 %)97280 (29 %)98304 (30 %)99328 (30 %)100352 (30 %)101376 (30 %)102400 (31 %)103424 (31 %)104448 (31 %)105472 (32 %)106496 (32 %)107520 (32 %)108544 (33 %)109568 (33 %)110592 (33 %)111616 (34 %)112640 (34 %)113664 (34 %)114688 (35 %)115712 (35 %)116736 (35 %)117760 (35 %)118784 (36 %)119808 (36 %)120832 (36 %)121856 (37 %)122880 (37 %)123904 (37 %)124928 (38 %)125952 (38 %)126976 (38 %)128000 (39 %)129024 (39 %)130048 (39 %)131072 (40 %)132096 (40 %)133120 (40 %)134144 (40 %)135168 (41 %)136192 (41 %)137216 (41 %)138240 (42 %)139264 (42 %)140288 (42 %)141312 (43 %)142336 (43 %)143360 (43 %)144384 (44 %)145408 (44 %)146432 (44 %)147456 (45 %)148480 (45 %)149504 (45 %)150528 (45 %)151552 (46 %)152576 (46 %)153600 (46 %)154624 (47 %)155648 (47 %)156672 (47 %)157696 (48 %)158720 (48 %)159744 (48 %)160768 (49 %)161792 (49 %)162816 (49 %)163840 (50 %)164864 (50 %)165888 (50 %)166912 (50 %)167936 (51 %)168960 (51 %)169984 (51 %)171008 (52 %)172032 (52 %)173056 (52 %)174080 (53 %)175104 (53 %)176128 (53 %)177152 (54 %)178176 (54 %)179200 (54 %)180224 (55 %)181248 (55 %)182272 (55 %)183296 (55 %)184320 (56 %)185344 (56 %)186368 (56 %)187392 (57 %)188416 (57 %)189440 (57 %)190464 (58 %)191488 (58 %)192512 (58 %)193536 (59 %)194560 (59 %)195584 (59 %)196608 (60 %)197632 (60 %)198656 (60 %)199680 (60 %)200704 (61 %)201728 (61 %)202752 (61 %)203776 (62 %)204800 (62 %)205824 (62 %)206848 (63 %)207872 (63 %)208896 (63 %)209920 (64 %)210944 (64 %)211968 (64 %)212992 (65 %)214016 (65 %)215040 (65 %)216064 (65 %)217088 (66 %)218112 (66 %)219136 (66 %)220160 (67 %)221184 (67 %)222208 (67 %)223232 (68 %)224256 (68 %)225280 (68 %)226304 (69 %)227328 (69 %)228352 (69 %)229376 (70 %)230400 (70 %)231424 (70 %)232448 (70 %)233472 (71 %)234496 (71 %)235520 (71 %)236544 (72 %)237568 (72 %)238592 (72 %)239616 (73 %)240640 (73 %)241664 (73 %)242688 (74 %)243712 (74 %)244736 (74 %)245760 (75 %)246784 (75 %)247808 (75 %)248832 (75 %)249856 (76 %)250880 (76 %)251904 (76 %)252928 (77 %)253952 (77 %)254976 (77 %)256000 (78 %)257024 (78 %)258048 (78 %)259072 (79 %)260096 (79 %)261120 (79 %)262144 (80 %)263168 (80 %)264192 (80 %)265216 (80 %)266240 (81 %)267264 (81 %)268288 (81 %)269312 (82 %)270336 (82 %)271360 (82 %)272384 (83 %)273408 (83 %)274432 (83 %)275456 (84 %)276480 (84 %)277504 (84 %)278528 (85 %)279552 (85 %)280576 (85 %)281600 (85 %)282624 (86 %)283648 (86 %)284672 (86 %)285696 (87 %)286720 (87 %)287744 (87 %)288768 (88 %)289792 (88 %)290816 (88 %)291840 (89 %)292864 (89 %)293888 (89 %)294912 (90 %)295936 (90 %)296960 (90 %)297984 (90 %)299008 (91 %)300032 (91 %)301056 (91 %)302080 (92 %)303104 (92 %)304128 (92 %)305152 (93 %)306176 (93 %)307200 (93 %)308224 (94 %)309248 (94 %)310272 (94 %)311296 (95 %)312320 (95 %)313344 (95 %)314368 (95 %)315392 (96 %)316416 (96 %)317440 (96 %)318464 (97 %)319488 (97 %)320512 (97 %)321536 (98 %)322560 (98 %)323584 (98 %)324608 (99 %)325632 (99 %)326656 (99 %)327680 (100 %)
[info] Wrote 327680 bytes at 0x20000 in 28.5 seconds (91.9 kbit/s)...
[info] Writing 4096 @ 0x3fc000... 0 (0 %)1024 (25 %)2048 (50 %)3072 (75 %)4096 (100 %)
[info] Wrote 4096 bytes at 0x3fc000 in 0.4 seconds (90.1 kbit/s)...
[info] Writing 4096 @ 0x70000... 0 (0 %)1024 (25 %)2048 (50 %)3072 (75 %)4096 (100 %)
[info] Wrote 4096 bytes at 0x70000 in 0.4 seconds (89.8 kbit/s)...
[info] Leaving...
[info] Verifying just-written flash...
[info] Flash params set to 0x0240
[info] Verifying 0xa610 (42512) bytes @ 0x00000000 in flash against C:\Users\aom_o\zerynth2\tmp\tmpbbrt1ivh\tmp.bin...
[info] -- verify OK (digest matched)
[info] Verifying 0x4f048 (323656) bytes @ 0x00020000 in flash against C:\Users\aom_o\zerynth2\tmp\tmpfas_dcch\tmp.bin...
[info] -- verify OK (digest matched)
[info] Verifying 0x80 (128) bytes @ 0x003fc000 in flash against C:\Users\aom_o\zerynth2\tmp\tmpa_b2864o\tmp.bin...
[info] -- verify OK (digest matched)
[info] Verifying 0x400 (1024) bytes @ 0x00070000 in flash against C:\Users\aom_o\zerynth2\tmp\tmpnepi87h1\tmp.bin...
[info] -- verify OK (digest matched)
[info] Virtualization Ok
Device Virtualized


[info] ########## STEP 1 - C code compilation
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\vhal\xtensa-lx106\esp8266\vhal_spi.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\hci.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\wlan.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\drv\async_handler.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\drv\cc3000_spi.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\netapp.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\socket.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\cc3000_common.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\security.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\drv\cc3000_ifc.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\nvmem.c from cache
[info] Getting C:\Users\aom_o\zerynth2\dist\r2.2.0\libs\official\texas\cc3000\csrc\evnt_handler.c from cache
[info] Linking...
[info] ########## STEP 4 - generate binary
[info] Resource table at 1276 0x4fc
[info] Saving to C:\Users\aom_o\zerynth2\tmp\zstudio.vbo
[info] Compilation Ok
[info] Searching for device e7a4bc050dddcfcc95a52881d92f1d4634052f87 with alias zs:nodemcu2:e7a4bc050dddcfcc95a52881d92f1d4634052f87
[info] Checking layout...
[info] No active layout found
[info] Got header: 2nods$oroel`N   bo$nos$pn r  Bn|bNnd l eoN l oroclpNs  cn|p Nnl`eoN l oro `ro`recc#$cb #pld $"NeNNl$ $ l$ldrddon't use rtc mem data
[info] Got header: o#"" B$ #l{$
[info] Probe sent
[info] Got header: r2.2.0 j7RstZyVRbKghAyCxcvOtQ nodemcu2 883300002000eef072000b0000483fbe ZERYNTH
[info] Found VM j7RstZyVRbKghAyCxcvOtQ for nodemcu2
[info] Handshake
[info]     membase  @3FFF17C8
[info]     romstart @40271000
[info]     flash    @0008F000
[info]     memdelta :924
[info] Erasing flash
[info] Sending Bytecode: 33947 bytes ( available 585728 )
[info] Uplink done

#6

The code compiles and uplinks without errors.
Could there be any runtime errors in the code?
Can you upload other examples like the Hello Zerynth example?