Only one of my Gateways out of two accepted join request, but still on the terminal I got the message as not yet joined. I saw the device eui displayes in Gateway join request message is APP eui which was false.
I included device eui also in my code(Also I cant be very sure if it is what got my device to join but it worked for me). By the way I used sample code available on pycom docs for LoRaWAN OTAA.
# create an OTAA authentication parameters
device_eui = binascii.unhexlify('FFFFFFFFFFFFFFFFF')
app_eui = binascii.unhexlify('FFFFFFFFFFFFFFFFF')
app_key = binascii.unhexlify('FFFFFFFFFFFFFFFFF')
# join a network using OTAA (Over the Air Activation)
lora.join(activation=LoRa.OTAA, auth=(device_eui, app_eui, app_key), timeout=0)
# wait until the module has joined the network
while not lora.has_joined():
print('Not yet 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)
@johncaipa said in Pytrack GPS API:
@bmarkus I am not an expert in this topic, I need to send the coordinate and accuracy as possible in my project, plus some way to detect when it is moving to send the message. If that parameter HDOP works for me, I'll keep it in mind.
There are no accuracy available in terms of meters. HDOP is a factor in determining the relative accuracy of a horizontal position. The smaller the DOP number, the better the geometry.
@bmarkus said in How to transmit every 30-60 seconds data from LoPy:
@rcolistete said in How to transmit every 30-60 seconds data from LoPy:
LoRa or LoRaWan ?
Regulations are the same for all devices independtly they are LoRa, LoRaWAN or other ISM devices.
To know the packet size = payload + LoRaWan header/etc (typically 13 bytes).
Probably that's something that the Lopy sends for sensors initialisation, you said, you are accessing sensors, right?
In the end, it's not that important, the sensors will answer only if the I2C transaction starts with their i2c address on the bus.
Finally, can you explain me why sleep/wakeup won't be available anymore ?
All these Pysense.got_to_sleep() commands are implemented over I2C, so if you don't call Pysense/Pycoproc libraries then you can't put Pysense+Lopy to sleep. You can still use machine.deepsleep() for Lopy.