How to test the SiPy (SigFox not available in my country)



  • Hello everybody,

    i prepared my SiPy for transmitting temperature. I made a firmware update, uploaded code to flash memory and registered the device. According to the official Pycom coverage in my country is no SigFox available but there is also a device to device communication possible.

    How can i create my own BTS to test the sigfox device and what code i need for that?

    thank you for your help



  • @dommei I have always been in an area near the Sigfox network and don't know of a way to get data into the Sigfox back end any other way. If you just want to get the data for testing you can just save it to an SD card if you have the PySense or Pytrack or wifi.

    Or are you trying to export the data from the Sigfox back end into a database? If this is the case you are trying to get some test data into the Sigfox backend. I have no idea how to do this Sorry. https://resources.sigfox.com/document/callbacks-documentation might help?



  • @chrisi is there a possibility to trigger a callback without beeing in the sigfox coverage zone? just to test and try to import measurments into a database? ty in advance



  • @chrisi
    thx for your help!



  • @dommei I think your code should work but i haven't tested it. The Sigfox back end allows you to export the data in a CSV file which can be opened in excel and graphed or used in any other similar program. Below i have included a picture of the things you can export but I guess you may only want Data.
    0_1504133969483_SIgfoxbackend.PNG



  • thank you for your answer! helps a lot

    i have another question please:
    now i drive to an area where i have sigfox to test it. i would like to use the temperature sensor. in addition i would like to work with the data afterwards (make a statistic or plot a graph).

    **- is my code ok?

    • how can i work with the data after i uplinked it to sigfox? is there a possibility to download or export the data from the sigfox backend?**

    my Code

    disable heartbeat

    import pycom
    pycom.heartbeat(False)
    pycom.rgbled(0x000000)

    from network import Sigfox
    import socket
    import time

    sensor for temperature

    from SI7006A20 import SI7006A20
    sen = SI7006A20()

    init Sigfox for RCZ1 (Europe)

    sigfox = Sigfox(mode=Sigfox.SIGFOX, rcz=Sigfox.RCZ1)

    create a Sigfox socket

    s = socket.socket(socket.AF_SIGFOX, socket.SOCK_RAW)

    make the socket blocking

    s.setblocking(True)

    configure it as uplink only (Mode = False)

    s.setsockopt(socket.SOL_SIGFOX, socket.SO_RX, False)

    send temperature

    temp = int(sen.temperature())
    s.send(bytes([temp]))

    thank you for your help!



  • You cannot create your own Sigfox base station (for now at least)
    The device to device mode on the SiPy uses FSK modulation

    i.e. set both SiPys to FSK

    fsk = Sigfox(mode=Sigfox.FSK)

    and what you send() from one should appear on the others recv()

    If you're working with Sigfox on a project you can also request what's called a SNEK (Network Emulator) from Developer Relations. Again this is not a base station but emulates a lot of the backend on your own computer. See this link for details: https://github.com/sigfox/sigfox-snek-howto


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.