New firmware release 1.6.7.b1 (LoRaWAN Nano Gateway with TTN example!!)
-
Hello!
We are very excited about this one. I know that many around here have been waiting patiently to see the LoPy work as a LoRaWAN Nano Gateway and connect it to servers like TTN, but guess what? we did it :-)
The Nano gateway script is located here: https://github.com/pycom/pycom-libraries/tree/master/examples/lorawan-nano-gateway
For the Nano Gateway itself you need nanogateway, config and main. The other 2 files are examples on how to setup the nodes either with ABP or OTAA join methods.
Before trying the nano gateway make sure to update the LoPy to firmware version 1.6.7.b1 first!
Features/characteristics of the Nano Gateway:
- Single channel and single datarate (for now, multiple datarates on a single channel will come soon).
- Support for Downlinks on any channel and DR.
- OTAA and ABP.
- Semtech packet forwarder protocol version 2.
- NTP sync.
The script uses multithreading and callbacks heavily, so it's a very nice example of the capabilities of the LoPy and MicroPython. The total RAM consumed is only around 22KB.
Features to be added soon:
- Ability to receive packets sent on any spreading factor.
- Add an option to enable and disable debug messages.
- Implement the .stop() method to gracefully stop and start the nano gateway at any moment.
All comments and suggestions are more than welcome.
Cheers,
Daniel -
@daniel Wow - congratulations - I think this is a great accomplishment and use case for LoPys!
-
@simonc thanks! :-)
-
@daniel your links
nanogateway.py,config.pyandmain.pypoint to http://nanogateway.py/ http://config.py/ ... can you link to the git file or delete the hyperlink reference -
I'll definitely try it as soon as possible !
-
@daniel amazing news! lopy weekend, just in time!
-
Hi @daniel congrats about success :)
I do not have Lopy and i am interested if this release have something releated to Wipy2 too?
-
@Clemens thanks. It was never my intention to create Hyperlinks, I just wanted to have then in bold, but somehow the forum treats then as such because of the .py extension, so I have removed that now.
-
@daniel thx, you can avoid autolinking from *.py files by escape them as inline code
Inline `code.py` has `back-ticks around` it.
is
Inlinecode.pyhasback-ticks aroundit.see the Markdown doc e.g. under https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code
-
Exciting to see this finally released! :D Let us know if you deploy your LoPy as a TTN (or other) Nano Gateway - would be cool to see it in use!
-
lora.rssi() is missing at least since 1.6.6.b1... could you fix please?
ah. for anyone wondering lora.rssi() seems to be deprecated in favor of lora.stats() this will output something like:
(timestamp=1502245986, rssi=-39, snr=29, sf=7)
documentation is as usual outdated...
-
@this-wiederkehr sorry, we haven't pushed the latest docs. There's a new method called stats, try:
lora.stats()Which returns a namedtuple that contais the rssi, snr and other usefult data (from the last received packet).
Cheers,
Daniel -
Wow, great development! :-) This is A LOT better than my simple gateway code, well done Pycom team. This will now run permanently on one of my LoPys.
Just a suggestion, there is a convention for Gateway IDs on TTN, they're usually the first 3 bytes of MAC address + FFFE + last 3 bytes of MAC address, so I added the following to config.py:
import machine import binascii CONVENTIONAL_EUI = binascii.hexlify(machine.unique_id()).upper() CONVENTIONAL_EUI = CONVENTIONAL_EUI[:6] + "FFFE" + CONVENTIONAL_EUI[6:12] # Set Gateway ID to the first 3 bytes of MAC address + 'FFFE' + last 3 bytes of MAC address GATEWAY_ID = CONVENTIONAL_EUI # Alternatively uncomment and change this to your fixed Gateway EUI # GATEWAY_ID = '11aa334455bb7788' -
I am not sure why there is no response to this problem... previously posted, so here it is again.
Am I the only trying to do this, or I am missing something obvious...?Is is possible to change SSID of wipi in AP mode?
Following:
import machine
import os
import pycompycom.heartbeat(True)
uart = machine.UART(0, 115200) # disable these two lines if you don't want serial access
os.dupterm(uart)from network import WLAN
wl = WLAN()#trying to change AP properties:
original_ssid = "MyNode"
wl.ssid(original_ssid)original_auth = (3,'bewell')
wl.init(mode=WLAN.AP, ssid=original_ssid, auth=original_auth, channel=6, antenna=WLAN.INT_ANT)
Does not change SSID visible on my iphone.
It remains wipy-wlan-xxx
Am I doing something wrong?Or SSID is hardcoded regardless of what says in documentation:
"wlan.ssid([ssid])
Get or set the SSID when in AP mode. -
Hello @zmrzli,
no idea what you did, but this sequence works for me:
from network import WLANwl = WLAN(AP) wl.init(mode=wl.AP, ssid="My_lopy", auth=(wl.WPA2, "This is a Test"))It takes a while before the change gets visible on the other devices, if these do not scan the networks frequently. Sometimes on cycling Wifi Off/On helps.
-
@zmrzli the answer from @robert-hh is correct, it just works like that, but some devices take a while to scan for networks again or to update the ssid if the MAC address is the same. Try switching the WiFi of your iPhone on and off as suggested.
Cheers,
Daniel -
@jmarcelino thanks for the suggestion! I'll include that on the next nano-gateway release along with the other planned improvements :-)
-
@daniel Congratulations for you and the whole team! I've just upgraded to 1.6.7.b1, and tried the examples (NanoGateway and OTAA node) and... it works like a charm! I'm currently sending my room temperature (from a DS18B20 sensor) on TTN using these examples!
For now, there is no TTN gateway at range at home, I have to move away from my home to find some signal. The possibility to create a "dev" nano-gateway that connects to TTN allows me to work on my projects from home, this is wonderful!
-
Very good news, we were expecting this !. Congratulations to the entire Pycom team.
-
This is really fantastic news. I immediately uploaded the code to by LoPy.
TTN Dashboards shows gateway is connected!
Now I have to test to send messages to it with my other LoPy.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login