참고 사이트
https://sudarlife.tistory.com/entry/flutter-20-fvm%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%B4%EC%84%9C-%EC%B6%A9%EB%8F%8C%EC%97%86%EC%9D%B4-%ED%94%8C%EB%9F%AC%ED%84%B0-20-%EC%84%B8%ED%8C%85%ED%95%98%EA%B8%B0-VSCode?category=1176193
https://www.youtube.com/watch?v=Ank_4m5vwCc&t=14s

Windows PowerShell(관리자) 사용
 윈도우+x → a
 또는
 시작 → 마우스우클릭 → Windows PowerShell(관리자)(A) 선택

1) dart 버전확인
> dart --version¶

2) FVM install
> dart pub global activate fvm¶
Activated fvm 1.3.7 표시

3) FVM PATH 설정
사용자변수 → Path 추가
https://dart.dev/tools/pub/cmd/pub-global#running-a-script 참고
ex) C:\Users\afewgood\AppData\Local\Pub\Cache\bin

4) 터미널(Windows PowerShell) 재실행

5) fvm.bat help실행
> fvm.bat help¶
Run "fvm help <command>" for more information about a command. 표시

6) flutter 버전확인
> flutter --version¶
Flutter 1.22.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9b2d32b605 (6 months ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5
표시됨

사용방법

7) flutter 버전설치
 - https://flutter.dev/docs/development/tools/sdk/releases 참고하여 원하는 버전 설치
ex) > fvm.bat install 2.0.2¶

Installing version: 2.0.2
Cloning into 'C:\Users\afewgood\fvm\versions\2.0.2'...
remote: Enumerating objects: 286632, done.
remote: Total 286632 (delta 0), reused 0 (delta 0), pack-reused 286632
Receiving objects: 100% (286632/286632), 131.62 MiB | 19.04 MiB/s, done.
Resolving deltas: 100% (220685/220685), done.
Updating files: 100% (5202/5202), done.
Version installed: 2.0.2
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ...
Building flutter tool...
Running pub upgrade...
Flutter 2.0.2 • channel unknown • unknown source
Framework • revision 8962f6dc68 (4 months ago) • 2021-03-11 13:22:20 -0800
Engine • revision 5d8bf811b3
Tools • Dart 2.12.1
표시됨(설치완료)

8) 설치 확인
> fvm.bat list¶
Versions path:  C:\Users\afewgood\fvm\versions
2.0.2
표시됨(설치완료)

9) 프로젝트 생성
  ex) fvm_test
프로젝트 생성 후
- Visual Studio Code ---------------------------------------------------------
File → Preference → Settings → Extensions → Dart & Flutter → Edit in settings.json → 편집
"dart.analyzerInstrumentationLogFile": null 윗줄에 위의 7)의 Versions path 내용 추가
"dart.flutterSdkPaths":["C:\\Users\\afewgood\\fvm\\versions"], 추가 후 저장 //윈도우는 경로지정시 \\ 해야함.
View → Command Palette.. → Flutter: Change SDK 선택 → Flutter SDK 2.0.2 표시됨 → Flutter SDK 2.0.2선택
자동으로 소스 analysing 진행(?)됨
Visual Studio Code 하단에 Flutter:2.0.2 확인

- 안드로이드 스튜디오 -----------------------------------------------------
File → Settings → Languages & Frameworks →
 Dart → Dart SDK path: C:\Users\afewgood\fvm\versions\2.0.2\bin\cache\dart-sdk 경로선택
 Flutter → Flutter SDK path: C:\Users\afewgood\fvm\versions\2.0.2 경로선택

10) pubspec.yaml 파일 수정
environment:
  sdk: ">=2.7.0 <3.0.0" 을
  sdk: ">=2.12.0 <3.0.0" 로 변경 후 저장

11) main.dart 오류 수정 (원인은 Null Safety)
MyHomePage({Key key, this.title}) : super(key: key); 를
MyHomePage({Key? key, this.title=""}) : super(key: key); 으로 변경

Posted by afewgood
,

리눅스 usb mount 예제

c 2021. 7. 20. 15:02

[afewgood@ubuntu]# mount -t vfat /dev/sda1 /mnt/usbmem
[afewgood@ubuntu]## cd /mnt/usbmem/

{
    int result;
    char chCmd[128];

    //mount
    result = mount("/dev/sda1", "/mnt/usbmem", "vfat", MS_RDONLY, NULL);
    memset(chCmd, 0x00, sizeof(chCmd));
    strcpy(chCmd, "cp /mnt/usbmem/5.png /images/blue/default_type.png");
    system(chCmd);
    sync();

    //umount
    result = umount("/mnt/usbmem");
}

'c' 카테고리의 다른 글

리눅스 IP충돌 체크  (0) 2022.09.08
리눅스 정규식을 이용한 IP / Email 주소 체크  (0) 2022.09.06
구조체 배열 인자로 넘겨서 채우기  (0) 2022.08.11
ASCII & 한글 완성형(KSC5601) 출력 소스  (0) 2021.07.08
C관련Etc...  (0) 2021.06.17
Posted by afewgood
,

관리자페이지 접속방법
PC의 IP가 192.168.55.35 이면 192.168.55.1로 접속
ID: admin
암호: WAN주소뒤6자리_admin [7B153B_admin]

브릿지모드로 변경
[네트워크] → [WAN] 페이지에서 NAT를 브릿지로 변경 → [모뎀자동재시작]
이후 관리자 페이지 접속 불가

복구
초기화버튼을 핀으로 몇초간 꾸욱 눌렀다 떼면 원상태로 복구됨

'etc' 카테고리의 다른 글

teraterm에서 sz/rz 사용법  (0) 2022.07.04
안드로이드스튜디오 맞춤법 검사 해제  (0) 2021.08.13
VirtualBox 관련  (0) 2021.07.19
libpng warning: 해결방법  (0) 2021.06.17
VirtualBox Guest OS 바로가기 생성  (0) 2019.12.26
Posted by afewgood
,

01_ifconfig 명령으로 사용가능한 네트워크 장치 확인
[afewgood@ubuntu]# ifconfig

02_유선 랜 장치를 비활성화하고 무선 랜 장치를 활성화 한다. 
[afewgood@ubuntu]# ifconfig eth0 down
[afewgood@ubuntu]# ifconfig wlan0 up

03_wpa_supplicant 명령을 사용하려면 wpa_supplicant.conf가 필요하다. 
이를 위해 우선 psk키를 생성한다.(최초 1회)
- wpa_passphrase ssid_name ssid_password > wpa_supplicant.conf
[afewgood@ubuntu]# wpa_passphrase AFewGood 12345 > /etc/wpa_supplicant.conf

04_SSID 접속
[afewgood@ubuntu]# iwconfig wlan0 essid "AFewGood"

05_wpa_supplicant 실행
[afewgood@ubuntu]# wpa_supplicant -D wext -B -i wlan0 -c /etc/wpa_supplicant.conf
 -D wext = Linux wireless extensions (generic)
 -B = run daemon in the background
 -i = interface name
 -c = Configuration file

06_ifconfig 명령으로 사용가능한 네트워크 장치 확인
[afewgood@ubuntu]# ifconfig

07_dhcp실행
[afewgood@ubuntu]# udhcpc -i wlan0

'linux' 카테고리의 다른 글

특정 이름을 가진 프로세스 죽이기  (0) 2022.04.14
ssh dns disable  (0) 2022.01.12
VirtualBox Ubuntu14.04 설치 시 참고사항  (0) 2021.07.08
cross compiler 설치 후  (0) 2020.08.27
sudo 명령어 패스워드 없이 사용하기  (0) 2019.12.30
Posted by afewgood
,

VirtualBox 관련

etc 2021. 7. 19. 22:40

01) Guest OS 바로가기 생성 virtualbox를 실행하지 않고, 바로 GuestOS를 실행시킬수 있는 방법
바탕화면 --> 마우스우클릭 --> 바로가기 만들기 ->
대상 "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm Image_Name ->
  ex)"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "Ubuntu14.04"
시작위치 "C:\Program Files\Oracle\VirtualBox"
출처: http://blog.bagesoft.com/867

03) VirtualBox 가상디스크(.vdi) 사이즈 확장 시키기
환경: C:\Users\mjLee\VirtualBox VMs\Windows7\Windows7.vdi
C:\Program Files\Oracle\VirtualBox> VBoxManage modifyhd "C:\Users\mjLee\VirtualBox VMs\Windows7\Windows7.vdi" --resize 40960
==> 가상디스크의 형식이 고정크기인 경우
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize medium operation for this format is not implemented yet! 
오류 메시지 발생

04) 가상 디스크 형식 변환
고정에서 동적으로 변환하는 명령
//VBoxManage.exe clonemedium disk "C:\path\to\source.vdi" "C:\path\to\destination.vdi" -variant Standard
Ex) C:\Program Files\Oracle\VirtualBox> VBoxManage.exe clonemedium disk "C:\Users\mjLee\VirtualBox VMs\Windows7\Windows7.vdi" "C:\Users\mjLee\VirtualBox VMs\Windows7_Variant\Windows7_Variant.vdi" -variant Standard
출처: http://slic.tistory.com/1381

 ※ 가상디스크의 사이즈 확장 실행

동적에서 고정으로 변환하는 명령
//VBoxManage.exe clonemedium disk "C:\path\to\source.vdi" "C:\path\to\destination.vdi" -variant Fixed
Ex) C:\Program Files\Oracle\VirtualBox> VBoxManage.exe clonemedium disk "C:\Users\mjLee\VirtualBox VMs\Windows7_Variant\Windows7_Variant.vdi" "C:\Users\mjLee\VirtualBox VMs\Windows7_Fixed\Windows7_Fixed.vdi" -variant Fixed

※ Oracle VM VirtualBox 실행 → 이미지선택 → 우클릭 → 설정 → 저장소 → 새로생성된 .vdi파일로 교체

가상OS: 제어판 → 시스템 및 보안 → 관리도구 → 하드 디스크 파티션 만들기 및 포맷 → C드라이브 선택 → 우클릭 → 볼륨확장 → 볼륨확장 마법사 시작 → 다음 → 다음 → 마침

virtual box에 기존 vdi 사용하기
새로만들기 → 이름(ex. Ubuntu14.04) → 다음 → 기존 가상 하드디스크 파일 사용→ 기존 vdi파일 복사 (위치: C:\Users\afewgood\VirtualBox VMs\Ubuntu14.04\ 복사)  → 기존vdi파일 불러오기

Posted by afewgood
,

01. virtualbox 가상이미지생성
02. virtualbox 네트워크 --> 어댑터에 브릿지 --> 랜카드 선택

03. ubuntu14.04 server설치 (설치시 모두 default값 선택)
    - Full name for the new user: 입력하지 않아도 됨 (사용자의 이름)
    - host name: ubuntu / account: afewgood / password: ubuntu
    - Encrypt your home directory? --> No 선택
    - Partition disks
      --> Guided - use entire disk 선택
      --> Write the changes to disk? --> Yes선택
    - HTTP proxy --> continue선택
    - Software selection --> OpenSSH server / Samba file server 선택

04. 설치 완료 후 업데이트진행
ubuntu 버전정보 확인:
  [root@ubuntu]# lsb_release -a¶
  [root@ubuntu]# grep . /etc/*-release¶
  [root@ubuntu]# cat /etc/*-release | uniq¶
[root@ubuntu]# apt-get upgrade¶

05. ~/.bashrc 편집
[root@ubuntu]# vi ~/.bashrc¶
약 62번째 라인
#Modify by afewgood     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 를
PS1='${debian_chroot:+($debian_chroot)}[\u@\h \W]# ' 으로 변경

06. vi편집기 줄번호 및 한글 표시
[root@ubuntu]# vi ~/.vimrc¶
set fenc=euc-kr
set fencs=euc-kr,utf-8
set nu

07. 서버 고정IP 설정
[root@ubuntu]# vi /etc/network/interfaces
iface eth0 inet dhcp 를
iface eth0 inet static
address 192.168.0.253
subnetmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 168.126.63.1 168.126.63.2
로 변경

08. 사용자 ID추가
[root@ubuntu]# useradd -m tuesday //-m 사용자 디렉토리도 같이 만든다
[root@ubuntu]# passwd tuesday

[root@ubuntu]# userdel -rf tuesday  //-r: 계정 삭제시 홈디렉토리 포함 모든정보 삭제  -f: 강제삭제

09. shell 변경
# shell의 링크 상태 확인
[root@ubuntu]# ls -ahl /bin/sh
[root@ubuntu]# /bin/sh -> dash
#shell을 bash로 링크
[root@ubuntu]# unlink /bin/sh
[root@ubuntu]# ln -s /bin/bash /bin/sh
#shell 원상복구
[root@ubuntu]# unlink /bin/sh
[root@ubuntu]# ln -s dash /bin/sh

※(추천) 또는 /etc/passwd 파일의 계정에 /bin/bash 추가
ex) tuesday:x:1001:1001::/home/tuesday:/bin/bash

10. 사용자 root권한 추가
 - sudoers 파일 수정
[root@ubuntu]# visudo -f /etc/sudoers
root ALL=(ALL:ALL) ALL 밑에 줄에
tuesday ALL=(ALL:ALL) ALL 추가
하거나 /etc/group파일에서 sudo 항목에 tuesday추가

11. samba 설정
- 사용자 추가: 시스템 계정(/etc/passwd)에 등록된 사용자만 등록 가능함.
 $ sudo smbpasswd -a [계정명]
 [root@ubuntu]# smbpasswd -a tuesday
- 사용자 삭제
$ sudo smbpasswd -x [계정명]
[root@ubuntu]# smbpasswd -x tuesday

- samba 설정(변경) / 다른사람 계정 폴더 감추기
[root@ubuntu]# vi /etc/samba/smb.conf
[homes]
    comment = Home Directories
    read only = No
    browseable = No

browseable=no
추가

- samba서버 재시작
$ sudo /etc/init.d/smbd restart
 [root@ubuntu]# /etc/init.d/smbd restart

√ 윈도우에서 리눅스장치 접근
윈도우 버튼+R ==> \\192.168.0.XXX
조직의 보안 정책에서 인증되지 않은 게스트 액세스를 차단하므로 이 공유 폴더에 액세스 할 수 없습니다.
해결 방법
Window+R gpedit.msc <확인>
그룹정책 편집기 - 컴퓨터 구성 - 관리 템플릿 - 네트워크 - Lanman 워크스테이션 을 선택
보안되지 않은 게스트 로그온 사용에서 더블클릭 - 설정 창이 나오면 좌측 상단의 사용을 선택 후 - 확인

12. Cross Compiler 설치
gcc 설치:
  [root@ubuntu]# apt-get install gcc
make 설치: [root@ubuntu]# apt-get install make
64bit환경에서 32bit컴파일러를 사용하기 위해서...
[root@ubuntu]# apt-get install lib32ncurses5 lib32z1
[root@ubuntu]# apt-get install libmpc-dev:i386

13. nfs서버 설치
mkdir /계정명/nfs
chmod 755 /계정명/nfs
[root@ubuntu]# sudo apt-get install nfs-common nfs-kernel-server
- nfs서버 설정
[root@ubuntu]# vi /etc/exports
/home/계정명/nfs *(rw,sync,no_subtree_check,no_root_squash,insecure)
nfs서버 재시작
[root@ubuntu]# /etc/init.d/nfs-kernel-server restart
//장치에서 nfs서버 접속

'linux' 카테고리의 다른 글

ssh dns disable  (0) 2022.01.12
EmbeddedLinux 무선랜 사용  (0) 2021.07.20
cross compiler 설치 후  (0) 2020.08.27
sudo 명령어 패스워드 없이 사용하기  (0) 2019.12.30
Linux 명령어 모음 ...ing  (0) 2019.10.16
Posted by afewgood
,

{
    int i;
    //int x=0, y=0;
    //int w, h;
    char string[4]={0,};

    printf("ascii[95] display\n");
    for(i=32; i<127; i++)
    {
        string[0] = i;
        printf("[0x%02x]%s\n", string[0], string);
    }

    printf("hangul_wan[2350] test\n");
    for(i=0xb0a0; i<=0xc8fe; i++)
    {
        char third=(i>>4)&0x000f;
        if(third < 10)    continue;    //두번째 바이트의 상위 nibble은 A~F의 값을 가진다.

        string[0] = i>>8;
        string[1] = i&0x00ff;

        if(string[1]==0xa0 || string[1]==0xff)    continue;    //두번째 바이트의 값이 0xa0 이거나 0xff인 경우 한글 코드 존재하지 않음
        printf("[%#.04x]%s\n", i, string);

/*
        LCD_GetTextSize(string, &w, &h);       
        if(x >= (LCD_WIDTH_PIXEL-w))
        {
            x = 0;
            y += h;
        }

        if(y >= (LCD_HEIGHT_PIXEL-h))
        {
            y = 0;
            KBD_GetCh();
            LCD_Clear();
        }

        LCD_GotoXY(x, y);
        LCD_PutCh(i);
        LCD_Where((unsigned int*)&x, (unsigned int*)&y);
*/
    }
}

'c' 카테고리의 다른 글

리눅스 IP충돌 체크  (0) 2022.09.08
리눅스 정규식을 이용한 IP / Email 주소 체크  (0) 2022.09.06
구조체 배열 인자로 넘겨서 채우기  (0) 2022.08.11
리눅스 usb mount 예제  (0) 2021.07.20
C관련Etc...  (0) 2021.06.17
Posted by afewgood
,

C관련Etc...

c 2021. 6. 17. 11:40

01) Endian check
int endian(void)
{
int i = 0x00000001;

if (((char*)&i)[0])
return LITTLE_ENDIAN;
else
return BIG_ENDIAN;
}

02) .h파일 만들기
#ifndef __FILE_NAME_H__
#define __FILE_NAME_H__

#ifdef __cplusplus
extern "C"{
#endif

#define SYS_ENDIAN_BIG 0
#define SYS_ENDIAN_LITTLE 1

int endian(void);

#ifdef __cplusplus
}
#endif

#endif

03) 헤더파일은 컴파일 되는 것이 아니라 .c가 컴파일 되기 전에 전처리과정을 중 소스 내에 필요한 내용을 삽입하는 역할을 한다. 다만 global 변수를 헤더파일에 선언할 경우, 여러 소스파일에서 해당 변수를 사용할 때 컴파일러는 하나의 변수로 link하지 못하고 중복선언으로 알게된다. 따라서 초기화할 소스파일(.c)에서 선언을 하고 다른 소스파일에서는 extern으로 변수를 가져와서 사용해야 한다  
04) typedef
typedef가 하는 일은 기존의 Data형으로 새로운 Data형을 만드는 것.

Posted by afewgood
,

libpng warning: 해결방법

etc 2021. 6. 17. 11:01

libpng warning: iCCP: known incorrect sRGB profile
포토샵 실행 --> 이미지파일(.png) 열기
편집(Edit) --> 프로파일 할당(Assign Profile)... --> 이 문서의 색상관리 안함(Don't Color Manage This Document) 선택


libpng warning: Interlace handling should be turned on when using png_read_image
https://pixlr.com/kr/e/ 사이트에서 PNG 파일 새로 저장

'etc' 카테고리의 다른 글

SK브로드밴드 H614G 모뎀 설정  (0) 2021.07.20
VirtualBox 관련  (0) 2021.07.19
VirtualBox Guest OS 바로가기 생성  (0) 2019.12.26
openssl을 이용한 RSA 개인키 공개키 생성  (0) 2019.11.12
CR(Carriage Return) / LF(Line Feed)  (0) 2019.09.04
Posted by afewgood
,

[Dart] 진법변환

flutter & dart 2021. 6. 16. 23:38

import "dart:math";

void main() {

//진법변환 (10진수를 16진수로)
int decimal = 64435;
String convHex = decimal.toRadixString(16);
print(convHex);

//진법변환 (16진수를 10진수로)
final fullString = "001479B70054DB6E001475B3";
for(int i=0; i<=fullString.length-8; i+=8) {
final hex = fullString.substring(i, i+8);
final number = int.parse(hex, radix: 16);
print(number);
}

}

Posted by afewgood
,