clean up repo

pull/1/head
Simon Pirkelmann 2019-11-30 21:17:45 +01:00
parent 7cf2e63d3d
commit 70e3fa3718
12 changed files with 142 additions and 0 deletions

Binary file not shown.

Binary file not shown.

1
stuff/LoraWAN_ABP.txt Normal file
View File

@ -0,0 +1 @@
see here: https://docs.pycom.io/tutorials/lora/lorawan-abp/

BIN
stuff/an-00501.pdf Normal file

Binary file not shown.

BIN
stuff/docu/40001784B.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

33
stuff/notes.txt Normal file
View File

@ -0,0 +1,33 @@
https://www.thethingsnetwork.org/labs/story/build-the-cheapest-possible-node-yourself
https://www.thethingsnetwork.org/community/berlin/post/how-to-build-a-simple-and-very-cheap-lorawan-node-with-arduino
https://www.thethingsnetwork.org/forum/t/cheap-and-simple-lora-node-for-schoolproject/22364/5
https://forum.iot-usergroup.de/t/nucleonbasenode328-arduino-328-pro-mini-lora-gehaeuse-antenne/287
Wahrscheinlich dieses hier:
---------------------------
https://forum.iot-usergroup.de/t/wijnand-s-iot-battery-sensor-board-weiterentwicklung/339/2
http://alf4all.demon.nl/engineering/topics/digital_system_design/targets/Arduino-Pro-Mini_RFM95/index.htm
#################################################
Ended up buying these:
----------------------
https://www.banggood.com/2Pcs-LILYGO-TTGO-LORA32-868Mhz-ESP32-LoRa-OLED-0_96-Inch-Blue-Display-bluetooth-WIFI-ESP-32-Development-Board-Module-With-Antenna-p-1507044.html?utm_design=41&utm_source=emarsys&utm_medium=Neworder171109&utm_campaign=trigger-emarsys&utm_content=winna&sc_src=email_2675773&sc_eh=4a6c1db81031fa671&sc_llid=15150285&sc_lid=105229698&sc_uid=OCFpZipIvn&cur_warehouse=CN
Repo:
-----
https://github.com/lemariva/uPyLora
Tutorial:
---------
https://lemariva.com/blog/2018/10/micropython-esp32-sending-data-using-lora
https://primalcortex.wordpress.com/2017/11/24/the-esp32-oled-lora-ttgo-lora32-board-and-connecting-it-to-ttn/
Demodulation:
-------------
https://electronics.stackexchange.com/questions/278192/understanding-the-relationship-between-lora-chips-chirps-symbols-and-bits

@ -0,0 +1 @@
Subproject commit 16ed9b331d846d54407bd3d7641588471c2dbcb0

91
stuff/setup.txt Normal file
View File

@ -0,0 +1,91 @@
0. Clone the uPyLora github repository:
git clone https://github.com/lemariva/uPyLora.git
Also download the files 'ssd1306_i2c.py' and 'ssd1306.py' from https://github.com/lemariva/uPySensors.git and put them in the uPySensors subdirectory of the uPyLora repo
1. Install esptool
$ pip install esptool
2. Flashing:
esptool.py --port /dev/ttyUSB0 erase_flash
esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20190708-v1.11-132-gc24d81119.bin
3. Setting up webrepl:
Connect using picocom:
$ picocom /dev/ttyUSB0 -b115200
>>> import webrepl_setup
-> enable, set password and reboot
PW for Lora Workshop: lorawork
Connect to local wifi:
>>> import network
>>> sta_if = network.WLAN(network.STA_IF)
>>> sta_if.active(True)
>>> sta_if.connect("<SSID>", "<PW>")
>>> sta_if.ifconfig() # this prints the IP
Use access point to connect:
>>> import network
>>> ap_if = network.WLAN(network.AP_IF)
>>> ap_if.active(True)
>>> ap_if.ifconfig() # this prints the IP
4. Download WebREPL html from http://micropython.org/webrepl
Connect to the access point of the ESP and then connect to the ESP via online Webrepl:
-> Enter IP from above and click connect. Login with password 'lorawork'
5. Upload the files via the WebREPL (using the 'Send a file' dialog):
LoRaDuplexCallback.py
LoRaPingPong.py
LoRAReceiver.py
LoRaSender.py
config_lora.py
controller.py
controller_esp32.py
pymakr.conf
sx127x.py
Also upload the files in the uPySensors subdirectory (in a moment we will create a subdirectory on the ESP32 and move the files there):
ssd1306_i2c.py
ssd1306.py
Note that we did not upload the file main.py at this point! The reason is that this file would get executed each time the ESP32 is reset. We will instead create our own main file soon.
In the WebREPL prompt do the following to create a subfolder and move the ssd* files we just uploaded there:
>>> import os
>>> os.mkdir('uPySensors')
>>> os.rename('ssd1306.py', 'uPySensors/ssd1306.py')
>>> os.rename('ssd1306_i2c.py', 'uPySensors/ssd1306_i2c.py')
6. Test sending/receiving:
Enter the following code in the WepREPL prompt:
import LoRaSender
import config_lora
from sx127x import SX127x
from controller_esp32 import ESP32Controller
controller = ESP32Controller()
lora = controller.add_transceiver(SX127x(name = 'LoRa'),
pin_id_ss = ESP32Controller.PIN_ID_FOR_LORA_SS,
pin_id_RxDone = ESP32Controller.PIN_ID_FOR_LORA_DIO0)
Then repeat steps 1 through 5 with a second LoRa module (but replace /tty/USB0 by /ttyUSB1)
For the second LoRa module enter the following code
import LoRaReceiver
import config_lora
from sx127x import SX127x
from controller_esp32 import ESP32Controller
controller = ESP32Controller()
lora = controller.add_transceiver(SX127x(name = 'LoRa'),
pin_id_ss = ESP32Controller.PIN_ID_FOR_LORA_SS,
pin_id_RxDone = ESP32Controller.PIN_ID_FOR_LORA_DIO0)
On the python prompt of the first module enter:
LoRaSender.send(lora)
On the second module enter:
LoRaReceiver.receive(lora)
The display of the first module should then display an output like the following:
Hello (0) RSSI: -157
The number should be counting up (starting from 0)
The second module should output the same text, but the RSSI will be different (RSSI = received signal strength indicator; this indicates how good the connection is

16
stuff/shopping_list.txt Normal file
View File

@ -0,0 +1,16 @@
Arduino pro mini 3.3 V Version! 1,57 €
-- alternative 328P: 1,36 €
RFM 95 W 4,72 €
Ublox NEO-6M GPS Module GY-GPS6MV2 NEO6MV2 6.19 €
-- alternative ? 2,16 €
Ein / Ausschalter 0,08 €
Battery LiPo 3.7 V 1200 mAh 5,30 €
-- alternative: 4,61 €
3D enclosure (Thingiverse)
total costs as of today, cheapest variant: 1,36 + 4,72 + 2,16 + 0,08 + 4,61 = 12,93 €
and some cables and board
Antenna for base station:
https://de.aliexpress.com/store/product/Glass-Fiber-Antenna-Gain-8dbm-Transmission-range-is-further-LoRa-Gateway-Antenna-with-433-470-868/2805180_32852314761.html

BIN
stuff/waterfall/sdr.wav Normal file

Binary file not shown.