@peterp Is this beta release still active?
I thought I would attempt to use it and contribute back with my experience.
I tried with xome lora code that has previously worked but I now get Errorno. 122 EMSGIZE problems on a message that is less than 12bytes!!!!!!
Here is an extract from the output log from my code as well as an extract of the code around where the error is being reported. Previously this line of code has successfully sent data via TTN.
2020/12/07 18:44:06: HW init done
init NV vars
DR: 10, BW: 2
DR: 8, BW: 2
2020/12/07 18:44:09: Trying to join TTN Network!
2020/12/07 18:44:12: Trying to join TTN Network!
2020/12/07 18:44:14: Trying to join TTN Network!
LoRa network joined!!!!!
2020/12/07 18:44:16: lora parameters appear to have saved successfully
date/time = 20 12 3 9 27
sending LoRa data
DR: 13, BW: 2
DR: 8, BW: 2
Traceback (most recent call last):
File "main.py", line 90, in <module>
File "DipBoot.py", line 31, in BootMain
File "DipApp.py", line 906, in AppMain
File "DipApp.py", line 714, in CommsCheck
OSError: [Errno 122] EMSGSIZE
2020/12/07 18:44:18: Pycom MicroPython 1.20.3.b0 [v1.11-db33be7] on 2020-07-01; FiPy with ESP32
Type "help()" for more information.
Here is the code snipet.
# create a LoRa socket
LoRaSock = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
# set the LoRaWAN data rate
LoRaSock.setsockopt(socket.SOL_LORA, socket.SO_DR, 5)
# make the socket blocking
# (waits for the data to be sent and for the 2 receive windows to expire)
# this should take about 2 seconds.
# IF THERE IS SOMETHING WRONG WITH THE SETUP WE WILL PROBABLY HANG IN HERE.
# send some data
# Cayenne, LPP style data format
# channel 1 = level data, analogue input, 2 bytes
# channel 2 = battery, analogue input, 2 bytes
print('sending LoRa data')
LoRaSock.send(bytes([0x01, 0x02])+pack('>h',nvvar['Level']&0xffff)+bytes([0x02, 0x02])+pack('>h',nvvar['Batt']&0xffff))
# make the socket non-blocking
# (because if there's no data received it will block forever...)
# get any data received (if any...)
LoRaRxdata = LoRaSock.recv(64)
print("data received = ", LoRaRxdata)
The error message ocurs on the LoRaSock.send line.
@peterp It is good that the product improves and potential bugs are fixed. Some are not, like the crash and calling lora.reset() on LoPy4 devices. Fixing it just requires adding the missing last entry of the Radio struct in esp32/lora/sx1276_board.c and declaring that entry. It does not even increase the code size. PR #474
Not to mention PR #476, of PR #362, where the change is in the documentation version Dev, but not in the code.
@peterp When I wrote that post it was reproducible using my example. Please try it out just as I posted it and see. I don't have a device on me at the moment, but I can give it another shot in a few hours.
@mxklt said in Firmware Release v1.20.2.r2:
I get an error when i try to use machine.pygate_reset() -> LORAPF_ERROR:pygate_reset failed to reset
Pycom MicroPython 1.20.2.r2 [v1.11-3a7776d] on 2020-11-23; GPy with ESP32
Please update the Pygate FW and try again: https://docs.pycom.io/updatefirmware/expansionboard/
Nice to see that someone started to update the documentation.
I don't know the actual status. When I started many examples were broken or not implemented completely, Not a big deal for professionals, but you target beginners as well. They need running examples.
Experts and beginners struggle together when examples show deprecated or outdated code. This will be problem in the near future. You decided to stop updating LoPys. So we need documentation and examples for different versions.
It will be nice, if the examples are part of your tests, so you can notice bad examples early.
@thinginnovations said in Pygate PoE Adapters:
I think the date should be 6th July
Sorry yes this has been corrected.
@robert-hh said in Pygate PoE Adapters:
For those who want to replace the diode in case it looks bad after de-soldering, it would be interesting to know which diode model can be used.
I'll check with the hardware team
I am just started to dig into to threading, but my understanding is that pycom only support _thread, which has limited functionality compared to threading. Like lack of .start or .stop. Is my understanding false? Cause the sample code is not working on my wipy.