Giter Club home page Giter Club logo

2018-2-newtechporject2-smartdoor's People

Contributors

kairos03 avatar leekyutae avatar

Watchers

 avatar  avatar

2018-2-newtechporject2-smartdoor's Issues

Rpi 블루투스 사용을 위한 설정

sudo apt-get update sudo apt-get upgrade sudo rpi-update sudo apt-get install pi-bluetooth sudo apt-get install bluetooth blueman bluez python-gobject python-gobject-2 sudo systemctl stop bluetooth sudo systemctl start bluetooth

<시리얼 포트 등록>
sudo sdptool add SP

<파일 수정>
sudo nano /etc/systemd/system/dbus-org.bluez.service

#이 라인을 찾아서 뒤에 '-C' 붙이기
ExecStart =/usr/lib/bluetooth/bluetoothd -C
#그 뒤에 이 라인 추가
ExecStartPost=/usr/bin/sdptool add SP
#end
sudo systemctl daemon-reload
sudo systemctl restart bluetooth
sudo systemctl enable bluetooth

<bluetooth 서비스 확인>
sudo hciconfig : HCI 장치 정보확인

<bluetooth 설정>
sudo hhciconfig -a hci0 piscan : 장치가 검색 가능하도록 설정함
sudo bluetoothctl
show : 블루투스 제어 장치의 정보를 확인할 수 있음
power on : 모듈의 전원이 꺼져있을 시 사용
agent on : 다른 장치와의 페어링을 위해 기본 에이전트로 등록
default-aget
scan on : 주변의 다른 장치 검색
discoverable on : 자신을 다른 장치에서 검색 가능하게 함
pair MAC Address : 해당 장치와 페어링 시도
trust MAC Address : 페어링 완료후 사용할 것
info MAC Address : 이를 통해 모듈 상태 확인 paired, Trusted가 yes로 되어있어야함
quit : bluetoothctl 종료

rpi uuid : "94f39d29-7d6d-437d-973b-fba39e49d4ee"
android uuid : "00001101-0000-1000-8000-00805F9B34FB"

참고한 사이트
Link : https://webnautes.tistory.com/1137
Link : https://blog.naver.com/juke45ef/220827583111

Security issue

보안 관련 아이디어

비콘(문)에서 일정 주기 별로 브로드캐스트 하는 데이터를 변경

door_id = rsa(timd+id)

위와 같이 브로드 캐스트 하면 android에서 받아서 phone_id와 자신의 비밀키로 함호화한 데이터 전송

phone_id + rsa(door_id)

aws에서 phone_id에 해당하는 public key로 ras를 풀고(인증된 기기에서의 요청인지 검증)
door_id에 해당하는 기기에 열림 신호 전송

door_id를 주기별로 업데이트 하여
기기에서 랜덤하게 auth_key를 변경하고 변경된 키를 aws에 변경 되었다고 알림.

door open topic

smartdoor/[ThingName]/open

{
  "thingName": "test",
  "requestId": "reqidtest",
  "userId": "user1"
}

smartdoor/[ThingName]/open/accept
smartdoor/[ThingName]/open/reject

Communication Flow

1번 2번 중 선택

1번 통신이 간단 함. 스마트폰에서 데이터를 사용해야 한다.
2번 통신이 1회 늘어남. 스마트폰에서 데이터를 사용하지 않아도 된다.
20181011_122627

스마트도어의 내부외부 구별

내가 내부에 있는데 문이 열리는건 아닌듯.... 그래서 생각하는 아이디어가

  1. DB에 집안에 있는지 밖에있는지 확인하는 속성 생성
  2. 핸드폰 어플에서 내부이면 열리지 않도록 하는 제어장치 생성?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.