embeded/raspberry pi2015. 7. 17. 10:52

전에 쓴적이 있던가?

아무튼.. 지금글을 보고 있노라니..

국제화 관련 설정에서

gb가 기본값이었던거 같은데..

영국에서 만든게 왜...중국이 기본값이 된걸까?

+

2017.09.12

gb는 영국임. Great Britain



키보드 레이아웃은 집에가서 테스트 해봐야지 ..



[링크 : http://raspberrypi.stackexchange.com/questions/1042/why-is-my-symbol-not-working]


~!@#$%^&*()_+| 를 입력한 화면 확실히 먼가 이상하게 나온다.

프랑이라던가? 이.. 미묘한 기호순서라니!

XKBLAYOUT을 gb에서 us로 바꾸고

pi@raspberrypi ~ $ sudo cat /etc/default/keyboard

# KEYBOARD CONFIGURATION FILE


# Consult the keyboard(5) manual page.


XKBMODEL="pc105"

XKBLAYOUT="gb"

XKBVARIANT=""

XKBOPTIONS=""


BACKSPACE="guess" 


setupcon을 해주면 빠르게 설정이 된다는데 ssh나 터미널로는 안된다

pi@raspberrypi ~ $ sudo setupcon

We are not on the console, the console is left unconfigured. 


pi@raspberrypi ~ $ sudo service lightdm stop

ctrl -alt - f1

pi@raspberrypi ~ $ sudo setupcon


아무튼 리부팅 하고 오니

~!@#$%^&*()_+| 

원하는대로 잘 나온다.



Posted by 구차니
개소리 왈왈/블로그2015. 7. 16. 22:11

영.. 회복이 안되네.. -_-

그래도 막 3000~4000 오던게

2000 이하로 ㅋㅋㅋ


그래도 네이버 비율이 그리 낮아지지 않았다는게 참.. 슬프다 -_-

구글 비율이 좀 오르고 전체 방문자가 늘면 좋으련만..



머.. 6월 부터는 계속 2000명대네 ㅋㅋ

방학이라 그런건가?!

'개소리 왈왈 > 블로그' 카테고리의 다른 글

기분전환겸 스킨 변경  (0) 2015.09.04
네이버가.. 50% 돌파?  (2) 2015.07.31
출장여파 ㅋㅋㅋ  (0) 2015.07.12
댓글 알림은 있는데 댓글이 사라졌다?  (4) 2015.06.11
한RSS 역사의 뒤안길로..  (0) 2015.05.14
Posted by 구차니

2014년을 넘겼어!!

전시회 할거야!! 라는 기분? ㅋㅋㅋ





[링크 : http://www.seouladex.com/]

'개소리 왈왈 > 2015 에어쇼' 카테고리의 다른 글

ADEX 2015  (0) 2015.10.27
ADEX 2015 사진은 .. 나중에 ㅠㅠ  (0) 2015.10.25
Posted by 구차니
파일방2015. 7. 15. 12:56

NAS 프로그램인데

라즈베리용도 있다. ㄷㄷ

(그런데 라즈베리 USB 하드라서 속도가 안날텐데.. 게다가 USB로 랜이라...)


[링크 : http://www.openmediavault.org/]

[링크 : http://sourceforge.net/projects/openmediavault/files/]

    [링크 : http://blog.naver.com/mol70/220284425344]

'파일방' 카테고리의 다른 글

HelpNDoc  (0) 2015.07.29
goahead 웹 서버  (0) 2015.07.19
freetype / jam  (0) 2015.06.25
knime - 빅데이터 분석툴  (0) 2015.05.28
redmine / 레드마인  (0) 2015.04.14
Posted by 구차니
프로그램 사용/gcc2015. 7. 14. 16:59


$ cat size.c
#include <stdio.h>
#include <stdint.h>

void main()
{
        int a;
        int64_t b;

        printf("%d\n", sizeof(a));
        printf("%d\n", sizeof(b));

} 


$ ./a.out

4
8


+

#include <stdint.h>를 넣지 않으면 에러가 발생한다.

$ gcc size.c

size.c: In function ‘main’:

size.c:6:2: error: unknown type name ‘int64_t’


2013/01/13 - [프로그램 사용/gcc] - gcc 64bit 확장


Posted by 구차니
프로그램 사용/gcc2015. 7. 14. 16:47

나중에 리눅스 서버 하나 다시 만들어서 해봐야지


These -m switches are supported in addition to the above on AMD x86-64 processors in 64-bit environments.


-m32

-m64

Generate code for a 32-bit or 64-bit environment. The 32-bit environment sets int, long and pointer to 32 bits and generates code that runs on any i386 system. The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and generates code for AMD's x86-64 architecture. 


[링크 : https://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/i386-and-x86-64-Options.html]


64bit 우분투에서 빌드 하려니 에러가 발생한다. multilib을 설치하라는데..

$ gcc -m32 void.c

In file included from /usr/include/stdio.h:28:0,

                 from void.c:1:

/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory

compilation terminated.


$ sudo apt-get install gcc-multilib

[링크 : http://uce.uniovi.es/tips/Programming/Cpp/forc32bitscompilation.html] 

[링크 : http://stackoverflow.com/questions/22355436/how-to-compile-32-bit-apps-on-64-bit-ubuntu]


'프로그램 사용 > gcc' 카테고리의 다른 글

gcc에서 precompiled header 사용하기  (0) 2015.07.29
gcc 64bit 변수 선언하기  (0) 2015.07.14
gcc 특정 표준 따르도록 강제하기  (0) 2015.07.14
크기가 0인 배열 허용  (0) 2015.06.29
ubuntu gcc가 바보  (2) 2013.09.19
Posted by 구차니
프로그램 사용/gcc2015. 7. 14. 16:34


-ansi

In C mode, this is equivalent to -std=c90. In C++ mode, it is equivalent to -std=c++98.


-std=

A value for this option must be provided; possible values are

‘c90’

‘c89’

‘iso9899:1990’

Support all ISO C90 programs (certain GNU extensions that conflict with ISO C90 are disabled). Same as -ansi for C code. 

‘iso9899:199409’

ISO C90 as modified in amendment 1. 

‘c99’

‘c9x’


[링크 : https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html]

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc 64bit 변수 선언하기  (0) 2015.07.14
gcc 32bit/ 64bit 컴파일하기  (0) 2015.07.14
크기가 0인 배열 허용  (0) 2015.06.29
ubuntu gcc가 바보  (2) 2013.09.19
gcc 64bit 확장  (0) 2013.01.13
Posted by 구차니
Programming/C Win32 MFC2015. 7. 14. 16:07



$ gcc -v

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 


$ vi void.c

#include <stdio.h>


void main()

{

        void *fp;

        int a = 0;

        fp = &a;


        printf("sizeof(void) %d\n",sizeof(void));

        printf("fp %8X\n",fp);

        fp++;

        printf("fp %8X\n",fp);

} 

(남자니까) 경고따윈 무시한다!

$ gcc void.c

void.c: In function ‘main’:

void.c:9:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat]

void.c:10:2: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘void *’ [-Wformat]

void.c:12:2: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘void *’ [-Wformat]


어? 연산이 되네? ㄷㄷㄷ 일단은 byte로 간주..

어? 게다가.. 왜 void의 sizeof가 1?

$ ./a.out
sizeof(void) 1
fp E9F5689C
fp E9F5689D


+

6.23 Arithmetic on void- and Function-Pointers


In GNU C, addition and subtraction operations are supported on pointers to void and on pointers to functions. This is done by treating the size of a void or of a function as 1.


A consequence of this is that sizeof is also allowed on void and on function types, and returns 1.


The option -Wpointer-arith requests a warning if these extensions are used.


[링크 : https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html]


+

Compiler Error CS0242

The operation in question is undefined on void pointers

Incrementing a void pointer is not allowed. For more information, see Unsafe Code and Pointers (C# Programming Guide).

[링크 : https://msdn.microsoft.com/en-us/library/dhyat531(v=vs.90).aspx] 


'Programming > C Win32 MFC' 카테고리의 다른 글

rand()와 RAND_MAX  (0) 2015.10.05
Cppcheck  (0) 2015.09.30
가변인자를 다시 넘겨주기  (2) 2015.07.07
printf 가변인자의 비밀?  (0) 2015.06.18
gcc 컴파일러 -D 옵션  (0) 2015.05.19
Posted by 구차니
프로그램 사용/Putty2015. 7. 14. 14:21

putty를 통해서 CR+LF로 전송이 가능한가 했더니..

보이는 부분에 대해서만 가능한 듯...

기본적으로 putty는 \n 만 보내는 것으로 보인다.



LF는 line feed - \n 으로 대개 표기되며

CR은 carriage return - \r 로 대개 표기된다.


4.3.3 ‘Implicit CR in every LF’

Most servers send two control charactersCR and LF, to start a new line of the screen. The CR character makes the cursor return to the left-hand side of the screen. The LF character makes the cursor move one line down (and might make the screen scroll).

Some servers only send LF, and expect the terminal to move the cursor over to the left automatically. If you come across a server that does this, you will see a stepped effect on the screen, like this:

First line of text
                  Second line
                             Third line

If this happens to you, try enabling the ‘Implicit CR in every LF’ option, and things might go back to normal:

First line of text
Second line
Third line

4.3.4 ‘Implicit LF in every CR’

Most servers send two control characters, CR and LF, to start a new line of the screen. The CR character makes the cursor return to the left-hand side of the screen. The LF character makes the cursor move one line down (and might make the screen scroll).

Some servers only send CR, and so the newly written line is overwritten by the following line. This option causes a line feed so that all lines are displayed.


[링크 : http://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter4.html]


'프로그램 사용 > Putty' 카테고리의 다른 글

ssh X11 forwarding 속도 향상.. 2?  (0) 2016.02.03
putty chrome socks5 / dns remote  (0) 2014.12.18
putty로 proxy 설정하기 (socks5 + firefox)  (0) 2014.12.17
linux용 putty  (2) 2011.09.21
putty를 이용한 vnc 터널링  (1) 2011.06.21
Posted by 구차니

음.. 막상해보려니 125KHz 카드가 없다...

신용카드의 교통카드는.. 125KHz가 아니라 무리려나?

나중에 다른 카드 생기면 해봐야 할 듯.. ㅠㅠ


Voltage: 4.75-5.25V

Working Frequency: 125 KHz

Sensing Distance(Max): 70mm

TTL Output: 9600 baudrate, 8 data bits, 1 stop bit, and no verify bit

Wiegand Output: 26 bits Wiegand format, 1 even verify bit, 24 data bits, and 1 odd verify bit

[링크 : http://www.seeedstudio.com/wiki/Grove_-_125KHz_RFID_Reader] 


125Khz  EM카드

저렴하고 광범위하게 사용되고 있는카드


13.56Mhz MF카드

카드의 데이터값을 수정할 수 있으며

교통카드가 대표적인 MF카드임.

[링크 : http://korearfidtag.com/] 


+

2015.07.14

9600bps로 UART 모드 설정시 그냥 읽히는데..

putty 특성상 출력 안되는건 패스하니까 log로 분석


위는 카드에 써있는 숫자

아래는 읽힌 데이터

일치하진 않네...


인식해서 날아오는데 까지 약 1초 정도 소요되는 듯.



카드에 기재된 거랑 동일하게 읽히진 않네...



'하드웨어 > rfid_nfc_smartcard' 카테고리의 다른 글

rfid, smart card reader  (0) 2025.02.12
ubunut smart card 읽기  (0) 2025.02.12
ATR (Answer To Reset)  (0) 2025.02.12
rfid 12.5M / 125k  (0) 2024.07.25
의약품 RFID  (0) 2023.09.12
Posted by 구차니