[링크 : http://yoon-talk.tistory.com/110]

[링크 : http://son10001.blogspot.com/2015/08/fontforge.html] font forge 사용예

[링크 : http://blog.naver.com/etwas0227/60194746811] font creator 관련 강좌 모음?



2013/02/14 - [파일방] - fontforge - 벡터 폰트 제작기


응? ㅋㅋㅋㅋ


영문 94자, 특수기호 990자(or 약 2,000자), 한글 2,350자(or 11,172자)

이렇게 들어있는 것을 확인할 수 있다.

하루에 100자씩 만들수 있다면 약 35일이면 완성가능! 

[링크 : https://ko-kr.facebook.com/wefont/posts/278086472388929]



한글 폰트의 구성

[링크 : http://yoon-talk.tistory.com/217]

'모종의 음모 > 폰트 생성기' 카테고리의 다른 글

한글의 구성  (2) 2017.07.26
opentype font format  (0) 2017.07.26
fontforge - 벡터 폰트 제작기  (0) 2013.02.14
Posted by 구차니

이번에 wannacry 패치 하고나서 달라진건가..

받기만 간헐적으로 잘 안되는 것에서

보내기도 잘 안되네? ㅠㅠ


[링크 : https://msdn.microsoft.com/en-us/library/ff802693.aspx]

[링크 : http://blog.naver.com/wlgns_sjh/102660887] 번역본

[링크 : https://www.codeproject.com/Articles/8860/Non-Overlapped-Serial-Port-Communication-using-Win]


2017/04/06 - [Programming/C / Win32 / MFC] - mfc readfile timeout 설정



+

CString '0x00' append 문제 ㅠㅠ

Posted by 구차니

간단요약.

COM3의 경우 윈도우에서 시리얼 마우스로 자동 탐지를 하는데

USB to RS232 등을 COM3로 사용시

M이나 B를 인식하면서 마우스 클릭하거나 이상하게 이동하는 문제가 발생을 한다.


시리얼 마우스 서비스를 종료하거나

해당 포트를 열거하지 않도록 함으로서 해결 가능


[링크 : http://stackoverflow.com/questions/9226082/device-misdetected-as-serial-mouse]

[링크 : http://www.taltech.com/support/entry/windows_2000_nt_serial_mice_and_missing_com_port]

[링크 : http://www.sealevel.com/.../How-to-fix-crazy-mouse-syndrome-with-USB-serial-adapters.html]

'모종의 음모 > Win32 시리얼' 카테고리의 다른 글

MFC 시리얼 포트 관련  (0) 2017.05.17
mfc readfile timeout 설정  (0) 2017.04.06
mfc win32 시리얼  (0) 2017.04.05
시리얼 baudrate 목록  (0) 2017.04.05
win32 시리얼 포트 목록 얻기  (0) 2017.04.05
Posted by 구차니

테스트 필요


[링크 : https://www.joinc.co.kr/w/man/4200/ReadFile]

[링크 : http://stackoverflow.com/questions/4063051/possible-to-have-a-timeout-on-readfile]

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/bb540534(v=vs.85).aspx]



+

2017.04.12

timeout은 overlapped io를 설정해야만 활성화 되는건가?

[링크 : http://wwwi.tistory.com/215]

[링크 : http://goodjian.tistory.com/entry/시리얼-통신COM-포트에-읽기-쓰기-할때-타임아웃을-설정하자]

[링크 : http://jurang5.tistory.com/entry/시리얼-통신]

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa363437(v=vs.85).aspx]


+

음.. overlap 설정안해줘도 COMMTIMEOUTS 에서 적절한 값(?)을 해주니 문제없네..

115200bps에서 

commto.ReadIntervalTimeout = 50;

commto.ReadTotalTimeoutConstant = 50;

commto.ReadTotalTimeoutMultiplier = 10;

commto.WriteTotalTimeoutConstant = 50;

commto.WriteTotalTimeoutMultiplier = 10; 

로 설정해 주니 적당히 되는 듯

[링크  : http://blog.daum.net/pg365/51]




+

2017.04.19

115200bps 에서 이렇게 설정해도 문제가 없네.. 응답이 빨라서 가능한건가?

commto.ReadIntervalTimeout = 5;

commto.ReadTotalTimeoutConstant = 5;

commto.ReadTotalTimeoutMultiplier = 10;

commto.WriteTotalTimeoutConstant = 50;

commto.WriteTotalTimeoutMultiplier = 10; 


Posted by 구차니

귀찮아서 대충 구현했는데..

char 배열을 써야지 CString::GetBuffer(n) 으로 버퍼를 받아오니 이상해지네..


설정은 좀더 찾아 봐야겠지만, 자동으로timeout 걸리면서 최대 20자 까지 읽도록 설정이 된 것 같다.


{

CString port;

port = _T("\\\\.\\") + port;

HANDLE m_hCommPort = ::CreateFile(port, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0/*FILE_FLAG_OVERLAPPED*/, 0);


DCB dcb = {0};

dcb.DCBlength = sizeof(DCB);


if (!::GetCommState (m_hCommPort,&dcb))

{

TRACE ("CSerialCommHelper : Failed to Get Comm State Reason: %d",

  GetLastError());

return E_FAIL;

}

dcb.BaudRate    = 115200

dcb.ByteSize    = 8;

dcb.Parity      = 0;

dcb.StopBits    = ONESTOPBIT;

if (!::SetCommState (m_hCommPort,&dcb))

{

ASSERT(0);

TRACE ( "CSerialCommHelper : Failed to Set Comm State Reason: %d",

GetLastError());

return E_FAIL;

}


CString hex_query="ffeeddccbbaa00";

DWORD iolen;

int iRet = WriteFile (m_hCommPort, hex_query, hex_query.GetLength(),&iolen ,NULL);


char temp[20];

int abRet = ReadFile(m_hCommPort, &temp ,20, &iolen, NULL) ;

temp[iolen] = '0x00';


CloseHandle(m_hCommPort);

return 0;



[링크 : http://blog.daum.net/chowood/8039404]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572257]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572404]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572588]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572862]

[링크 : https://www.codeproject.com/Articles/2682/Serial-Communication-in-Windows]

Posted by 구차니

1200 미만으로는 생소하고...

56000이냐 57600이냐는 좀 헷갈리네..

아무튼 가끔 쓸데 있으니 일단 링크!


Standard baud rates supported by most serial ports:
 
  • 110
  • 300
  •  
  • 600
  • 1200
  •  
  • 2400
  • 4800
  •  
  • 9600
  • 14400
  •  
  • 19200
  • 28800
  •  
  • 38400
  • 56000
  •  
  • 57600
  • 115200


  • Standard baud rates supported by some serial ports:
     
  • 128000
  • 153600
  •  
  • 230400
  • 256000
  •  
  • 460800
  • 921600


  • [링크 : http://digital.ni.com/public.nsf/allkb/D37754FFA24F7C3F86256706005B9BE7]

    Posted by 구차니

    c#이나 .net framework을 쓰면 간편한데

    win32로는 영 복잡할수 밖에 없는 듯?


    그런데 QueryDosDevice()를 쓰면 0ms 라는데

    1. CreateFile("COM" + 1->255) as suggested by Wael Dalloul
      ✔ Found com0com ports, took 234ms.

    2. QueryDosDevice()
      ✔ Found com0com ports, took 0ms.

    3. GetDefaultCommConfig("COM" + 1->255)
      ✔ Found com0com ports, took 235ms.

    4. "SetupAPI1" using calls to SETUPAPI.DLL
      ✔ Found com0com ports, also reported "friendly names", took 15ms.

    5. "SetupAPI2" using calls to SETUPAPI.DLL
      ✘ Did not find com0com ports, reported "friendly names", took 32ms.

    6. EnumPorts()
      ✘ Reported some non-COM ports, did not find com0com ports, took 15ms.

    7. Using WMI calls
      ✔ Found com0com ports, also reported "friendly names", took 47ms.

    8. COM Database using calls to MSPORTS.DLL
      ✔/✘ Reported some non-COM ports, found com0com ports, took 16ms.

    9. Iterate over registry key HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
      ✔ Found com0com ports, took 0ms. This is apparently what SysInternals PortMon uses.

    [링크 : http://stackoverflow.com/.../how-do-i-get-a-list-of-available-serial-ports-in-win32]


    m_MyPort 변수만 다른걸로 바꿔써주면 잘 작동 하는 듯

    단, unicode 기반에서는 (LPSTR)대신 (LPWSTR)로 해주어야 에러가 나지 않는다.

    void SelectComPort() //added function to find the present serial 
    {
    
        TCHAR lpTargetPath[5000]; // buffer to store the path of the COMPORTS
        DWORD test;
        bool gotPort=0; // in case the port is not found
    
        for(int i=0; i<255; i++) // checking ports from COM0 to COM255
        {
            CString str;
            str.Format(_T("%d"),i);
            CString ComName=CString("COM") + CString(str); // converting to COM0, COM1, COM2
    
            test = QueryDosDevice(ComName, (LPSTR)lpTargetPath, 5000);
    
                // Test the return value and error if any
            if(test!=0) //QueryDosDevice returns zero if it didn't find an object
            {
                m_MyPort.AddString((CString)ComName); // add to the ComboBox
                gotPort=1; // found port
            }
    
            if(::GetLastError()==ERROR_INSUFFICIENT_BUFFER)
            {
                lpTargetPath[10000]; // in case the buffer got filled, increase size of the buffer.
                continue;
            }
    
        }
    
        if(!gotPort) // if not port
        m_MyPort.AddString((CString)"No Active Ports Found"); // to display error message incase no ports found
    
    }


    [링크 : http://stackoverflow.com/.../what-is-proper-way-to-detect-all-available-serial-ports-on-windows]

    Posted by 구차니

    시리얼포트 10번 이후 열기라는 글이 있어서 보니


    버그가 있어서 COM9 까진 그냥 여는데, 그 이후에는

    \\.\COM%d 식으로 표현을 해야 하는데 escape 문자를 넣어주어야 하니 이렇게 미친듯이 길어진다.


    hPort = CreateFile("\\\\.\\COM10", GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); 

    [링크 : http://stackoverflow.com/questions/11775185/open-a-com-port-in-c-with-number-higher-that-9]

    Posted by 구차니

    많이 쓰는게 N-8-1 이니까

    1byte 전송에 10bit를 주로 쓰니까 일단 둘다 계산



    많이 사용되는(?) 비트레이트 저장

    [링크 : http://www.cermetek.com/Catalog/High-Speed-Modems/DataSheet/...CH1794_607-0003/]

    Posted by 구차니
    모종의 음모/CAN2015. 1. 23. 08:48

    dominant - logical 0 / actively driven to a voltage

    recessive - logical 1/ passively return


    왜이리 어려운 단어를 썼나 했더니

    전기적으로 신호를 설계해서

    0과 1이 충돌되면 0이 우세(우성)하게 판결되어 1을 씹어먹는다.

    그래서 0 이 우선권을 가지고 데이터를 전송하여 "실시간 전송" 성격에 적합하다는 말씀(?)


    CAN data transmission uses a lossless bit-wise arbitration method of contention resolution. This arbitration method requires all nodes on the CAN network to be synchronized to sample every bit on the CAN network at the same time. This is why some call CAN synchronous. Unfortunately the term synchronous is imprecise since the data is transmitted without a clock signal in an asynchronous format.
    The CAN specifications use the terms "dominant" bits and "recessive" bits where dominant is a logical 0 (actively driven to a voltage by the transmitter) and recessive is a logical 1 (passively returned to a voltage by a resistor). The idle state is represented by the recessive level (Logical 1). If one node transmits a dominant bit and another node transmits a recessive bit then there is a collision and the dominant bit "wins". The means there is no delay to the higher priority message, and the node transmitting the lower priority message automatically attempts to re-transmit six bit clocks after the end of the dominant message. This makes CAN very suitable as a real time prioritized communications system.

    [링크 : http://en.wikipedia.org/wiki/CAN_bus#Data_transmission]


    dominant / 우성의

    [링크 : http://endic.naver.com/enkrEntry.nhn?sLn=kr&entryId=7371ab1c34a84fab8bc699af491763d4&query=dominant]


    recessive / 열성의

    [링크 : http://endic.naver.com/enkrEntry.nhn?sLn=kr&entryId=087f00309f264a60ab6d787e5792a02a&query=recessive]

    '모종의 음모 > CAN' 카테고리의 다른 글

    linux can 테스트(가상 CAN IF)  (0) 2025.02.18
    can-utils(cansend, candump)  (0) 2025.02.18
    can invader  (0) 2024.01.09
    CAN(controller area network)  (0) 2023.10.31
    mcp2515 can  (0) 2023.10.30
    Posted by 구차니