이것은 RN2483 Lorawan 모듈 용 ESP8266 장치를 사용하여 WiFi와 직렬 사이의 순수한 투명 브리지입니다. 네트워크 연결이없는 RN2483과 같은 원격 직렬 장치를 테스트하거나 대화하는 데 매우 유용합니다. Wemos RN2483 Shield와의 작업에 전념하고 있으며 Network Lorawan Backend와 함께 사용하고 있지만 다른 공급자를 사용할 수 있습니다.
Wemos Target에서 사용하고 있습니다. 사이트에서 Wemos에 대한 자세한 정보를 찾을 수 있습니다. 정말 잘 문서화되어 있습니다.
이 프로젝트는 주로 우수한 @me-dev espasyncwebserver 라이브러리와 Jakub Jankiewicz가 수행 한 훌륭한 jQuery 터미널을 기반으로합니다.
Spiffs Data (웹 페이지)를 업로드하면 브라우저와 http://ip_of_esp8266 에 연결하여 재생을 시작할 수 있습니다. Main index.htm 웹 페이지에는 전체 JavaScript 터미널이 포함되어있어 명령을 입력하고 응답을받을 수 있습니다.
기본 웹 페이지는 어디에서나 호스팅 될 수 있으며 장치에 포함 해야하는 것은 필수적이지 않습니다 (장치와 컴퓨터가 인터넷에 액세스 할 수없는 경우). GitHub에서 Fullicctionnal 웹 페이지를 게시하여 여기에서 액세스 한 다음 펌웨어를 플래시 한 상태에서 장치에 연결할 수 있습니다.
일부 명령은 대상 (ESP8266)에 의해 해석되며 직렬로 전달되지 않으므로 일부 가변 작업을 수행하는 ESP8266과 상호 작용할 수 있습니다.
처음 설정 (RN2483 방패를 사용한다고 가정)
connect 입력하십시오. 하나의 연결된 확인이 모두 정상 입력입니다.sys get ver =>는 RN2483 1.0.1 Dec 15 2015 09:38:09 처럼 반환해야합니다.reset 12 및 배너까지 다시 시도하십시오.mac set appeui YOUR_APP_EUImac set appkey YOUR_APP_KEYmac set deveui YOUR_DEV_EUImac savemac join otaa 그런 다음 ok 를 기다렸다가 accepted . 그러면 당신은 있습니다!
푸시 버튼 (다른 동작에 대한 긴 누르기)
추신 : 하드웨어를 원한다면 단순화 된 check-rn2483 스케치를 사용하십시오.
nodejs와 일부 종속성을 npm install zlib 해야합니다.
WebDev 폴더는 웹 페이지를 테스트하고 검증하는 개발 폴더입니다. 각 수정마다 장치가 깜박이는 것을 피하는 데 사용됩니다. 모든 소스 파일은이 폴더에 있으며 ESP8266 data 폴더 (웹 페이지 포함)는 WebDev 폴더에서 시작된 Nodejs 스크립트로 채워집니다. 이 repo는 데이터 최신 파일에 포함되므로 파일을 변경하지 않으면 그대로 Spiffs에 업로드 할 수 있습니다.
웹 페이지를 테스트하려면 명령 줄로 이동하여 WebDev 폴더로 이동하여 다음을 발행하십시오.
node web_server.js
그런 다음 브라우저를 htpp : // localhost : 8080에 연결하십시오.
일단 괜찮아지면 문제 a :
node create_spiffs.js
이렇게하면 파일을 GZIP로하여 데이터 폴더에 넣으면 Arduino IDE에서 장치 Spiffs로 업로드 할 수 있습니다.
create_spiffs.js 및 web_server.js 파일에서 주석을 참조하십시오. Nodejs가 필요한 종속성도 표시됩니다.
또한 통합 편집기를 사용하여 장치에서 파일을 직접 편집 할 수 있으며, 예를 들어 구성 파일을 변경하는 데 매우 유용합니다. 로그인 패스가있는 http : //your_device_ip/edit.htm (admin/admin)
!close 또는 Ctrl-D : 닫기 연결swapping 타이핑 핑? 또는 help 보여줍니다heap ESP8266 무료 램을 보여줍니다whoami Show WebSocket 클라이언트 # 우리는 우리입니다who 연결되어 있습니다send second 1 초마다 (0 = 보내기 비활성화)fw 표시 펌웨어 날짜/시간baud 디스플레이 ESP8266 직렬 보드 속도 구성baud n Set ESP8266 Serial Baud Rate (장치 구동과 호환기)rgb l 세트 RGB LED 광도 L (0..100)reset p . gpio 핀 번호 pls 목록 Spiffs 파일read file Spiffs 파일 명령을 실행합니다hostname Show Device의 네트워크 호스트 이름restart 재설정 ESP8266 (재부팅)debug 디버그 정보 표시cat file 의 내용을 표시합니다up type Uplink 메시지 보내기 메시지 (유형 0 = 확인되지 않은 유형 1 = 확인) 파일 startup.ini 의 모든 명령은 setup() 에서 실행됩니다 () 다른 파일로 체인 할 수 있습니다.
이 스케치를 사용하여 Microchip RN2483 LORA 모듈을 구동하여 Lorawan을 테스트하고 내가 사용한 보드를 참조하십시오.
예를 들어 내 startup.ini 파일은 microchip rn2483-cfg.txt 을 읽는 명령이 포함되어 있습니다 rn2483-ttn-otaa.txt
startup.ini
# Startup config file executed once in setup()
# commands prefixed by ! are executed by ESP
# all others passed to serial module
# Set Onboard RGB LED luminosity (0=off 100=full light)
! rgb 50
# Microchip Lora rn2483 configuration
! read /rn2483-cfg.txt
# Join ttn in otaa mode
! read /rn2483-ttn-otaa.txt
RN2483 RN2483 SHIELD의 구성 파일 예제 rn2483-cfg.txt
# Startup config file for Microchip RN2483
# commands prefixed by ! or $ are executed by ESP all others passed to serial module
# command starting with $ wait until device return n
# RN2483 always return string followed by "rn" on each command (ex "okrn")
# so $ wait a response (good or not) before sending next command
# !delay or any $ are not executed when connected via browser web terminal (websocket)
# See schematics here https://github.com/hallard/WeMos-RN2483
# Set ESP Module serial speed (RN2483 is 57600)
# as reminder, it's now done in sketch
# !baud 57600
# !delay 50
# For Hardware boards V1.1+
# -------------------------
# reset RN2483 module
$reset 12
# !baud 57600
# !delay 50
# Wired GPIO to output
$sys set pinmode GPIO1 digout
$sys set pinmode GPIO10 digout
# Light on the LED on all GPIO
$sys set pindig GPIO1 1
$sys set pindig GPIO10 1
# Custom config here
# ------------------
# Set Power Max
$radio set pwr 14 RN2483 RN2483 SHIELD에 대한 TTN OTAA 구성 파일 예제 JOIN rn2483-otaa.txt
# Startup config file for Microchip RN2483 join TTN in otaa
# commands prefixed by ! or $ are executed by ESP all others passed to serial module (RN2483)
# command starting with $ wait until device return n
# RN2483 always return string followed by "rn" on each command (ex "okrn")
# so $ wait a response (good or not) before sending next command
# !delay or any $ are not executed when connected via browser web terminal (websocket)
# See schematics here https://github.com/hallard/WeMos-RN2483
# Your device should have been registered on TTN before using, here is how to
# On the RN2483, use `sys get hweui` and `mac get deveui`
# you then get the devices hweui & deveui, They are probably the same
# then register device on TTN console dashboard
# Then you must setup your keys (obtained from TTN console dashboard)
# Personnaly I prefer setup the 3 fixed values in TTN dashboard
# then put them into the RN2483 module
# then on RN2483 device (1st setup, then don't need to be set again)
# $mac set appeui YOUR_APP_EUI
# $mac set appkey YOUR_APP_KEY
# $mac set deveui YOUR_DEV_EUI
# and saved with `mac save`
# $mac save
# Then Join TTN Network
$mac join otaa 모든 행동을보십시오
http://cdn.rawgit.com/hallard/wemos-rn2483-firmware/master/wemos-rn2483/webdev/index.htm
그건 그렇고, 우수한 @-no-dev spiffs 웹 편집기를 통합하여 http://your_module_ip/edit 해야하는 spiffs의 구성 파일 편집 파일을 인터넷에 연결해야합니다 (따라서 ESP8266 기기가 될 수 있음).
몇 가지 기능을 추가하면 주저하지 말고 변경 요청을 수행하여 변경 사항을 병합 할 수 있습니다.
내 블로그에서 뉴스 및 기타 프로젝트를 참조하십시오