한 2주 전? 덕*** 이라는 국내 업체를 국내에서 정식 판매되는 3D 프린터 Flashforge Finder 를 구입했습니다. 

외국에서 평가도 좋고 국내에서도 가정용으로 많이 사용하는 제품으로 확인했습니다.
당연히 와이파이 기능으로 원격으로 작업을 시작하고 상태를 확인할 수 있다는 점도 좋았습니다.
단, 베드가 좀 작은면이 좀 있지만...



이렇게 생긴 제품인데요... 받고나서 기쁜 마음으로 출력물 테스트를 두어번 한 다음에 알게 됐습니다.

와... 와이파이 기능이 없.. 어.... 워.. 원래 있는 제품 아니었어???


네, 카페에 글을 찾아보니 국내에 출시하면서 와이파이 모듈이 제거돼 판매된다고 합니다.
아마도 와이파이 모듈 관련해서 전파인증을 받기 싫었거나 문제가 있었겠죠?

해외 직구하면 비슷한 금액에 와이파이 되는걸로 살수 있었는데.. 젠장..


구글링을 아무리 해봐도 어떤 와이파이 모듈을 쓰는지 찾을수가 없었습니다.

그러다가 PCB 사진을 발견했어요.

PCB 우측에 모듈 형태로 달려있는 저 부분이 와이파이 모듈로 예상되었습니다.


실제로 확인을 해보니 제 3D 프린터에는 저 부분이 비어 있었습니다.

요렇게...


휴.. 그럼 이게 맞는건가? 저놈만 찾아서 달면 되는건가? 그런데 어떻게 찾아내지?

그러다가 제작사 사이트의 유저가이드 pdf 파일을 보다가 와이파이 맥 어드레스를 발견했습니다.



참고로 와이파이나 블루투스같은 무선 기기의 맥 어드레스는 등록을 하게 돼 있고 IEEE에서 관리되고 있습니다. 

맥 어드레스 등록 목록: http://standards-oui.ieee.org/oui.txt

물론 기기마다 다 등록은 하지는 않고 각 회사마다 앞 6자리를 각자의 코드로 갖는것 같습니다.


유저가이드에서 찾은 맥 어드레스는 FC:3D:FD로 시작하네요.


찾아보니 모듈의 제조사는 중국의 SHENZHEN BILIAN ELECTRONIC CO., LTD 라고 나왔습니다!


그리고 구글링으로 저 회사에서 만든 와이파이 모듈을 검색해보니 FCC에서 BL-R8188EU8 이라는 모듈이 나오네요.

https://fccid.io/S8JBLR8188EU8A/


저 위에 있는 보드 사진에 달려있는거하고 비교해보니 비슷한 것 같네요.


바로 모듈을 구입해서... 드디어! 오늘 도착했습니다. (혹시 몰라서 두개...)

메인 칩셋은 유명한 리얼텍꺼네요.



그리고 3D 프린터의 뒷 뚜껑을 열고, 바로 장착!

비포 앤 에프터 사진입니다.


그리고 전원을 켜보니 보이지 않던 와이파이 메뉴도 나오고,


제품 정보를 확인해보니 와이파이 맥 어드레스 정보도 나오고, 


원격으로 작업 시작도 되고 모니터링도 모두 됩니다!


휴.. 다행히 해피엔딩으로 끝났네요.



'Electronic > Hacking' 카테고리의 다른 글

때늦은 XBOX개조질;;;  (2) 2007.05.19

이 글을 보신분 중에서 한분에게 Genuino 101 보드를 드립니다.

MicrocontrollerIntel Curie
Operating Voltage3.3V (5V tolerant I/O)
Input Voltage (recommended)7-12V
Input Voltage (limit)7-17V
Digital I/O Pins14 (of which 4 provide PWM output)
PWM Digital I/O Pins4
Analog Input Pins6
DC Current per I/O Pin20 mA
Flash Memory196 kB
SRAM24 kB
Clock Speed32MHz
LED_BUILTIN13
FeaturesBluetooth LE, 6-axis accelerometer/gyro
Length68.6 mm
Width53.4 mm
Weight34 gr.

현재는 단종된 보드로 보입니다만 블루투스 4.0에 가속도 자이로 센서가 내장되어 있다는 장점이 있네요.


비밀 댓글로 손 들어 주세요~

'Electronic > Arduino' 카테고리의 다른 글

Genuino 101 프로그래밍 에러 해결.  (0) 2018.12.22
일이 안되니 뻘짓만 한다 ㅠㅠ  (0) 2013.02.16

이런거 가지고 놀기 좋아한다고 뜬금없이 다른 보드와 함께 선물받은 Genuino 101 보드.

좀 시대 지난 보드지만 그래도 다른 보드와 다른점도 있고(Intel® Curie™/x86 (Quark) and a 32-bit ARC architecture core, both clocked at 32MHz.),
나름 BLE도 내장하고 있다.

테스트로 한번 blink 코드를 올려보려 하는데 자꾸 에러가 난다.

# arduino101load -dfu=/Users/heisice/Library/Arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -bin=/var/folders/3v/62sy5_5j1b72zgmg3wrnll6c0000gn/T/arduino_build_60893/Blink.ino.bin -port=/dev/cu.usbmodem14201 -v -ble_fw_str="ATP1BLE00R-1631C4439" -ble_fw_pos=169984 -rtos_fw_str="" -rtos_fw_pos=0 -core=2.0.0
arduino101load 2.0.1 - compiled with go1.7.5
Starting download script...
Serial Port: /dev/cu.usbmodem14201
BIN FILE /var/folders/3v/62sy5_5j1b72zgmg3wrnll6c0000gn/T/arduino_build_60893/Blink.ino.bin
Waiting for device...
Waiting for device...
Device found!
exit status 74

구글링을 열심히 해보다가 뚜렷한 답이 없어서 쳐박아뒀었는데, 다시 꺼내봤다가 답을 찾았다.


결국 또 구글링이긴 한데
바이너리 업로드에 쓰이는 저 arduino101load라는 프로그램이 예전 버전은 되는데 기존 버전은 안된다는 것 같다.

결국 구글링한 페이지에 링크된 버전을 다운받아, 기존 프로그램이 있는곳에 복사해 넣어줬더니 정상 동작한다.

# arduino101load -dfu=/Users/heisice/Library/Arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -bin=/var/folders/3v/62sy5_5j1b72zgmg3wrnll6c0000gn/T/arduino_build_60893/Blink.ino.bin -port=/dev/cu.usbmodem14201 -v -ble_fw_str="ATP1BLE00R-1631C4439" -ble_fw_pos=169984 -rtos_fw_str="" -rtos_fw_pos=0 -core=2.0.0
arduino101load 2.0.2 - compiled with go1.7.5
Starting download script...
Serial Port: /dev/cu.usbmodem14201
BIN FILE /var/folders/3v/62sy5_5j1b72zgmg3wrnll6c0000gn/T/arduino_build_60893/Blink.ino.bin
Waiting for device...
Device found!
Verifying BLE version: ATP1BLE00R-1631C4439
BLE version: verified
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
dfu-util: Invalid DFU suffix signature
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 8087:0aba
Run-time device DFU version 0011
Claiming USB DFU Interface...
Setting Alternate Setting #7 ...
Determining device status: state = dfuDNLOAD-IDLE, status = 0
aborting previous incomplete transfer
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0011
Device returned transfer size 2048
Copying data from PC to DFU device

Download [ ] 0% 0 bytes
Download [= ] 4% 2048 bytes
Download [== ] 8% 4096 bytes
Download [=== ] 12% 6144 bytes
Download [==== ] 16% 8192 bytes
Download [===== ] 20% 10240 bytes
Download [====== ] 24% 12288 bytes
Download [======= ] 28% 14336 bytes
Download [======== ] 32% 16384 bytes
Download [========= ] 36% 18432 bytes
Download [========== ] 40% 20480 bytes
Download [=========== ] 44% 22528 bytes
Download [============ ] 48% 24576 bytes
Download [============= ] 52% 26624 bytes
Download [============== ] 56% 28672 bytes
Download [=============== ] 60% 30720 bytes
Download [================ ] 64% 32768 bytes
Download [================= ] 68% 34816 bytes
Download [================== ] 72% 36864 bytes
Download [=================== ] 76% 38912 bytes
Download [==================== ] 80% 40960 bytes
Download [===================== ] 84% 43008 bytes
Download [====================== ] 88% 45056 bytes
Download [======================= ] 92% 47104 bytes
Download [======================== ] 96% 48732 bytes
Download [=========================] 100% 48732 bytes
Download done.
Sent a total of 48732 bytes
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
dfu-util: can't detach
Resetting USB to switch back to runtime mode
SUCCESS: Sketch will execute in about 5 seconds.


해당 프로그램 바이너리는 나중에 참조를 위해 이 글에 첨부하기로 한다.

arduino101load-2.0.0-darwin-testU.zip


참조: https://forum.arduino.cc/index.php?topic=467201.msg3205748#msg3205748

맥북에서 하드한 윈도우 환경이 필요한데 가상PC환경에서 쓰자니 좀 힘겨워 해서 가상 환경을 실제 환경으로 세팅했다.

근데 드라이버가 제대로 안돼있네?


다시 맥 환경으로 부팅해서 부트캠프지원 켜서 다운로드 기다리고 USB메모리 연결하고..


번거로워 찾아보니 좋은 도구를 만들어놨네?


https://github.com/timsutton/brigadier/releases


맥북용 윈도우 드라이버를 다운받으려면 그냥 exe파일 다운받은 다음에 실행만 하면 딱 맞는 드라이버를 자동으로 다운 받아준다.


다운로드가 끝나면 BootCamp-xxx-xxxxx 폴더가 생기고 안에 들어가서 BootCamp 폴더에 들어가면 Setup.exe가 있다.

실행하면 모든 드라이버가 자동으로 설치된다.

종종 SFTP를 이용해 서버에 파일을 업로드 하는데 갑자기 클라이언트에서 Connection timeout으로 접속이 되지 않는 문제가 발생.


서버에 로그를 확인해보니, 연결되자 마자 클라이언트에서 연결을 끊는다.

  
    $ tail -f /var/log/secure

    Accepted password for heisice from x.x.x.x port x ssh2
    pam_unix(sshd:session): session opened for user heisice by (uid=0)
    Received disconnect from x.x.x.x port x:11: disconnected by user
    Disconnected from x.x.x.x port x
    pam_unix(sshd:session): session closed for user heisice

그래서 클라이언트에서 command line sftp클라이언트에 -v 옵션을 주어 실행해보니,

  
    $ sftp -i ~/.ssh/key -v heisice@server.com

    ...

    debug2: fd 5 setting TCP_NODELAY
    debug2: client_session2_setup: id 0
    debug1: Sending environment.
    debug1: Sending env LANG = ko_KR.UTF-8
    debug2: channel 0: request env confirm 0
    debug1: Sending subsystem: sftp
    debug2: channel 0: request subsystem confirm 1
    debug2: channel_input_open_confirmation: channel 0: callback done
    debug2: channel 0: open confirm rwindow 0 rmax 32768
    debug2: channel 0: rcvd adjust 2097152
    debug2: channel_input_status_confirm: type 99 id 0
    debug2: subsystem request accepted on channel 0
    Received message too long 1315927840
    debug2: channel 0: read<=0 rfd 6 len 0
    debug2: channel 0: read failed
    debug2: channel 0: close_read
    debug2: channel 0: input open -> drain
    debug2: channel 0: ibuf empty
    debug2: channel 0: send eof
    debug2: channel 0: input drain -> closed
    debug2: channel 0: write failed
    
    ...


Received message too long 이라는 메세지가 보였다.


그래서 구글링 해보니 ssh 접속시 나오는 메세지 때문에 그런경우가 있다고 한다.
얼마전에 ~/.bashrc 파일에 추가해둔 초기화 명령에서 출력되는 메세지 때문에 그런듯 하다.

그래서 그 부분을 출력하지 않게 했더니 문제가 해결되었다.

아직도 제가 만든 라디오 프로그램을 많이 찾으시는 것 같은데 실망하고 돌아가실 것 같아,
각 방송사의 라디오를 PC나 스마트폰으로 듣는 방법을 알려드리려고 합니다.

KBS

KBS 라디오를 많이들으시는 분들은 KBS 라디오 사이트 (http://radio.kbs.co.kr/) 우측 상단 메뉴 중에서 "듣기"를 클릭하시면 이런 화면이 나옵니다.

이 화면에서 콩 다운로드 부분에서 PC및 스마트폰용 프로그램을 다운받으시면 편리하게 들으실 수 있습니다.
팟캐스팅으로 지난 방송을 다시 들으실 수  있고 실시간 듣기를 누르시면 채널별로 브라우저를 통해 바로 들으실 수 있습니다.
(자주 들으시면 프로그램을 설치하시는 것을 추천합니다.)

SBS

SBS 라디오(http://w3.sbs.co.kr/radio/main.do)를 많이 들으시는 분들은 고릴라 라는 프로그램(http://w3.sbs.co.kr/radio/gorealraMain.do)을 다운받으시면 됩니다. PC및 스마튼폰 앱이 준비되어 있습니다.

문자메세지는 유료지만, 앱에서 사연 보내고 참여하는 것은 무료입니다.


MBC

MBC 라디오(http://www.imbc.com/broad/radio/index.html)를 많이 들으시는 분들은 미니 웹(http://mini.imbc.com/v2/index.html)에서 바로 들으실 수도 있구요. PC및 스마트폰 앱으로도 미니라는 청취 앱(http://www.imbc.com/mobileapp/mini/)이 준비되어 있습니다.


들으시는 채널만 들으시는 분들이 많기 때문에 거의 대부분은 해당 방송사의 청취 프로그램이나 앱만 설치하시면 들으시는 데 불편함 없으실거라 생각합니다.


즐거운 라디오 생활 되세요~!


리눅스상에서 웹 호출 문제를 디버깅 하고 싶을 때 mysql 서버 로그를 봐도 부족하고 그럴 때는 패킷을 캡쳐해서 분석할 수 있다.

If you want to debug web call problems on Linux, you may not be able to view the mysql server logs, and you can capture and analyze the packets in such cases.


tpcdump는 기본으로 설치가 안되어 있으니 설치를 해야 한다.

tcpdump can not be installed by default.


그리고 루트 계정으로 실행해야 한다.

and, should run it as root.



tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e '

while(<>) { chomp; next if /^[^ ]+[ ]*$/;

    if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER|CALL)/i)

    {

        if (defined $q) { print "$q\n"; }

        $q=$_;

    } else {

        $_ =~ s/^[ \t]+//; $q.=" $_";

    }

}'



리눅스상에서 웹 호출 문제를 디버깅 하고 싶을 때 웹서버 로그를 봐도 부족하고 그럴 때는 패킷을 캡쳐해서 분석할 수 있다.

If you want to debug web call problems on Linux, you may not be able to view the web server logs, and you can capture and analyze the packets in such cases.


tpcdump는 기본으로 설치가 안되어 있으니 설치를 해야 한다.

tcpdump can not be installed by default.


그리고 루트 계정으로 실행해야 한다.

and, should run it as root.



tcpdump -A -s 10240 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r "s/^........(GET |HTTP\/|POST |HEAD )/\n\1/g"


기본적으로 CentOS는 패키지관리자(yum)으로 프로그램을 설치하면 오래된 버전의 프로그램들이 설치되고,
When CentOS installs the program as a package manager (yum), older versions of the programs are installed.

최신 프로그램은 없는 경우가 있습니다. 그런 경우 EPEL, IUS, Remi 등의 저장소를 추가해주면 신버전의 프로그램을 설치할 수 있습니다.
And there is no latest program. In that case, you can install new versions of programs by adding repositories such as EPEL, IUS, and Remi.

하지만 별도로 설치하는 저장소의 패키지는 기존 시스템과 맞지 않을 수 있습니다. 제 경우엔 그런 문제는 없었지만.
However, the package of the repository that you install separately may not match the existing system. I did not have that problem in my case.

EPEL 저장소 설치 (Install the EPEL repository)


일반적으로 아래 명령을 실행하면 EPEL저장소를 사용하게 됩니다.

Generally, the following command will use the EPEL repository.

sudo yum install epel-release


하지만 설치가 안되는 경우 아래 명령을 참고하세요.
But if you can not install it please refer to the following command.


- CentOS and Red Hat Enterprise Linux 5.x

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm

- CentOS and Red Hat Enterprise Linux 6.x

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

- CentOS and Red Hat Enterprise Linux 7.x

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm



IUS 저장소 설치 (Install the IUS repository)


- CentOS 5.x

sudo rpm -Uvh https://centos5.iuscommunity.org/ius-release.rpm

- CentOS 6.x

sudo rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm

- CentOS 7.x

sudo rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm

- Redhat 5.x

sudo rpm -Uvh https://rhel5.iuscommunity.org/ius-release.rpm

- Redhat 6.x

sudo rpm -Uvh https://rhel6.iuscommunity.org/ius-release.rpm

- Redhat 7.x

sudo rpm -Uvh https://rhel7.iuscommunity.org/ius-release.rpm


Remi 저장소 추가 (Install the Remi repository)


- CentOS and Red Hat Enterprise Linux 5.x

sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

- CentOS and Red Hat Enterprise Linux 6.x

sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

- CentOS and Red Hat Enterprise Linux 7.x

sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm


Remi 저장소 활성화 (Enable the Remi repository)

# 패키지 설치시 파라메터로 임시로 활성화
# Temporarily activate as a parameter when installing packages

sudo yum --enablerepo=remi install [패키지명]


# 저장소 파일을 수정하여 영구적으로 활성화
# Modify the repository file to permanently activate it

vi /etc/yum.repos.d/remi.repo

enabled 값을 1로 설정.
Set the enabled value to 1




Wi-Fi로 제어 가능한 LED 전광판을 만들었습니다. 

I created a controllable LED display with Wifi.


HTTP기반 API로 제어됩니다. 내부 EEPROM에 화면을 저장하여 보여줄 수 있습니다.

It is controlled by the HTTP-based API. You can show your screen to save an internal EEPROM.


동작 영상은 위를 참조 하시고 따라서 만드시려면 아래를 참고해 주세요~!

Please refer below to get motion video, see above, and therefore To create!




1. 준비물 (Materials)


- 전광판 모듈 (LED Matrix Module / 국내쇼핑몰 기준 1개 30,000원 * 3개 / 외국은 더 싸요)



Adafruit - 16x24 Red LED Matrix Panel - Chainable HT1632C Driver

https://www.adafruit.com/products/555


국내 전자부품 쇼핑몰에서 둘러보던 중 적당한 제품을 대충 골라서 구입하였습니다.

(I bought the product in the domestic electronic components mall.)


- 박스케이블 (2x5pin) - 짧은 것으로 4개 구매 추천 (국내 쇼핑몰 기준 2개에 2,500원)

10-Pin IDC Connector - I recommend that you purchase four short.



국내 전자부품 쇼핑몰에서 2개 세트에 2천원대에 판매하는 것 같습니다. 전광판 모듈당 하나씩을 주던데 만들다 보면 부족합니다. (그리고 너무 길어요)

모듈과 모듈을 체인식으로 연결하는데 저는 있던것으로 대충 했는데 모듈간 연결에 짧은거 4개 구입 추천합니다.

그리고 저는 두개를 와이파이 모듈과의 연결에 사용하려고 저렇게 개조를... 했습니다.

적당히 응용해서 개조해 주세요. (박스헤더라고 저 케이블을 꽂을수 있는 소켓이 있는데 그것을 두개 사서 쓰는것도 좋을 거 같아요)


- NodeMCU Development Kit (국내 전자부품 쇼핑몰 기준 가격: 9,000원 정도)


http://nodemcu.com/index_en.html



Lua라는 스크립트 언어로 펌웨어를 만들어 돌릴 수 있는 모듈이예요. 하지만 이번에는 아니예요.

Create a firmware module that can run'm in a scripting language called Lua. But this time I'm not using the Lua.


준비물은 여기까지예요. 너무 심플하죠??

Materials are up here. too simple ??


2. 선 연결 (Connecting Wires)


LED모듈과 모듈은 아래 사진처럼 각각 케이블로 연결되어야 해요.

LED modules and each module can be connected to cable like the picture below.



저는 있는 선을 써서 저렇게 모양이 좋지 않지만, 여러분은 짧은 케이블을 사서 쓰셨으면 해요.
Not good view. I hope you are using a short cable.


그리고, 첫번째 모듈의 J5라고 쓰여진 부분을 납땜으로 연결해 줘야 해요.

And, you have to connect the written part of the first module, called J5 soldered.



NodeMCU와 연결을 위해서 이걸 참고했어요. 프로그래밍으로 제어 가능한 GPIO포트들을 이용해 전광판을 제어 할 거예요.

I see it as connected to the NodeMCU. Using the available programmable GPIO ports will be controlled by controlling the led matrix.


일단 제 소스코드에는 이렇게 정의했어요.

I was defined like this.



이 정의를 참고해서 납땜질 했던 첫번째 모듈과 NodeMCU를 연결해요. 

Refer to this definition, I connect the module and NodeMCU.


 전광판 모듈 (LED Module)

 NodeMCU

 VCC

 3.3V

 GND

 GND

 DATA

 GPIO4 (~D2)

 WR

 GPIO5 (~D1)

 CS0

 GPIO0 (~D3)

 CS1

 GPIO2 (~D4)

 CS2

 GPIO14 (~D5)


모두 연결됐어요!

Connected all!




3. 펌웨어 개발 (Firmware programming)


자.. 우리는 펌웨어 개발을 해야 해요.

Now ... we have to do firmware development.


개발 도구는 Arduino를 쓸거예요. 원래 이 개발툴은 Arduino라는 보드를 위해서 만들어진건데 최근에 보니 이것저것 많이 지원하더라구요.

Development tools are going to use the Arduino. Originally developed tools are gonna made for the Arduino board, the board looked at a lot of support recently.


NodeMCU 모듈 포함해서.

Including NodeMCU module.


아두이노 개발툴이 없으시면 여기에서 무료로 다운받으실 수 있어요.

If you do not have an Arduino development tool I can download for free here.


https://www.arduino.cc/


NodeMCU를 Arduino에서 개발하려면 아두이노 설정에서 추가 보드매니저 URL을 입력해야 해요.

To develop NodeMCU in Arduino you need to enter the URL in the Additional Board Manager in Arduino setup.



URL:

http://arduino.esp8266.com/stable/package_esp8266com_index.json


위 설정을 한 후 보드 매니저를 열면 nodemcu 보드 개발키트를 설치할 수 있어요.

After the above settings when you open the manager's board to install nodemcu Board Development Kit.



툴 > 보드 메뉴에서 NodeMCU를 고르고, 시리얼포트가 잘못되었으면 정상적으로 세팅합니다.

Pick NodeMCU in the Tools > Board menu, if the serial port is normally set incorrectly.


소스코드를 열고 왼쪽의 업로드 버튼만 누르면 끝나요!

Open source code just press the upload button, all steps are ended.


아래는 소스코드 설명이예요.

This is a description of the source code.



- NodeMCU모듈을 공유기(AP)모드로 동작시킬거예요. 패스워드도 걸었구요.

  NodeMCU going to operate the module in the router (AP) mode. He also set a password.


- 그리고 아이피 대신 장치 이름을 쓸수 있도록 MDNS를 등록하였습니다. (http://192.168.1.1/clear -> http://led-display.local/clear)

  And, we have registered the MDNS help write the device name instead of the IP.


- 메모리에 화면을 저장할 수 있도록 EEPROM도 초기화 했어요.

  It also initializes EEPROM memory to store the screen.


- 그리고 전광판 모듈을 초기화 해요.

  and initializing the led matrix module.



URL에 따라서 이러저러한 동작을 해요.

It's different actions depending on the URL.


http://led-display.local/clear


예를들어 이런식으로 호출하면 동작하는데요.

For example, I'd like this call operation.


 /clear 

 화면을 지우는 역할 (모든 도트를 OFF시켜요)

 To erase the screen (OFF all the dots)

 

 /fill

 화면을 모두 채워요 (모든 도트를 ON)

 Fill the whole screen (all dots ON)

 

 /draw

 파라메터로 보낸 데이터를 화면에 바로 그려요.

 Draw the data that is sent as a parameter to the screen.

 ?v=03edfx ...  (144 byte binary in 288 byte hexdigest)

 /set

 파라메터로 보낸 데이터를 메모리(EEPROM)에 저장해요.

 Stores the data that is sent as a parameter to memory (EEPROM).

 ?m=0&v=03edfx ...  

 /show

 메모리에 저장되어 있는 화면을 불러와서 보여줘요.

 Show me bring up a screen that is stored in memory.

 ?m=0

 /brightness

 화면 밝기를 조정하는 데 써요.

Adjust the brightness of the screen.

 ?v=10


그리고 다른 URL은...

And another URL is ...


        http://led-display.local/


페이지로 들어갔을 때 전광판에 도트를 찍어볼 수 있는 페이지를 보여주는 데 쓰여요.

When you see an index page, and is used to show a page that allows you to control the led matrix.


이렇게.

like this.




소스코드는 부끄럽지만 github에 공유해 놓을께요.

I put upload the source code to github.


누구든 자유롭게 쓰시고 개발하실 수 있는 분은 더 좋게 만드는데 기여해 주셨으면 해요.

Please if anyone can freely use, I want you to contribute to your development code.


https://github.com/heisice/wifi_led_display



감사합니다!

Thank you!


와이파이 모듈 구입해서 테스트.


외장하드를 하나 구입했는데 NTFS로만 써야 한단다.

근데 그러면 OSX에서는 못쓴다. 하지만 방법은 있다.

다음 프로그램들을 설치하면 사용이 가능하다.


1. FUSE for OS X

http://osxfuse.github.io/


2. NTFS-3G for OS X

http://sourceforge.net/projects/catacombae/files/NTFS-3G%20for%20Mac%20OS%20X/2010.10.2/ntfs-3g-2010.10.2-macosx.dmg/download


거기에 이건 추가로 설치해주면 더 좋다. (설치 안하면 에러가 많이 난다.)


fuse_wait
https://github.com/bfleischer/fuse_wait/downloads


그러고 나니까 잘 된다.


끝.

회사 업무용 맥미니가 메모리가 부족해서 너무 버벅이길래 안쓰던 적은 용량의 SSD를 이용하기로 했다.

인터넷에 검색해보니 전부 다 복구모드로 부팅해서 어쩌고 저쩌고 하는것만 나온다. 난 그게 귀찮으므로 더 쉬운 방법을 생각해봤다.

외장하드 형태로 연결하고 아래 명령으로 SSD로 스왑파일을 옮긴다.


# hibernate 파일 제거

sudo pmset -a hibernatemode 0

sudo rm /var/vm/sleepimage


# 스왑(페이징) 기능 끄기

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist


# SSD로 심볼릭 링크

mkdir /Volumes/ssd/vm

sudo rm -rf /private/var/vm

sudo ln -s /Volumes/ssd/vm /private/var/vm


# hibernate 기능 시작

sudo pmset -a hibernatemode 1


# 스왑(페이징) 기능 사용

sudo launchctl load /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist


버벅임이 많이 완화되었다.

쓰던 MP3 플레이어에서 자꾸 재생 안된다는 음원이 나오길래 맥용으로 MP3 음원 체크하는 유틸리티를 찾아봤는데 적당한 게 이거밖에 안나옴. 하지만 사이트는 오래전에 닫은 상태. 그래서 어떻게든 찾아서 백업 용도로 올림.

mp3sar-1.2.zip


원래 개발자 사이트 URL은 http://triq.net/mac/mp3-validator-mac-os-x 임.

아이리버와 멜론, 지니에서 돈주고 구입한 FLAC 무손실 음원을 비교해 보았다.


먼저 아이리버의 그루버스에서 구입한 FLAC이다. 스펙상으론 24bit / 96kHz를 자랑하지만 스펙트럼으로 비교해보니 충격적이다. 스펙트럼을 보면 원본음원이 24bit도 아닐뿐더러 음은 이미 20kHz대에서 이미 다 잘려있다. flac 파일로서 가치가 없다.
전부 다 이런건 아닐테지만 이처럼 원본보다 높게 스펙 뻥튀기 해서 팔아먹으면 안돼지...

다음은 멜론에서 구입한 FLAC 파일이다. 스펙상으론 16 bit / 44.1kHz로 아쉽긴 하지만 그래도 음이 살아있다.

그리고 KT의 지니에서 받은 FLAC이다. 음원에 따라 이랬다 저랬다 한다. 음반사에서 공급을 저렇게 할수도 있고..
일부 음이 죽은 건 음반사에서 원음을 제공하지 않거나 시디로만 제공해서 시디에서 리핑한것 때문일 수 있다.
하지만 그루버스처럼 스펙 뻥튀기는 하지 않은듯 하다. 


이상.

'Music' 카테고리의 다른 글

맥용 MP3 체크 툴 (MP3 Scan+Repair for OSX)  (0) 2015.01.18

+ Recent posts