Skip to content

Commit e092045

Browse files
committed
Bug fixes: ssh port was not used & docs update
1 parent 31e670b commit e092045

11 files changed

Lines changed: 97 additions & 5 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ node_modules
44
.vscode-test/
55
*.vsix
66
bin
7-
obj
7+
obj
8+
9+
samples/**/.vscode/**
10+
*.log

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Installing the Libgpiod library is possible from the repository and source code.
119119

120120
### Шаг 4 — Launch configuration
121121

122-
Now you need to open the project or create it. Project example [dotnet-iot-fastiot-test](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/tree/master/Samples/dotnet-iot-fastiot-test "dotnet-iot-fastiot-test").
122+
Now you need to open the project or create it. Project example [dotnet-iot-fastiot-test](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/tree/master/Samples/dotnet-iot-fastiot-test "dotnet-iot-fastiot-test"). Other projects are located in the [devdotnetorg/dotnet-iot-samples](https://github.com/devdotnetorg/dotnet-iot-samples "devdotnetorg/dotnet-iot-samples") repository.
123123

124124
To create a remote debugging configuration on the device, you must click on the *Add Configuration* button:
125125

README_ru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ sudo systemctl status ssh
119119

120120
### Шаг 4 — Конфигурация запуска
121121

122-
Теперь необходимо открыть проект или его создать. Пример проекта [dotnet-iot-fastiot-test](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/tree/master/Samples/dotnet-iot-fastiot-test "dotnet-iot-fastiot-test").
122+
Теперь необходимо открыть проект или его создать. Пример проекта [dotnet-iot-fastiot-test](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/tree/master/Samples/dotnet-iot-fastiot-test "dotnet-iot-fastiot-test"). Другие проекты располагаются в репозитории [devdotnetorg/dotnet-iot-samples](https://github.com/devdotnetorg/dotnet-iot-samples "devdotnetorg/dotnet-iot-samples").
123123

124124
Для создание конфигурации удаленной отладки на устройстве, необходимо нажать на кнопку *Add Configuration*:
125125

assets/marketplace/vscode-marketplace-overview.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
This extension allows you configures an ARMv7 or ARMv8 Linux embedded device to run .NET applications, and configures `*.csproj` projects for remote debugging via an ssh-tunnel. This has been tested on Windows (64 bits).
1010

11-
*.NET FastIoT Extension Interface*
11+
Devices supported: Raspberry Pi, Banana Pi, Orange Pi, Radxa, Tinkerboard, Odroid, Khadas VIM, NanoPi, Pine.
12+
13+
*.NET FastIoT Extension UI*
1214

1315
![.NET FastIoT title](https://raw.githubusercontent.com/devdotnetorg/vscode-extension-dotnet-fastiot/master/docs/vscode-dotnet-fastiot.png)
1416

@@ -41,6 +43,11 @@ Third-party bash scripts to install packages/libraries:
4143

4244
- [.NET SDK](https://dot.net/v1/dotnet-install.sh ".NET SDK"), [.NET Runtimes](https://dot.net/v1/dotnet-install.sh ".NET Runtimes"), [.NET Debugger (vsdbg)](https://aka.ms/getvsdbgsh ".NET Debugger (vsdbg)"), Libgpiod, [Docker](https://get.docker.com/ "Docker"), are downloaded from the official sites of the package developers, excluding the Libgpiod library. The script for installing this library is downloaded from the GitHub resource — [devdotnetorg/docker-libgpiod](https://raw.githubusercontent.com/devdotnetorg/docker-libgpiod/master/setup-libgpiod.sh "devdotnetorg/docker-libgpiod"). Next, the uploaded script downloads the source code of the library from the official [Libgpiod](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/ "Libgpiod") repository and compiles the library.
4345

46+
## System requirements for the device
47+
48+
- **Processor.** ARMv7 or ARMv8;
49+
- **OS version.** Linux distribution based on at least Ubuntu 18.04 (Bionic Beaver), or at least Debian 10.11 (Buster);
50+
4451
## Getting started
4552

4653
### Step 1 — Preparing the device
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.Device.Gpio;
3+
using System.Device.Gpio.Drivers;
4+
using System.Threading;
5+
6+
namespace dotnet_iot_blink
7+
{
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
/*Blink an LED
13+
*
14+
https://docs.microsoft.com/en-us/dotnet/iot/tutorials/blink-led
15+
*
16+
*/
17+
Console.WriteLine("Blinking LED.");
18+
//for Linux
19+
//Board: Banana Pi BPI-M64. Led: bananapi-m64:blue.
20+
//GPIOCHIP = 1, LED_PIN = 143
21+
//Board: Cubietruck A20. Led: cubietruck:blue:usr.
22+
//GPIOCHIP = 0, LED_PIN = 245
23+
//Board: Cubieboard A10. Led: cubieboard:blue:usr.
24+
//GPIOCHIP = 0, LED_PIN = 245
25+
const int GPIOCHIP = 0;
26+
const int LED_PIN = 245;
27+
GpioController controller;
28+
var drvGpio = new LibGpiodDriver(GPIOCHIP);
29+
controller = new GpioController(PinNumberingScheme.Logical, drvGpio);
30+
//
31+
controller.OpenPin(LED_PIN, PinMode.Output);
32+
bool ledOn = true;
33+
while (true)
34+
{
35+
controller.Write(LED_PIN, ((ledOn) ? PinValue.High : PinValue.Low));
36+
Thread.Sleep(1000);
37+
ledOn = !ledOn;
38+
}
39+
}
40+
}
41+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<TargetFramework>net5.0</TargetFramework>
5+
<RootNamespace>dotnet_iot_blink</RootNamespace>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<PackageReference Include="System.Device.Gpio" Version="1.5.0"/>
9+
</ItemGroup>
10+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31702.278
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnet-iot-blink", "dotnet-iot-blink.csproj", "{F31A0430-4377-44D9-B037-DCC1F81D3258}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{F31A0430-4377-44D9-B037-DCC1F81D3258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{F31A0430-4377-44D9-B037-DCC1F81D3258}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{F31A0430-4377-44D9-B037-DCC1F81D3258}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{F31A0430-4377-44D9-B037-DCC1F81D3258}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {A9BD3A10-845E-446B-9E28-904E90967E21}
24+
EndGlobalSection
25+
EndGlobal

src/IotLaunchOptions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ export class IotLaunchOptions extends BaseTreeItem{
8383
this.MergeDictionary.set("%SSH_KEY%",ssh_key);
8484
this.MergeDictionary.set("%USER_DEBUG%",<string>this.Device?.Account.UserName);
8585
this.MergeDictionary.set("%REMOTE_HOST%",<string>this.Device?.Account.Host);
86+
//22
87+
this.MergeDictionary.set("%REMOTE_PORT%",<string>this.Device?.Account.Port);
8688
//
8789
this.MergeDictionary.set("%DEVICE_LABEL%",<string>this.Device?.label);
8890
this.MergeDictionary.set("%BOARD_NAME%",<string>this.Device?.Information.BoardName);

vscodetemplates/insert_configuration.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"%SSH_KEY%",
2020
"-o",
2121
"StrictHostKeyChecking no",
22+
"-p",
23+
"%REMOTE_PORT%",
2224
"%USER_DEBUG%@%REMOTE_HOST%"
2325
],
2426
"debuggerPath": "/usr/share/vsdbg/vsdbg --engineLogging=/var/log/vsdbg.log"

vscodetemplates/insert_task_copy_app_to_device.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"--progress",
99
"-avz" ,
1010
"-e",
11-
"%PIPEPROGRAM% -i %SSH_KEY% -o 'StrictHostKeyChecking no'",
11+
"%PIPEPROGRAM% -i %SSH_KEY% -o 'StrictHostKeyChecking no' -p %REMOTE_PORT%",
1212
"%CY_PATH_PROJECT%/bin/Debug/%TARGET_FRAMEWORK%/%PLATFORM%/",
1313
"%USER_DEBUG%@%REMOTE_HOST%:~/fastiot/%NAME_PROJECT%"
1414
],

0 commit comments

Comments
 (0)