We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Visual Studio Code support for Omega development



  • Hi all.

    New here. We at Wattworker, a startup company in Norway are working on developing a awesome new product to optimize water heater power usage by the use on machine learning. We have chosen Omega2S+ to be the brain in our PCB.
    http://wattworker.com/

    I use Visual Studio Code for my workflow. It has a awesome official extension called "Remote SSH", that enables remote development with many advanced features. When successfully connected, all files and folders appear in the left panel, while ssh terminal appear in bottom panel. It makes it super easy and efficient to develop with.

    a17047a8-d582-41f4-9df9-ee63ea9e4427-image.png

    Config file:
    95096153-1fbf-4772-af1d-05f4b3955e84-image.png

    I tried to enter Onion as host, however vscode gives a error: Bash not found. The whole log in below. It does however work with raspberry pi and all other linux distros.

    Can anyone help us here?

    ------------------------------ Full Error Log -----------------------------
    [17:15:32.863] Log Level: 2
    [17:15:32.872] remote-ssh@0.56.0
    [17:15:32.872] win32 x64
    [17:15:32.874] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a2257617474776f726b6572227d", attempt 1
    [17:15:32.874] SSH Resolver called for host: Wattworker
    [17:15:32.874] Setting up SSH remote "Wattworker"
    [17:15:32.919] Using commit id "e5a624b788d92b8d34d1392e4c4d9789406efe8f" and quality "stable" for server
    [17:15:32.923] Install and start server if needed
    [17:15:34.633] Checking ssh with "ssh -V"
    [17:15:34.682] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

    [17:15:34.691] Running script with connection command: ssh -T -D 57404 Wattworker bash
    [17:15:34.695] Terminal shell path: C:\WINDOWS\System32\cmd.exe
    [17:15:35.574] > root@192.168.3.1's password:]0;C:\WINDOWS\System32\cmd.exe
    [17:15:35.574] Got some output, clearing connection timeout
    [17:15:35.575] Showing password prompt
    [17:15:38.354] Got password response
    [17:15:38.354] "install" wrote data to terminal: "********"
    [17:15:38.369] >
    [17:15:38.393] > ash: bash: not found
    [17:15:38.692] "install" terminal command done
    [17:15:38.694] Install terminal quit with output: ash: bash: not found
    [17:15:38.694] Received install output: ash: bash: not found
    [17:15:38.706] Resolver error: Error: bash not found
    at Function.Create (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:94424)
    at c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:90746
    at Object.t.handleInstallOutput (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:90947)
    at I (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:106975)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:104974
    at async Object.t.withShowDetailsEvent (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:110096)
    at async Object.t.resolve (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:108158)
    at async c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:143767
    [17:15:38.713] ------


  • administrators

    @Waqas The default shell is actually ash - a lightweight version of the unix shell - in order to conserve space.

    root@Omega-F195:/# echo $0
    /bin/ash
    

    It looks like Visual Studio depends on having bash available. You can install it using the package manager:

    opkg update
    opkg install bash
    


  • Okay, i successfully installed bash, and it went further.

    However this time the error says, "Unsupported architecture".
    I don't know if you can do anything about it, or if it is up to vscode developers to add support for it.

    -------------------------- Full log -------------------------------------
    [19:45:44.048] Log Level: 2
    [19:45:44.055] remote-ssh@0.56.0
    [19:45:44.055] win32 x64
    [19:45:44.058] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a2257617474776f726b6572227d", attempt 1
    [19:45:44.058] SSH Resolver called for host: Wattworker
    [19:45:44.058] Setting up SSH remote "Wattworker"
    [19:45:44.116] Using commit id "e5a624b788d92b8d34d1392e4c4d9789406efe8f" and quality "stable" for server
    [19:45:44.119] Install and start server if needed
    [19:45:45.411] Checking ssh with "ssh -V"
    [19:45:45.462] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

    [19:45:45.469] Running script with connection command: ssh -T -D 59128 Wattworker bash
    [19:45:45.474] Terminal shell path: C:\WINDOWS\System32\cmd.exe
    [19:45:46.388] > root@192.168.3.1's password:]0;C:\WINDOWS\System32\cmd.exe
    [19:45:46.388] Got some output, clearing connection timeout
    [19:45:46.389] Showing password prompt
    [19:45:50.773] Got password response
    [19:45:50.774] "install" wrote data to terminal: "********"
    [19:45:50.788] >
    [19:45:51.136] > b478c40a8081: running
    [19:45:51.226] > Unsupported architecture: mips
    [19:45:51.250] > b478c40a8081: start

    exitCode==27==
    sshAuthSock====
    listeningOn====
    osReleaseId==openwrt==
    arch==mips==
    webUiAccessToken====
    tmpDir==/tmp==
    platform==linux==
    b478c40a8081: end
    [19:45:51.250] Received install output:
    exitCode==27==
    sshAuthSock====
    listeningOn====
    osReleaseId==openwrt==
    arch==mips==
    webUiAccessToken====
    tmpDir==/tmp==
    platform==linux==

    [19:45:51.252] Unsupported architecture
    [19:45:51.258] Resolver error: Error: The remote host's architecture is not supported
    at Function.ServerInstallError (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:94355)
    at c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:92085
    at Object.t.handleInstallOutput (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:93073)
    at I (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:106975)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:104974
    at async Object.t.withShowDetailsEvent (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:110096)
    at async Object.t.resolve (c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:108158)
    at async c:\Users\Mohammad Waqas.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:143767
    [19:45:51.263] ------


  • administrators

    @Waqas yeah it looks like vscode is trying compile on the Omega2 and its compiler doesn't have support for MIPS processors and/or OpenWRT

    I assume this is C or C++ code?

    Here are a some resources for working with C/C++:



  • @Waqas if you check the details of the extension it explains why this won't work on an Omega2:

    https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh

    Look under "Host Requirements"



  • @crispyoz yeah, you are right. It looks like there is no support for omega board, that's to bad. It would have been a awesome way to develop.



  • @Waqas IoT development is often a challenge of finding the right tools and configuration. The more you learn, the easier it gets as you get your tools and configurations in order.



Looks like your connection to Community was lost, please wait while we try to reconnect.