python command fro region info



  • Hi ,
    we buyed a fipy 1.0 board with pysense v1.1
    How can I know the region of my LoraWan module ? Is there a command in python I can type in order to have this info ?
    I want to be sure it's a 868 Europe module.
    Thanks in advance
    Nico



  • @nicolac Yes, you have to update to the lastest firmware, which is like 1.17.3.b1 or later. You can tell the firmware version by the commands:

    import uos
    uos.uname()



  • Thanks Robert,
    if I add the parameter region=LoRa.WU868 , I get the message:

    AttributeError:type object LoRa has no attribute EU868.

    My firmware updated with dfu-util is :
    pysense_0.0.8

    Do I have to reflash again the firmware ?

    Nicola



  • @nicolac What exactly is th errro message? Alternatively you might have to set it with the firmware update tool. I know that I used both variants, but have to go back to my scripts to tell, which one.



  • Hi robert,
    thanks for your quick support.
    I'm going to configure it by code as you suggest.
    I have anerror compiling the following line with pymakr (I'm connected to the wifi of the board):

    lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868)

    It seems it doesnt recognize the "region" parameter when I create the lora object.
    If I omit it , I have no error ; am I using the europe configuration if I dont specify that parameter ?

    Please help.
    Nicola



  • @nicolac The Module can be configured to any region. You will do that during the firmrwae update, or separately with the update tool. You may also specificy the region dynamically when using the LoRa interface with the region parameter. See also the doumentation of the LoRa class at https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.html


Log in to reply
 

Pycom on Twitter