Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Serial monitor doesn't work on older OS #1393

Closed
Alexisdxyz opened this issue Dec 9, 2021 · 11 comments
Closed

Serial monitor doesn't work on older OS #1393

Alexisdxyz opened this issue Dec 9, 2021 · 11 comments
Labels
fixed-pending-release Fix is merged and will be included in the next release. serial Issues with serial ports

Comments

@Alexisdxyz
Copy link

Issue Type: Bug

just update Vs code 1.63

Extension version: 0.4.8
VS Code version: Code 1.63.0 (7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e, 2021-12-07T06:26:56.179Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.82GB (8.64GB free)
Process Argv --crash-reporter-id 01d99435-a1d2-4d13-8345-003ed3e32046 --crash-reporter-id 01d99435-a1d2-4d13-8345-003ed3e32046
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
vscorecescf:30384386
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsaa593cf:30376535
pythonvs932cf:30408637
vscop804cf:30404767
vscop453:30404998
vsrem710cf:30405999
vscexrecpromp3t1:30407762

@benmcmorran
Copy link
Member

I'm not able to reproduce this issue with extension 0.4.8 on VS Code 1.63.2 running on Windows. @Alexisdxyz (or upvoters @CodingCreate101, @dhassault, and @cschaffter) are you still seeing this issue, and if you are can you share a minimal code snippet that reproduces the issue? I'm wondering if this is the same problem as #1396 and #1402.

@benmcmorran benmcmorran added the needs-more-info More details about this issue are needed for it to be actionable. label Jan 10, 2022
@tejas-hosamani
Copy link

I have not checked recently. I will try to get my versions and see if it's the same issue by adding some delay.

Maybe by weekend 😬

@benmcmorran benmcmorran added the serial Issues with serial ports label Jan 12, 2022
@BelKed
Copy link
Contributor

BelKed commented Jan 15, 2022

Same issue here...
Serial Monitor from vscode-arduino doesn't work properly also in my case. It doesn't show any output. After running "Arduino: Open Serial Monitor" it outputs just:

[Starting] Opening the serial port - /dev/cu.SLAB_USBtoUART

Seems like it trying to connect to that serial port, but it can't... I tried it with and without opened Serial Monitor in Arduino IDE, but no results (it should show error in VS Code).

Using screen command (screen /dev/cu.SLAB_USBtoUART 115200) and also in Arduino IDE 1.8.15 it works as it should.

Extension version: 0.4.10
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z)
OS version: Darwin x64 17.7.0 (macOS High Sierra 1.13.6)
Restricted Mode: No


With vscode-arduino 0.4.3 and Code 1.58.2 it works as intended:

[Starting] Opening the serial port - /dev/tty.SLAB_USBtoUART
[Info] Opened the serial port - /dev/tty.SLAB_USBtoUART
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
[Done] Closed the serial port

@benmcmorran
Copy link
Member

Thanks for the report @BelKed. Given that version 0.4.3 is the last time the serial monitor worked for you, I'm guessing this issue has something to do with this project's adoption of serial-monitor-cli, which started in version 0.4.4. Can you try running these commands in the terminal to help narrow down if the problem is coming from serial-monitor-cli itself, or the integration in VS Code?

~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/main list-ports

You should see a JSON response with each port available on your machine. Next, try to connect to one of the ports (I'm using
/dev/cu.SLAB_USBtoUART for the example below).

~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/main open -b 115200 /dev/cu.SLAB_USBtoUART

You should see output from the attached device, assuming it's writing data to the serial port.

@BelKed
Copy link
Contributor

BelKed commented Jan 18, 2022

Yes, you are right, there is some problem with serial-monitor-cli... It seems like its Python library is built for Mac OS X 10.15 (I have Mac OS X 1.13.6).

Running each of both commands show same error code:

~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/main list-ports
[21267] Error loading Python lib '/Users/user/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/libpython3.8.dylib': dlopen: dlopen(/Users/user/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/libpython3.8.dylib, 10): Symbol not found: ____chkstk_darwin
  Referenced from: /Users/user/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/libintl.8.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib
 in /Users/user/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/libintl.8.dylib

@benmcmorran
Copy link
Member

Thanks! That should be enough for us to try to repro the issue.

@benmcmorran benmcmorran removed the needs-more-info More details about this issue are needed for it to be actionable. label Jan 18, 2022
@benmcmorran benmcmorran changed the title Serial monitor don't work after a maj Serial monitor doesn't work on older OS Jan 18, 2022
@gcampbell-msft
Copy link
Contributor

@BelKed We have a possible solution that we'd like your help testing to confirm it works. Could you possibly follow these steps and let us know if it works?

  1. Download the build artifact from this link: https://github.com/microsoft/serial-monitor-cli/suites/5008861506/artifacts/147099637
  2. Unzip the artifact, open the main.zip within it and copy the contents. You should notice that this looks very similar to what is currently located in your system here: "~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/". Replace your system contents with what you just copied.
  3. At this point you should be able to follow the same steps @benmcmorran gave you above to test it and see if it behaves as expected.

Let us know if this solves your issue!

@gcampbell-msft gcampbell-msft added the needs-more-info More details about this issue are needed for it to be actionable. label Jan 21, 2022
@BelKed
Copy link
Contributor

BelKed commented Jan 21, 2022

Thanks, @gcampbell-msft! Now it works as intended:

~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/main list-ports
[{"port": "/dev/cu.Bluetooth-Incoming-Port", "desc": "n/a", "hwid": "n/a"}, {"port": "/dev/cu.SLAB_USBtoUART", "desc": "CP2102 USB to UART Bridge Controller", "hwid": "USB VID:PID=10C4:EA60 SER=0001 LOCATION=253-1.2"}]
~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.4.10/out/serial-monitor-cli/darwin/main open -b 115200 /dev/cu.SLAB_USBtoUART
Hello World!
Hello World!
Hello World!
...

Now I can also upload sketches and open Serial Monitor without problems in VSCode:

[Starting] Opening the serial port - /dev/tty.SLAB_USBtoUART
Hello World!
Hello World!
Hello World!
...

@gcampbell-msft
Copy link
Contributor

Great! We will work to get this released as soon as we can.

@benmcmorran benmcmorran removed the needs-more-info More details about this issue are needed for it to be actionable. label Jan 21, 2022
@benmcmorran
Copy link
Member

This issue should be fixed with the insertion of serial-monitor-cli v0.0.7, which will be included in the next release of the vscode-arduino extension.

@benmcmorran benmcmorran added the fixed-pending-release Fix is merged and will be included in the next release. label Jan 28, 2022
@benmcmorran
Copy link
Member

This issue has been fixed in the latest release of this extension, which is available in the VS Code extension marketplace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-pending-release Fix is merged and will be included in the next release. serial Issues with serial ports
Projects
None yet
Development

No branches or pull requests

5 participants