Can't connect FiPy via LoRa



  • Hello there,

    currently I'm trying to connect my FiPy via LoRaWAN with OTAA to Pybytes, but it's not working. As gateway I'm using a "The Things Gateway".
    Previously I was able to connect my FiPy via Wifi, which worked perfect. But with OTAA it's not even connecting.
    This is what I get at Atom's Pymakr console:

    Firmware: 1.18.1.r7
    Pybytes: 0.9.2
    Pybytes configuration read from /flash/pybytes_config.json
    Unable to connect to Pybytes: 'NoneType' object has no attribute 'nvram_restore'
    'NoneType' object has no attribute '__connection_status'
    'NoneType' object has no attribute '__connection_status'
    Pycom MicroPython 1.18.1.r7 [v1.8.6-849-ac2b18f] on 2018-12-17; FiPy with ESP32
    Type "help()" for more information.
    >>>
    

    main.py:

    from pysense import Pysense
    from SI7006A20 import SI7006A20
    
    py = Pysense()
    si = SI7006A20(py)
    
    pybytes.send_virtual_pin_value(True, 1, si.humidity())
    pybytes.send_virtual_pin_value(True, 2, si.temperature())
    

    Is there eventually anything I've been overlooking/doing wrong? I'm glad for any help regarding this issue.



  • @weingami Hi, I deployed hotfix and tested wifi, sigfox and lora connections. I correctly received the data.

    We need to test more things and there are a few more bugs, that we know and we're about to fix now.



  • @xykon
    Sweet, that's quick customer service. Thank you!


  • administrators

    @weingami I just checked with the Pybytes team they will deploy a hotfix for this on Monday.



  • @paul-thornton
    Unfortuneately the issue still persists in the same manner. (It is indicated but not shown in the signal graphs) I even tried a five second sleep or just sending one value and the results were the same.
    To verify everything else was working correctly I also let my FiPy connect via Wifi which worked perfectly.

    Also after adding a microsoft Azure integration it came to my attention that when data is delivered via wifi azure IoT Hub indicates that data has been received, but it does not seem to receive any messages when any data is sent via LoRa even with 1.18.0.r1



  • @weingami

    Heya, We recently rate limited messages to pybytes to 1/second. Sadly it seems to cause issues sending multiple pin values at once in quick succession (Were working on it).

    Does it work ok if you put a sleep between the calls to send_virtual_pin()

    from pysense import Pysense
    from SI7006A20 import SI7006A20
    import time
    
    py = Pysense()
    si = SI7006A20(py)
    
    pybytes.send_virtual_pin_value(True, 1, si.humidity())
    time.sleep(1)
    pybytes.send_virtual_pin_value(True, 2, si.temperature())```


  • @xykon
    Please excuse my late reply.

    The Errormessage seems to be gone now.

    Upload done, resetting board...
    OKets Jun 8 2016 00:22:57

    rst:0x7 (TG0WDT_SYS_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:0x3fff8028,len:8
    load:0x3fff8030,len:1728
    load:0x4009fa00,len:0
    load:0x4009fa00,len:14584
    entry 0x400a059c
    Pybytes library: v0.9.0
    WMAC: 807d3ac325d8
    Firmware: 1.18.0.r1
    Pybytes configuration read from /flash/pybytes_config.json
    Trying to join LoRa.OTAA for 15 seconds...
    Setting up LoRa socket...
    Connected using LoRa
    __check_lora_messages started
    Pybytes connected successfully (using the built-in pybytes library)
    Now starting user code in main.py
    Pycom MicroPython 1.18.0.r1 [v1.8.6-849-9569a73] on 2018-07-20; FiPy with ESP32
    Type "help()" for more information.
    >>>
    

    Data is received acording to the dashboard
    0_1547217909036_de09f0b0-5dd8-4423-bce1-0759f4b0c7b0-image.png

    Though none of the data seems accessible:

    0_1547218005796_20e8c10f-5553-476d-934a-dc2b621a6db6-image.png

    any ideas regarding what could be wrong here?


  • administrators

    @weingami My bad... something I messed up in the latest firmware. I'll fix this as soon as possible.

    In the meantime you can use the beta firmware updater to downgrade to the previous Pybytes version 1.18.0.r1 (Enable the field for "Show Advanced Settings" in the Communication window).



  • Hey, Could you try upgrading to the latest 1.20 rc and confirming it still exists there?



Pycom on Twitter