Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일

C# - Rapsberry Pi Zero W와 PC 간 Bluetooth 통신 예제 코드

일전에 소개한 Rapsberry Pi Zero W(이하 rpi)는,

윈도우즈 사용자를 위한 라즈베리 파이 제로 W 모델을 설정하는 방법
; https://www.sysnet.pe.kr/2/0/11372

(무선 랜과 함께) 블루투스(Bluetooth 4.1)를 내장하고 있습니다. 그럼 지난번의 실습에 이어,

C# - 32feet.NET을 이용한 PC 간 Bluetooth 통신 예제 코드
; https://www.sysnet.pe.kr/2/0/12004

이번에는 블루투스 서버를 C++로 구현해 rpi에 설치하고 PC에서는 C#으로 만든 블루투스 클라이언트를 만들어 볼까요? ^^




지난 글에도 언급했지만, 블루투스 통신을 하려면 그전에 반드시 pairing을 해야 합니다. rpi의 경우 대개는 명령어 모드로 부팅할 것이기 때문에 pairing 과정도 명령어로 진행해야 한다는 점이 약간 수고스럽습니다. 우선 Pairing 신청은 간편하게 윈도우 PC 측에서 하면 좋습니다. 이를 위해 윈도우에서 "Settings" / "Devices" / "Bluetooth & other devices"에서 + 모양의 "Add Bluetooth or other device" 버튼을 누릅니다. 그럼 다음과 같은 화면이 뜨고,

window_bluetooth_add_device_1.png

위의 화면에서 "Bluetooth"를 선택하면 이제 주변 기기 탐색을 시작합니다.

그럼, rpi가 탐색될 수 있도록 SSH 연결을 한 후 sudo 권한으로 bluetoothctl 명령어를 실행합니다.

$ sudo apt-get update && sudo apt-get upgrade -y
$ sudo apt-get install bluetooth blueman bluez

# bluetoothctl
Agent registered
[bluetooth]#

보는 바와 같이 bluetooth 명령어 처리로 바뀌는데 간단하게 "show" 명령어를 이용해 rpi의 블루투스 환경 설정을 조회할 수 있습니다.

[bluetooth]# show
Controller BF:32:A1:CD:82:EF (public)
        Name: raspberrypi
        Alias: raspberrypi
        Class: 0x00480000
        Powered: yes
        Discoverable: no
        Pairable: yes
        UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0532
        Discovering: no
BluetoothPolicy.BluetoothUUID
; https://docs.samsungknox.com/devref/knox-sdk/reference/com/samsung/android/knox/bluetooth/BluetoothPolicy.BluetoothUUID.html

Bluetooth Low Energy
; https://www.digi.com/resources/documentation/digidocs/90001547/reference/bsp/r_bluetooth_ble.htm

Headset AG - HSP(Headset Profile)
  Headset Profile (HSP) Acts as an audio gateway alone.

Generic Attribute Profile - GATT(Generic Attribute Profile)
  Used to transfer data between BLE devices.

A/V Remote Control - AVRCP(Audio/Video Remote Control Profile)
  Allows sending command frames to a target.

Generic Access Profile - GAP(Generic Access Profile)
  Controls connections and advertisements between devices.

PnP Information

A/V Remote Control Target - AVRCP(Audio/Video Remote Control Profile)
  Allows receiving command frames and generating response frames.

Audio Source - A2DP(Advanced Audio Distribution Profile)
  Acts as a source of digital audio data and sends the stream to the sink

Handsfree Audio Gateway - HFP(Hands-Free Profile)
  Acts as an audio gateway alone.

출력 결과에 따라 "Discoverable: no"인데, 이걸 true로 바꿔야 윈도우의 블루투스 기기 검색에 나타나게 됩니다. 그래서 다음의 명령어를 내립니다.

[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller BF:32:A1:CD:82:EF Discoverable: yes

[CHG] Device 7C:5C:F8:DB:08:0C Connected: yes
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C Modalias: bluetooth:v0006p0001d0A00
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 00001115-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:5C:F8:DB:08:0C UUIDs: c7f94713-891e-496a-a0e7-983a0946126e
[CHG] Device 7C:5C:F8:DB:08:0C ServicesResolved: yes
[CHG] Device 7C:5C:F8:DB:08:0C Paired: yes
[CHG] Device 7C:5C:F8:DB:08:0C ServicesResolved: no
[CHG] Device 7C:5C:F8:DB:08:0C Connected: no

위의 명령어를 수행하자마자 윈도우 PC 측의 기기 선택 목록에 rpi가 나타나고 이를 선택하면 pairing 과정이 간단하게 완료됩니다.




pairing이 완료되었으면 이제 블루투스 서버 용 프로그램을 만들어 rpi 측에서 실행해야 하는데요. 이를 위해 2개의 빌드 도구를 설치합니다.

# apt install build-essential
# apt install libbluetooth-dev

그런 다음 아래의 글에 공개된 소스 코드를,

BluetoothTest/C BlueZ Server/
; https://github.com/RyanGlScott/BluetoothTest/tree/master/C%20BlueZ%20Server

Raspberry Pi 3 블루투스 페어링 방법(bluetoothctl) 및 C언어 블루투스 서버 예제
; https://webnautes.tistory.com/1137

Visual Studio의 리눅스 프로젝트 템플릿을 이용해,

Visual Studio 2017에서 Raspberry Pi C++ 응용 프로그램 제작
; https://www.sysnet.pe.kr/2/0/11358

작성하면 윈도우 PC에서 디버깅까지 가능한 환경을 제공받으며 편리하게 서버 프로그램을 마무리할 수 있습니다.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
#include <bluetooth/rfcomm.h>
#include <sys/wait.h>
#include <pthread.h>
#include <signal.h>

// https://github.com/RyanGlScott/BluetoothTest/tree/master/C%20BlueZ%20Server
// https://webnautes.tistory.com/1137

void* ThreadMain(void* argument);
bdaddr_t bdaddr_any = { 0, 0, 0, 0, 0, 0 };
bdaddr_t bdaddr_local = { 0, 0, 0, 0xff, 0xff, 0xff };

int _str2uuid(const char* uuid_str, uuid_t* uuid) {
    /* This is from the pybluez stack */

    uint32_t uuid_int[4];
    char* endptr;

    if (strlen(uuid_str) == 36) {
        char buf[9] = { 0 };

        if (uuid_str[8] != '-' && uuid_str[13] != '-' &&
            uuid_str[18] != '-' && uuid_str[23] != '-') {
            return 0;
        }
        // first 8-bytes
        strncpy(buf, uuid_str, 8);
        uuid_int[0] = htonl(strtoul(buf, &endptr, 16));
        if (endptr != buf + 8) return 0;
        // second 8-bytes
        strncpy(buf, uuid_str + 9, 4);
        strncpy(buf + 4, uuid_str + 14, 4);
        uuid_int[1] = htonl(strtoul(buf, &endptr, 16));
        if (endptr != buf + 8) return 0;

        // third 8-bytes
        strncpy(buf, uuid_str + 19, 4);
        strncpy(buf + 4, uuid_str + 24, 4);
        uuid_int[2] = htonl(strtoul(buf, &endptr, 16));
        if (endptr != buf + 8) return 0;

        // fourth 8-bytes
        strncpy(buf, uuid_str + 28, 8);
        uuid_int[3] = htonl(strtoul(buf, &endptr, 16));
        if (endptr != buf + 8) return 0;

        if (uuid != NULL) sdp_uuid128_create(uuid, uuid_int);
    }
    else if (strlen(uuid_str) == 8) {
        // 32-bit reserved UUID
        uint32_t i = strtoul(uuid_str, &endptr, 16);
        if (endptr != uuid_str + 8) return 0;
        if (uuid != NULL) sdp_uuid32_create(uuid, i);
    }
    else if (strlen(uuid_str) == 4) {
        // 16-bit reserved UUID
        int i = strtol(uuid_str, &endptr, 16);
        if (endptr != uuid_str + 4) return 0;
        if (uuid != NULL) sdp_uuid16_create(uuid, (uint16_t)i);
    }
    else {
        return 0;
    }

    return 1;
}

sdp_session_t* register_service(uint8_t rfcomm_channel) {

    const char* service_name = "Armatus Bluetooth server";
    const char* svc_dsc = "A HERMIT server that interfaces with the Armatus Android app";
    const char* service_prov = "Armatus";

    uuid_t root_uuid, l2cap_uuid, rfcomm_uuid, svc_uuid;

    sdp_list_t* l2cap_list = 0;
    sdp_list_t* rfcomm_list = 0;
    sdp_list_t* root_list = 0;
    sdp_list_t* proto_list = 0;
    sdp_list_t* access_proto_list = 0;

    sdp_data_t* channel = 0;
    sdp_record_t record = { 0 };
    sdp_session_t* session = 0;

    _str2uuid("00000004-0000-1000-8000-00805F9B34FB", &svc_uuid);
    sdp_set_service_id(&record, svc_uuid);

    char str[256] = "";
    sdp_uuid2strn(&svc_uuid, str, 256);
    printf("Registering UUID %s\n", str);

    // make the service record publicly browsable
    sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP);
    root_list = sdp_list_append(0, &root_uuid);
    sdp_set_browse_groups(&record, root_list);

    // set l2cap information
    sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID);
    l2cap_list = sdp_list_append(0, &l2cap_uuid);
    proto_list = sdp_list_append(0, l2cap_list);

    // register the RFCOMM channel for RFCOMM sockets
    sdp_uuid16_create(&rfcomm_uuid, RFCOMM_UUID);
    channel = sdp_data_alloc(SDP_UINT8, &rfcomm_channel);
    rfcomm_list = sdp_list_append(0, &rfcomm_uuid);
    sdp_list_append(rfcomm_list, channel);
    sdp_list_append(proto_list, rfcomm_list);

    access_proto_list = sdp_list_append(0, proto_list);
    sdp_set_access_protos(&record, access_proto_list);

    // set the name, provider, and description
    sdp_set_info_attr(&record, service_name, service_prov, svc_dsc);

    // connect to the local SDP server, register the service record,
    // and disconnect
    session = sdp_connect(&bdaddr_any, &bdaddr_local, SDP_RETRY_IF_BUSY);
    sdp_record_register(session, &record, 0);

    // cleanup
    sdp_data_free(channel);
    sdp_list_free(l2cap_list, 0);
    sdp_list_free(rfcomm_list, 0);
    sdp_list_free(root_list, 0);
    sdp_list_free(access_proto_list, 0);

    return session;
}

int read_int32(int client) 
{
    char buf[4] = { 0 };
    int bytes_read = read(client, buf, 4);

    if (bytes_read == 4) 
    {
        int length = *(int*)buf;
        printf("received-int32 [%d]\n", length);
        return length;
    }
     
    return 0;
}

int write_int32(int client, int value)
{
    char* buf = (char*)& value;
    int written = write(client, buf, 4);

    if (written == 4)
    {
        printf("written-int32 [%d]\n", 4);
        return 4;
    }

    return 0;
}

char *read_string(int client) 
{
    int len = read_int32(client);
    if (len == 0)
    {
        return nullptr;
    }
    
    char* buf = new char[len + 1];
    memset(buf, 0, sizeof(len + 1));

    int totalRead = 0;

    while (true)
    {
        int bytes_read = read(client, buf + totalRead, len * sizeof(buf[0]));
        if (bytes_read == len) 
        {
            printf("received [%s]\n", buf);
            return buf;
        }
        else if (bytes_read == 0)
        {
            delete[] buf;
            return nullptr;
        }

        len -= bytes_read;
        totalRead += bytes_read;
    }
}

int write_string(int client, char *buf, int bufLen)
{
    int written = write_int32(client, bufLen);
    if (written == 0)
    {
        return 0;
    }

    int totalWrite = 0;

    while (true)
    {
        int bytes_write = write(client, buf + totalWrite, bufLen * sizeof(buf[0]));
        if (bytes_write == bufLen)
        {
            printf("sent [%s]\n", buf);
            return totalWrite;
        }
        else if (bytes_write == 0)
        {
            delete[] buf;
            return 0;
        }

        bufLen -= bytes_write;
        totalWrite += bytes_write;
    }
}

int main()
{
    pthread_t thread_id;

    signal(SIGPIPE, SIG_IGN);

    int port = 3, result, sock, client;
    struct sockaddr_rc loc_addr = { 0 }, rem_addr = { 0 };
    char buffer[1024] = { 0 };
    socklen_t opt = sizeof(rem_addr);

    // local bluetooth adapter
    loc_addr.rc_family = AF_BLUETOOTH;
    loc_addr.rc_bdaddr = bdaddr_any;
    loc_addr.rc_channel = (uint8_t)port;

    // register service
    sdp_session_t* session = register_service((uint8_t)port);
    if (session == nullptr)
    {
        printf("SDP Service registration failed\n");
        return 1;
    }

    // allocate socket
    sock = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
    printf("socket() returned %d\n", sock);

    // bind socket to port 3 of the first available
    result = bind(sock, (struct sockaddr*) & loc_addr, sizeof(loc_addr));
    printf("bind() on channel %d returned %d\n", port, result);

    // put socket into listening mode
    result = listen(sock, 1);
    printf("listen() returned %d\n", result);

    while (1)
    {
        // accept one connection
        printf("calling accept()\n");
        client = accept(sock, (struct sockaddr*) & rem_addr, &opt);
        printf("accept() returned %d\n", client);

        ba2str(&rem_addr.rc_bdaddr, buffer);
        fprintf(stderr, "accepted connection from %s\n", buffer);
        memset(buffer, 0, sizeof(buffer));

        pthread_create(&thread_id, NULL, ThreadMain, (void*)client);
    }
}

void* ThreadMain(void* argument)
{
    pthread_detach(pthread_self());
    int client = (int)argument;

    while (true)
    {
        char* recv_message = read_string(client);
        if (recv_message == nullptr) {
            printf("client disconnected\n");
            break;
        }

        printf("%s\n", recv_message);

        write_string(client, recv_message, strlen(recv_message));

        delete[] recv_message;
    }

    printf("disconnected\n");
    close(client);

    return 0;
}

참고로 원래 소스 코드는 Serial Port 통신이 가능하도록 되어 있지만 저는 지난 글에서처럼 Socket 프로그래밍 처리를 위해 TCP_PROTOCOL_UUID 서비스를 등록하도록 바꿨습니다.

(서버 프로젝트는 DotNetSamples/Cpp/rpi/btserver github에 올려져 있습니다.)




아마도, 빌드가 완료된 (제 경우에 btserver.out) 실행 파일을 구동 시 다음과 같은 Segmentation fault 오류가 발생할 것입니다.

$ ./projects/btserver/bin/ARM/Debug/btserver.out
Registering UUID 00001101-0000-1000-8000-00805f9b34fb
Segmentation fault (또는, github 소스의 경우 "SDP Service registration failed")

문제가 되는 코드는 sdp_connect인데,

session = sdp_connect(&bdaddr_any, &bdaddr_local, SDP_RETRY_IF_BUSY);
sdp_record_register(session, &record, 0);

그 함수의 반환 값이 null인 경우 sdp_record_register가 nullptr 값을 사용하면서 segfault가 발생하는 것입니다. 이를 해결하려면 bluetoothd 데몬 실행 시 "--compat" 인자를 추가해야 하는데, "/etc/systemd/system/bluetooth.target.wants/bluetooth.service" 또는 "/etc/systemd/system/dbus-org.bluez.service" 파일을 편집기에서 열어 ExecStart 행을 다음과 같이 변경해 저장합니다.

ExecStart=/usr/lib/bluetooth/bluetoothd --compat

변경 사항을 반영하기 위해 서비스를 재시작합니다.

# systemctl daemon-reload
# systemctl restart bluetooth.service

하지만 그래도 여전히 Segmentation fault 오류가 발생할 텐데, 그 이유는 sdp_connect 함수가 bluetoothd 데몬과 통신 시 /var/run/sdp 유닉스 소켓을 사용하는데 이에 대한 권한이 없기 때문입니다.

# ls /var/run/sdp -l
srw-rw---- 1 root root 0 Aug 13 00:04 /var/run/sdp

결국 예전에 겪었던 그 현상입니다. ^^

C# - .NET Core Unix Domain Socket 사용 예제
; https://www.sysnet.pe.kr/2/0/11963

따라서 해당 유닉스 소켓에 대한 권한을 다음과 같이 조정해야 합니다.

# chmod 766 /var/run/sdp
# ls /var/run/sdp -l
srwxrw-rw- 1 root root 0 Aug 13 00:04 /var/run/sdp

그런데, 여기서 끝이 아닙니다. 또 하나의 문제는, bluetoothd가 /var/run/sdp 유닉스 소켓을 여는 것이기 때문에 해당 서비스가 재시작되면 언제나 "srw-rw----" 권한으로 초기화된다는 점입니다. "Raspberry Pi 3 블루투스 페어링 방법(bluetoothctl) 및 C언어 블루투스 서버 예제" 글에 보면, 부팅하는 시점에 적용하도록 .bashrc에 해당 명령어를 넣어 놓으면 된다고 하지만, 경우에 따라 systemctl restart를 하거나 bluetoothd 데몬이 비정상 종료해 다시 시작하는 경우라면 수작업으로 chmod 명령어를 수행해야 합니다.

그런 면을 고려했을 때, 개인적으로는 .bashrc보다는 service 파일에 직접 Post 작업으로 등록하는 것을 더 권장합니다.

ExecStart=/usr/lib/bluetooth/bluetoothd --compat
ExecStartPost=chmod 766 /var/run/sdp




준비는 모두 끝났습니다. 윈도우의 블루투스 클라이언트는 DeviceName 판정만 바꾼 지난번 예제 코드를 그대로 사용해,

private static void bluetoothComponent_DiscoverDevicesProgress(object sender, DiscoverDevicesEventArgs e)
{
    foreach (var item in e.Devices)
    {
        if (item.DeviceName != "raspberrypi")
        {
            continue;
        }

        Guid serviceUUID = BluetoothService.TcpProtocol; // new Guid("00000004-0000-1000-8000-00805F9B34FB");

        BluetoothClient bluetoothClient = new BluetoothClient();
        bluetoothClient.Connect(item.DeviceAddress, serviceUUID);

        Console.WriteLine("Connected");
        bluetoothClient.Client.WriteString("Hello");
        string result = bluetoothClient.Client.ReadString();
        Console.WriteLine(result);

        bluetoothClient.Close();
        Console.WriteLine("Closed");
    }
}

접속하면 정상적으로 소켓 통신이 되는 것을 확인할 수 있습니다.

(첨부 파일은 블루투스 C# 클라이언트 / C++ 서버 프로젝트를 함께 담고 있습니다. - github 예제의 경우 프로젝트가 분리되어 올라가 있어 혼동이 될 수 있으므로.)




참고로, raspberry pi에서의 기타 bluetooth 명령어는 help 명령어로 더 자세하게 볼 수 있습니다.

[bluetooth]# help
Menu main:
Available commands:
-------------------
advertise                                         Advertise Options Submenu
scan                                              Scan Options Submenu
gatt                                              Generic Attribute Submenu
list                                              List available controllers
show [ctrl]                                       Controller information
select <ctrl>                                     Select default controller
devices                                           List available devices
paired-devices                                    List paired devices
system-alias <name>                               Set controller alias
reset-alias                                       Reset controller alias
power <on/off>                                    Set controller power
pairable <on/off>                                 Set controller pairable mode
discoverable <on/off>                             Set controller discoverable mode
agent <on/off/capability>                         Enable/disable agent with given capability
default-agent                                     Set agent as the default one
advertise <on/off/type>                           Enable/disable advertising with given type
set-alias <alias>                                 Set device alias
scan <on/off>                                     Scan for devices
info [dev]                                        Device information
pair [dev]                                        Pair with device
trust [dev]                                       Trust device
untrust [dev]                                     Untrust device
block [dev]                                       Block device
unblock [dev]                                     Unblock device
remove <dev>                                      Remove device
connect <dev>                                     Connect device
disconnect [dev]                                  Disconnect device
menu <name>                                       Select submenu
version                                           Display version
quit                                              Quit program
exit                                              Quit program
help                                              Display help about this program
export                                            Print evironment variables




기타, 컴파일 시 다음과 같은 오류가 발생한다면,

btserver.c:8:10: fatal error: bluetooth/bluetooth.h: No such file or directory
 #include <bluetooth/bluetooth.h>
          ^~~~~~~~~~~~~~~~~~~~~~~

libbluetooth-dev를 설치하면 해결됩니다.

# apt install libbluetooth-dev




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 5/4/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 16  17  18  19  [20]  21  22  23  24  25  26  27  28  29  30  ...
NoWriterDateCnt.TitleFile(s)
13123정성태9/8/20227416.NET Framework: 2046. C# 11 - 멤버(속성/필드)에 지정할 수 있는 required 예약어 추가
13122정성태8/26/20227419.NET Framework: 2045. C# 11 - 메서드 매개 변수에 대한 nameof 지원
13121정성태8/23/20225426C/C++: 157. Golang - 구조체의 slice 필드를 Reflection을 이용해 변경하는 방법
13120정성태8/19/20226883Windows: 209. Windows NT Service에서 UI를 다루는 방법 [3]
13119정성태8/18/20226429.NET Framework: 2044. .NET Core/5+ 프로젝트에서 참조 DLL이 보관된 공통 디렉터리를 지정하는 방법
13118정성태8/18/20225355.NET Framework: 2043. WPF Color의 기본 색 영역은 (sRGB가 아닌) scRGB [2]
13117정성태8/17/20227449.NET Framework: 2042. C# 11 - 파일 범위 내에서 유효한 타입 정의 (File-local types)파일 다운로드1
13116정성태8/4/20227917.NET Framework: 2041. C# - Socket.Close 시 Socket.Receive 메서드에서 예외가 발생하는 문제파일 다운로드1
13115정성태8/3/20228283.NET Framework: 2040. C# - ValueTask와 Task의 성능 비교 [1]파일 다운로드1
13114정성태8/2/20228419.NET Framework: 2039. C# - Task와 비교해 본 ValueTask 사용법파일 다운로드1
13113정성태7/31/20227650.NET Framework: 2038. C# 11 - Span 타입에 대한 패턴 매칭 (Pattern matching on ReadOnlySpan<char>)
13112정성태7/30/20228074.NET Framework: 2037. C# 11 - 목록 패턴(List patterns) [1]파일 다운로드1
13111정성태7/29/20227891.NET Framework: 2036. C# 11 - IntPtr/UIntPtr과 nint/nuint의 통합파일 다운로드1
13110정성태7/27/20227933.NET Framework: 2035. C# 11 - 새로운 연산자 ">>>" (Unsigned Right Shift)파일 다운로드1
13109정성태7/27/20229264VS.NET IDE: 177. 비주얼 스튜디오 2022를 이용한 (소스 코드가 없는) 닷넷 모듈 디버깅 - "외부 원본(External Sources)" [1]
13108정성태7/26/20227340Linux: 53. container에 실행 중인 Golang 프로세스를 디버깅하는 방법 [1]
13107정성태7/25/20226548Linux: 52. Debian/Ubuntu 계열의 docker container에서 자주 설치하게 되는 명령어
13106정성태7/24/20226191오류 유형: 819. 닷넷 6 프로젝트의 "Conditional compilation symbols" 기본값 오류
13105정성태7/23/20227477.NET Framework: 2034. .NET Core/5+ 환경에서 (프로젝트가 아닌) C# 코드 파일을 입력으로 컴파일하는 방법 - 두 번째 이야기 [1]
13104정성태7/23/202210545Linux: 51. WSL - init에서 systemd로 전환하는 방법
13103정성태7/22/20227126오류 유형: 818. WSL - systemd-genie와 관련한 2가지(systemd-remount-fs.service, multipathd.socket) 에러
13102정성태7/19/20226539.NET Framework: 2033. .NET Core/5+에서는 구할 수 없는 HttpRuntime.AppDomainAppId
13101정성태7/15/202215379도서: 시작하세요! C# 10 프로그래밍
13100정성태7/15/20227928.NET Framework: 2032. C# 11 - shift 연산자 재정의에 대한 제약 완화 (Relaxing Shift Operator)
13099정성태7/14/20227782.NET Framework: 2031. C# 11 - 사용자 정의 checked 연산자파일 다운로드1
13098정성태7/13/20226058개발 환경 구성: 647. Azure - scale-out 상태의 App Service에서 특정 인스턴스에 요청을 보내는 방법 [1]
... 16  17  18  19  [20]  21  22  23  24  25  26  27  28  29  30  ...