The First False Step
Some time ago I had purchased a LoPy module and a SodaqONE module. The LoPy seemed somewhat simpler to get started with, so I unpacked it first and started reading the online documentation.
It didn’t take me long to realise that the LoPy module is only the gateway to the LoRa netowrk, and that I would need the expansion board to connect it to my computer and update its firware. Doh.
Let’s move on to my Sodaq ONE package.
The Sodaq ONE trials
Following the handy getting started guide, I installed the Arduino IDE and the additional Board Manager for the Sodaq ONE.
Unfortunately the guide stops at the end of the IDE installation, and in order to go further I had to follow the official SODAQ instructional video to be found here. At the end, a simple ‘blink’ example is suggested. Copy/pasting the code won’t be enough tho, as the IDE will complain that
'LED_BUILTIN' was not declared in this scope
This happens as the Sodaq ONE board has different defines for its leds. We can use LED_RED, LED_GREEN or LED_BLUE alternatively.
This is all cool, but towards the end the next problem came up: the board disappears shortly after connecting it with the following goodbye message:
** Boot-up completed successfully!
The USB is going to be disabled now.
It seems that this is quite normal (?), and if you upload your sketch before this message appears then it won’t disconnect again. I fiddled around a bit with the blink example - mostly to get my fingers to type C-style code again - and this is the results. Everything works as expected.
#define TEST_LED LED_BLUE
void setup() {
// Wait for SerialUSB or 10 seconds
while ((!SerialUSB) && (millis() < 10000));
SerialUSB.println("Serial monitor opened...");
pinMode(TEST_LED, OUTPUT);
}
void setupLight(int value) {
digitalWrite(TEST_LED, value);
}
void loop() {
setupLight(HIGH);
SerialUSB.println("...");
delay(500);
setupLight(LOW);
SerialUSB.println("---");
delay(500);
}
This sketch (and others to follow) is available on a github repo.
The next step I wanted to achieve was to connect my device to The Things Network. I live in Amsterdam, which is where the network was born, so that should be a well-covered area. I even contributed back then with the TTN Android SDK, now deprecated. I followed the instructions as per the IoT days 2017 workshop, and grabbed the Sodaq ONE Universal Tracker to get things going, but with little success. Even with all settings correct, the device disconnects and I can’t see any incoming data in the TTN console.
Settings:
GPS (OFF=0 / ON=1) (gps=): 1
Fix Interval (min) (fi=): 1
Alt. Fix Interval (min) (afi=): 0
Alt. Fix From (HH) (affh=): 0
Alt. Fix From (MM) (affm=): 0
Alt. Fix To (HH) (afth=): 0
Alt. Fix To (MM) (aftm=): 0
GPS Fix Timeout (sec) (gft=): 120
Minimum sat count (sat=): 4
OTAA Mode (OFF=0 / ON=1) (otaa=): 0
Retry conn. (OFF=0 / ON=1) (retry=): 0
ADR (OFF=0 / ON=1) (adr=): 1
ACK (OFF=0 / ON=1) (ack=): 0
Spreading Factor (sf=): 7
Output Index (pwr=): 1
DevAddr / DevEUI (dev=): <my_dev_addr>
AppSKey / AppEUI (app=): <my_app_id>
NWSKey / AppKey (key=): <my_network_key>
Num Coords to Upload (num=): 1
Repeat Count (rep=): 0
Status LED (OFF=0 / ON=1) (led=): 0
Debug (OFF=0 / ON=1) (dbg=): 0
Initializing LoRa...
** Boot-up completed successfully!
The USB is going to be disabled now.
As a first day into IoT experiments, I had fun. I am curious about the recent Android Things initiative. But first let’s get this connection to work!
All Tags |
The Netherlands |
61
|
amsterdam |
35
|
Bicycle |
19
|
Chile |
18
|
Valparaiso |
15
|
Australia |
13
|
Art |
12
|
nepal |
8
|
scala |
8
|
akka |
6
|
Santiago |
5
|
France |
4
|
Gouda |
4
|
Paris |
4
|
akka-stream |
3
|
akka-streams |
3
|
dashain |
3
|
everest trek |
3
|
india |
3
|
Italy |
3
|
Melbourne |
3
|
Perth |
3
|
Road trip |
3
|
Rotterdam |
3
|
akka-http |
2
|
Argentina |
2
|
code |
2
|
custom_image |
2
|
custom_summary |
2
|
Delft |
2
|
event-sourcing |
2
|
Geraldton |
2
|
Haarlem |
2
|
leaf_bundle |
2
|
Lille |
2
|
Milan |
2
|
New Delhi |
2
|
New York |
2
|
Punta Arenas |
2
|
Rome |
2
|
Ushuaia |
2
|
Websocket |
2
|
Abcoude |
1
|
akka-cluster |
1
|
amazon web services |
1
|
android |
1
|
aws |
1
|
Berlin |
1
|
Bloemendaal |
1
|
Brisbane |
1
|
chitwan |
1
|
Circus Maximum |
1
|
covid19 |
1
|
Enkhuizen |
1
|
Esperance |
1
|
Fraser Island |
1
|
gps |
1
|
gpx |
1
|
guitars |
1
|
iot |
1
|
Isla Negra |
1
|
japan |
1
|
java |
1
|
Kalgoorlie |
1
|
kathmandu |
1
|
Las Vegas |
1
|
LoPy |
1
|
lora |
1
|
Markem |
1
|
Matisse |
1
|
Mexico |
1
|
Middelburg |
1
|
misc |
1
|
Muiden |
1
|
planning |
1
|
play |
1
|
reactjs |
1
|
refluxjs |
1
|
Reims |
1
|
San Francisco |
1
|
Sodaq |
1
|
Sydney |
1
|
Texel |
1
|
Theo Van Doesburg |
1
|
tokyo |
1
|
Travel |
1
|
tulips |
1
|
USA |
1
|
webjars |
1
|
Weesp |
1
|