• ADC working terrible (defect modules?)

    LoPy adc lopy4
    9
    0 Votes
    9 Posts
    79 Views
    S
    The LoPy4 Pin-Out does not show other connections, but these may exist on an expansion board, like the VBatt divider at P16, the User Button at P14 and the Accelerator IRQ at P13. @robert-hh thanks for this reminder; it solved my troubles eventually. One of the LoPy seems to be defective, but on all others, everything is fine now after moving around some pins. Thanks!
  • Raw LoRa

    LoPy lopy4 raw lora
    4
    0 Votes
    4 Posts
    30 Views
    M
    @g0hww thanks for taking the time to respond. Have you any code examples? Very basic push button on one LoPy4 turns on a LED at the other. Mike.
  • 0 Votes
    2 Posts
    33 Views
    J
    @storm-1050 you mean the server is running on the module (WiPy, GPy…) on the Pygate? Or is it running on your computer? If the latter you’ll need them to speak to each other, so you’ll need WiFi or Ethernet. Not sure if you would actually need Internet in this scenario. Have you tried it? What was the result?
  • LoPy4 RGB LED Failing due to Temperature

    LoPy rgb rgbled lopy4 temperature
    1
    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • 0 Votes
    4 Posts
    49 Views
    J
    @d-alvrzx the ESP32 has various sleep modes with various possibilities for wake up sources. The lowest power modes are indeed quite limited by design. IIRC the Pycom firmware uses ext1 wake up. You’ll find details of the different wake up sources of the ESP32 in the ESP IDF docs: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/sleep_modes.html
  • Deepsleep and LoRaWAN issue when awakening

    LoPy lorawan otaa lopy4 as923
    3
    0 Votes
    3 Posts
    41 Views
    B
    @jcaron Thanks for reply. I'm using a private network with Chirpstack and Laird gateway. Yes I know not to use Class C when in deepsleep. Our network is not used in winter (vineyard irrigation) and during this down time we want to sleep our nodes to save battery drain as we have low solar radiation in winter also. We are therefore not sending/receiving messages when in deepsleep. We have been successfully running Class C with 60 nodes for over 2 years, our only issue has been battery life which we are now trying to address. I will try and capture gateway log and post back here. Thanks
  • Checking LoRa connection after connect it

    LoPy lopy lopy4 lora
    3
    0 Votes
    3 Posts
    61 Views
    M
    @jcaron Wow! I was totally confused with the concept! Thank you very much :)
  • Red led

    LoPy lopy lopy4
    5
    1
    0 Votes
    5 Posts
    79 Views
    G
    The 'erase all' is indeed different from the 'erase flash' and 'clear CONFIG / NVS partitions' in the firmware updater tool. Im not sure exactly, but in most cases the 'erase all' in the command line works better than the latter methods, and could indeed provide a solution here
  • 0 Votes
    8 Posts
    180 Views
    A
    @Gijs This is what I get: >>> pybytes.smart_config(True) Smart Provisioning started in the background See https://docs.pycom.io/smart for details >>> Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x4015259c PS : 0x00060f30 A0 : 0x80152bff A1 : 0x3ffd3860 A2 : 0x00000000 A3 : 0x00000001 A4 : 0x3ffdfbbc A5 : 0x00000001 A6 : 0x000000fe A7 : 0x00000001 A8 : 0x800967f0 A9 : 0x3ffd3880 A10 : 0x00000003 A11 : 0x00060f23 A12 : 0x00060f20 A13 : 0x00000001 A14 : 0x000000fe A15 : 0x00000000 SAR : 0x00000020 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000010 LBEG : 0x40094230 LEND : 0x4009425e LCOUNT : 0xffffffff ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000 Backtrace: 0x4015259c:0x3ffd3860 0x40152bfc:0x3ffd38a0 0x401583ac:0x3ffd38d0 ================= CORE DUMP START ================= ================= CORE DUMP END ================= Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff8020,len:8 load:0x3fff8028,len:2128 load:0x4009fa00,len:19760 entry 0x400a05bc It stays at this point until I reboot or something. And when I press reset it goes back to the loop problem.
  • 0 Votes
    2 Posts
    47 Views
    robert-hhR
    @Borja-Blasco Generally it is possible to use the Pins of the camera connector. They are connected to the said Pxx pins. Be aware, that P13-P18 are input-only. Using them as output fails.
  • Capture and save the traceback from error

    LoPy lopy lopy4 traceback
    4
    0 Votes
    4 Posts
    56 Views
    K
    @M-m I put mine in a function def logtraceback(e): which I call from any Exception as e: where I want to log the traceback.
  • 0 Votes
    3 Posts
    52 Views
    J
    while True: rx = s.recv(64) time.sleep_ms(10) if rx: time.sleep_ms(10) rxStr = str(rx).split("'") index = int(rxStr[1]) try: i2c.writeto(56, 255-index) except Exception as error: print("i2c",error) startTime = time.ticks_ms() s.setblocking(True) time.sleep_ms(10) try: s.send("ack") except Exception as error: print("send ",error) time.sleep_ms(10) s.setblocking(False) print(time.ticks_ms()-startTime) wdt.feed() @jcaron thanks for your response. The problem is in the s.send(). I added the setblocking() statements around the statement along with putting it in its own try/except but they are still resetting at least 12-16 times a day. Is there any thing else you think I should check? Gateway setting? I'm using a Multitech Conduit gateway that's running node-red. Thanks again
  • OSError: [Errno 11] EAGAIN problems

    LoPy lopy lopy4 oserror
    8
    0 Votes
    8 Posts
    124 Views
    G
    Hi, I compiled a firmware for you to use on a Lopy4 (here) to check the EAGAIN error cause. For a case without error, it will output the following: Pycom MicroPython 1.20.2.r4 [v1.20.1.r2-357-g6153b01d3-dirty] on 2021-01-18; LoPy4 with ESP32 Type "help()" for more information. >>> Running selected lines >>> >>> Not yet joined... Not yet joined... Not yet joined... Joined b'' [TASK_LoRa] CMD TX [LoRaMAC] returning status 0 > Pycom MicroPython 1.20.2.r4 [v1.20.1.r2-357-g6153b01d3-dirty] on 2021-01-18; LoPy4 with ESP32 Type "help()" for more information. >>> You should be able to use the script you already wrote, but if you want to use the example I used: from network import LoRa import socket import time import ubinascii # Initialise LoRa in LORAWAN mode. # Please pick the region that matches where you are using the device: # Asia = LoRa.AS923 # Australia = LoRa.AU915 # Europe = LoRa.EU868 # United States = LoRa.US915 lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868) # create an OTAA authentication parameters, change them to the provided credentials app_eui = ubinascii.unhexlify('') app_key = ubinascii.unhexlify('') #uncomment to use LoRaWAN application provided dev_eui dev_eui = ubinascii.unhexlify('') # join a network using OTAA (Over the Air Activation) #uncomment below to use LoRaWAN application provided dev_eui #lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0) lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=0) # wait until the module has joined the network while not lora.has_joined(): time.sleep(2.5) print('Not yet joined...') print('Joined') # create a LoRa socket s = socket.socket(socket.AF_LORA, socket.SOCK_RAW) # set the LoRaWAN data rate s.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) s.setblocking(False) # send some data s.send(bytes([0x01, 0x02, 0x03])) # make the socket non-blocking # (because if there's no data received it will block forever...) s.setblocking(False) # get any data received (if any...) data = s.recv(64) print(data)
  • Pygate debug messages over WLAN AP

    Getting Started pygate repl debug ap mode lopy4
    5
    0 Votes
    5 Posts
    77 Views
    D
    @Gijs Yes! Tested rc11 yesterday and it worked just fine. Thx!
  • 0 Votes
    11 Posts
    80 Views
    I
    @jcaron Thanks, I will keep that in mind !
  • Changing runtime parameter on timer class

    MicroPython lopy4 micropython
    1
    0 Votes
    1 Posts
    47 Views
    No one has replied
  • TX_FAILED_EVENT not triggered

    LoPy lorawan lopy4
    2
    0 Votes
    2 Posts
    188 Views
    B
    @berryskies My bad! Stupid error (as usual?). I misread the socket.SO_CONFIRMED option. I thought this was a constant boolean and didn't set the trailing 0 to 1 (slap to forehead). All working as expected.
  • Lopy4 to Lopy4 over Lora Raw pack String

    LoPy lopy4
    5
    0 Votes
    5 Posts
    197 Views
    J
    @Wolli01 start by checking you actually didn’t get it as bytes initially, it is often the case. Otherwise you can use the ˋubinascii.unhexlify` method.