Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TP lora COOC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Monitor
Incidents
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LANGLAIS Charlotte
TP lora COOC
Commits
e7435503
Commit
e7435503
authored
1 year ago
by
LANGLAIS Charlotte
Browse files
Options
Downloads
Patches
Plain Diff
modified: OTAA/main.py
parent
a3135ee8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
OTAA/main.py
+6
-6
6 additions, 6 deletions
OTAA/main.py
with
6 additions
and
6 deletions
OTAA/main.py
+
6
−
6
View file @
e7435503
...
...
@@ -22,9 +22,9 @@ def connect_to_ttn(lora_object):
pycom
.
heartbeat
(
False
)
app_eui
=
ubinascii
.
unhexlify
(
'
0000000000000000
'
)
app_key
=
ubinascii
.
unhexlify
(
'
1303DBC6209F8C44DFC1DF35471B9237
'
)
# replace the dash by the AppKey provided by TTN
app_key
=
ubinascii
.
unhexlify
(
'
----------------
'
)
# replace the dash by the AppKey provided by TTN
#uncomment to use LoRaWAN application provided dev_eui
dev_eui
=
ubinascii
.
unhexlify
(
'
70B3D54992CDBDD6
'
)
# replace the dash by the DevEUI provided to TTN
dev_eui
=
ubinascii
.
unhexlify
(
'
-----------------
'
)
# replace the dash by the DevEUI provided to TTN
pycom
.
rgbled
(
0xff0000
)
#red
time
.
sleep
(
1
)
...
...
@@ -56,7 +56,7 @@ for i in range (20):
s
.
send
(
pkt
)
time
.
sleep
(
4
)
# without downlink transmission first
rx
,
port
=
s
.
recvfrom
(
256
)
if
rx
:
print
(
'
Received: {}, on port: {}
'
.
format
(
rx
,
port
))
time
.
sleep
(
6
)
#
rx, port = s.recvfrom(256)
#
if rx:
#
print('Received: {}, on port: {}'.format(rx, port))
#
time.sleep(6)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment