Boron Fail with Asset Tracker V2 and lib AssettrackerRK

Hello everyone,
I understand that the pin of the terminal board is not compatible with the AssetTRacker v2, but I do not think that this limits me to directly connect the terminal board to the pins that the GPS requires to operate these are TX, RX, GND, 3V3, D6.
I have a problem with this connection, the terminal cannot advance when the line of t.gpsOn () passes; and it starts to restart, but when I take out the D6 pin cable the program continues and the GPS obviously does not work, as long as I connect the D6 pin the button restarts and falls back into the same part of the code.
What is really the problem with the Boron?
I have an Electron that has no problem with this same configuration (without plugging the electron into the GPS terminals, if not by cables (TX, RX, GND, 3V3, D6).

I start to try with cables because i have the same issue with the classic adapter. I bought this because in the page said it’s to be compatible with legacy accesories. After this, I read on this great community that the accelerometer will not work, just the GPS, and even this is not working. BTW, I’m ussing this library: AssettrackerRK and the examples on this.
Version firmware 1.4.2, 1.3.1, 1.2.1-rc.1 BORON
version in AssettrackerRK 0.2.3, 0.1.9, 0.1.7

#include<AssetTrackerRK.h>:
#include <Particle.h>;
//**************************************************************************************************
SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);
//**************************************************************************************************
FuelGauge fuel;
int LED = D7;
//**************************************************************************************************
AssetTracker t;
unsigned long startFix = 0;
bool gettingFix = false;
//**************************************************************************************************
char payload[260];
const int IDE = 2;
float lat = -34.148716;
float lon = -70.778968;
long Counter = 0;
float mem = 0.00;
float bat = 0.00;
float vol = 0.00;
float rssi = 0.00;
char hora[8];
//**************************************************************************************************
void setup()
{
Serial.begin(9600);
delay(5000);
t.gpsOn();
t.startThreadedMode();
}
//**************************************************************************************************
void loop()
{
delay(5000);
CellularSignal sig = Cellular.RSSI();
Counter++;
mem = System.freeMemory();
bat = fuel.getSoC();
vol = fuel.getVCell();
rssi = sig.rssi;
//**************************************************************************************************
if (t.gpsFix())
{
lat = t.readLatDeg();
lon = t.readLonDeg();
}
sprintf(payload, "{\"Id\":%i,\"T\":%02d/%02d/19T%02d:%02d:%02d,\"B\":%0.2f,\"V\":%0.2f,\"R\":%0.2f,\"M\":%0.2f,\"LT\":%0.7f,\"LD\":%0.7f,\"E\":%i,\"C\":%i}", IDE, Time.day(), Time.month(), Time.hour(), Time.minute(), Time.second(), bat, vol, rssi, mem, lat, lon, 1, Counter);
Serial.println(payload);
}

I just received a Classic Adapter in order to use a Boron with mesh and GPS tracking - I run into the same issues above using the same code and similar firmware versions. The AssetTrackerRK library doesn’t seem to work (it won’t even compile) with a Boron/Classic Adapter/AssetTrackerV2 configuration.

The Boron works fine (seems to anyway) but I can’t use any of the AssetTracker V2 features. As above I also bought this because in the page said it’s to be compatible with legacy accessories.

Is there any update to this issue? It’s not a game ender but it does put a wrench into plans…

What would the error message be?

Thanks for responding so fast! Really appreciate it.

When I try to compile it will ‘Fail To Flash’ and the error log says:

In file included from lib/AssetTrackerRK/src/AssetTrackerRK.h:7:0,
from src/fred_hub_boron_001.ino:2:
lib/AssetTrackerRK/src/TinyGPS++.h: In member function ‘TinyGPSLocation TinyGPSData::getLocation() const’:
lib/AssetTrackerRK/src/TinyGPS++.h:670:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^

This is a warning which should not prevent a successful build.

This warning only inidcates that the respective function would be expected to return a value but fails to do so.
However, as long this missing return value is not actually used (which would then produce an error) you should be safe to procede.

So this warining is not the reason for the failure to flash.
There can be other reasons like bad reception on the Boron’s side or even a false flag when the flash did actually succeed but the acknowledgement didn’t come back in time for the IDE to learn about the fact.
You can check console.particle.io/events to see how the OTA update process reaches individual steps which should eventually end in a new app-hash event.

So I just tested my original Electron and AssetTrackerV2 and found I was able to Flash a slightly modified version of the code above (changed the print statement and added AUTOMATIC) and it worked as expected. It serial printed out the lat/lon and the GPS light was flashing.

When I tried to Flash the same code to the Boron/Classic Adapter/AssetTrackerV2 I can’t seem to Flash it - I get the error:

make[3]: *** […/build/target/user/platform-13-m/fred_hub_boron_001/OneWire/src/DS18.o] Error 1
make[2]: *** [user] Error 2
make[1]: *** [/Users/philipchatterton/.particle/toolchains/deviceOS/1.4.3/firmware-1.4.3/modules/boron/user-part/makefile] Error 2
make: *** [flash-all] Error 2
The terminal process terminated with exit code: 2

I’m using DFU mode and also monitoring the serial port if that helps.
:slight_smile:

Trying first flashing trough particle-cli or vs code extension particle…

I’m using VS Code with the CLI and Terminal screen. Never had an issue with the process.

I went to DFU mode because the “cloud Flash” wasn’t working either.

As a standalone Boron on the adapter it works but when I try to use the AssetTrackerRK library it’s failing…

Not the end of the world as the mesh is the key feature I need but it would be nice to have the GPS.

Can you try the 1_SimpleGPS sample?
For me that builds fine for Boron 1.4.2 and 1.4.3.

Are you using mac or windows? I use mac, and sometimes, I don't know why, VSc ask me to repair some thins on it. Are you sure you have the toolchain installed? Could you try uninstalling the toolchain and installing again?

After a weekend of testing alas I cannot get the Boron working with an AssetTrackerV2 and the Classic adapter. Here’s what I’ve tried…

  • Plain code with nothing in setup and loop. No libraries installed
    -> Compiles & Runs as expected. It doesn’t do much but it connects to cellular and works normally

  • From the WebIDE I tried flashing the example GPS AssetTracker code
    -> Compiles but Boron flashes green and never connects

  • I tried the AssetTrackerRK library example(s) with the library installed but without TinyGPS++ installed
    -> Compiles but flashes white indicating the cellular module is off

  • I tried the 6_BackwardCompatibleAPI example with AssetTrackerRK installed
    -> Compiles but then blinked green and then red flashes (SOS perhaps)

  • I tried my working and tested Electron code with the AssetTrackerRK library installed with TinyGPS++ installed
    -> Does not compile. Same errors as the question I posted.

  • I tried the AssetTrackerRK library example(s) with the library installed with TinyGPS++ installed
    -> Does not compile. Same errors as the question I posted.

I have tinkered but can’t seem to get to a working version.

Any thoughts would be appreciated…

Try to disable the path of pin D6 on the LEGACY adapter, then on ASSETV2 connect the GND and D6 with a wire, finally fit the LEGACY with the BORON, ASSETV2 (GND -> D6), load the code with GPS, 3G and it will work .
The problem is when the ASSETV2 library turns on pin D6, it is at that point in the program that the BORON falls (pinMode (D6, OUTPUT)).
If you do not want to cut D6 on the LEGACY you can use 4 wires connected to RX, TX, GND, 3V3 between the BORON and the LEGACY and ASSETV2 but do not connect the D6 to the BORON if not towards GND.
I currently have 8 BORON + LEGACY + ASSETV2 + BYPASS working fine, the problem with this is not being able to turn off ASSETV2, I hope Particle can give some better suggestion …

Which?

Which example? e.g. 2_GPSCellularOnOff is expected to do that. To enable the cloud connection you'd need to hit the MODE button.

TinyGPS library doesn't need to be installed separately (internally referenced), doing so will most likely result in duplicate definitions.

IIRC "backward compatible" refers to AssetTracker V1

Wed IDE:
‘1_GPS_Features’

AssetTrackerRK library example:
1_SimpleGPS

The 6_BackwardCompatibleAPI is not applicable I guess; the TinyGPS++ ‘include’ line led me to believe it needed to be installed but if it’s included by the AssetTrackerRK.h then no worries.

I will try the “BYPASS” solution listed above when I can. I wouldn’t want to “cut” D6 pin just yet so I’ll use the RX, TX, GND, 3V3 method.

more to come…

Thanks for all the feedback!

WOW! It worked!!! Thanks so much.

After some testing with RX, TX, GND, 3V3 wires and a wire running D6 on the AT to ground it worked.

After more testing I got up the nerve to actually cut pin D6 on the Classic Adapter so it never connects with the AssetTrackerV2; I also ran a small wire from D6 to GRND on the AssetTrackerV2.

I tested the "8_ThreadedMode" in the examples in the AssetTrackerRK library with success. I'll now test my original code that ran on the Electron - it should work I hope.

Thanks again to all who responded.