Redboard Artemis bluetooth

ArizonaClark:
I have a sketch that has nothing but a “#include ” at the beginning, and in setup() a “BLE.Begin()”. If I have the board “Arduino MKR WiFi 1010” it compiles cleanly. If I try it with “SparkFun Artemis Dev Kit”, it throws a bunch of error messages.

ArizonaClark, I got a similar compile response from a larger working sketch, but had just added some minimal BLE stuff, something like:

#include <ArduinoBLE.h>

BLEDescriptor blahBlah(“uuid”, “StuffHere”);

BLE bleRadio;

void setup() { bleRadio.begin(); }

The compiler did not seem to mind the BLEDescriptor, but indicated that BLE was an unknown type. My approach and yours vary slightly, you treated BLE as a static object. I created an instance, and then tried to work with the instance. Let the tech support weigh in on this? :?

darrell_6of6:
Last night I entered the Arduino IDE, went to the BoardManager, cut/pasted the new link to https://raw.githubusercontent.com/spark … index.json, and then installed the new 2.0 Arduino Core. This changed the board for my sketch back to a default (Yun?), so I re-set it back to Artemis Redboard. I had some draft BLE code in the sketch ready to try, so I un-commented, and did a verify/upload. (It did not compile, but that is another post topic.) Now after closing the Arduino IDE, the IDE will now no longer open! Attempting to run arduino.exe results in the splash window “Initializing packages…”, “Preparing boards…”, and then disappears. Assumedly, something in the new board support library is amiss… how do I back this out and try again?

I had the same issue and removed package_sparkfun_apollo3_index.json from my .arduino15 directory ( I run on Ubuntu). The IDE would start again. I went to boards manager and it downloaded again. BUT I still have issues. I expect that BOTH package_sparkfun_index.json and package_sparkfun_apollo3_index.json have different info about Apollo3 latest package is confusing… somehow. If you remove package_sparkfun_apollo3_index.json , I can not select an Apollo3 board anymore.

You have to run boards manager first… not sure why yet…

paulvha:
same here… first it does not recognize , which is easy to resolve by including “typedef unsigned int word;” in BLETypedCharacteristics.h.

BUT in … /ArduinoBLE/src/utility/HCIUartTransport.cpp it is not able to recognize the Artemis board (as it is NOT part of the check).

Do we have the wrong ArduinoBLE library or what ??

Come on SparkFun… you can do better than this. Provide a working example or info for changes to apply !!

My earlier problem is solved. I had to include the new link ( https://raw.githubusercontent.com/spark … index.json) in the preferences for Apollo3, it then downloaded version 2.00 ( the original link still indicates that 1.20 is the latest version). After that I could compile an ArduinoBLE ( ButtonLed) without a problem. The fact that ArduinoBLE is mapped INCOMPATIBLE in examples can be ignored. In the ArduinoBLE, library.properties, you need to add apollo3 (all lower case) to architectures to overcome that.

darrell_6of6:
Last night I entered the Arduino IDE, went to the BoardManager, cut/pasted the new link to https://raw.githubusercontent.com/spark … index.json, and then installed the new 2.0 Arduino Core. This changed the board for my sketch back to a default (Yun?), so I re-set it back to Artemis Redboard. I had some draft BLE code in the sketch ready to try, so I un-commented, and did a verify/upload. (It did not compile, but that is another post topic.) Now after closing the Arduino IDE, the IDE will now no longer open! Attempting to run arduino.exe results in the splash window “Initializing packages…”, “Preparing boards…”, and then disappears. Assumedly, something in the new board support library is amiss… how do I back this out and try again?

Found the issue ( I think) in the boards.txt file. In EACH variant defined e.g. : “sfe_artemis_dk.name=Artemis Dev Kit” it is missing an entry called “.build.core=arduino”, in this example “sfe_artemis_dk.build.core=arduino”. This will tell the IDE where the core code can be found for the board. If you had selected one of the Apollo3 boards and closed the IDE, at startup it will fail as there is an empty entry for the mandatory core. Removing the package for Apollo3 Json will cause all the Apollo3 boards to be excluded at start and thus you can use IDE. It will then select the first board it will find in the IDE. So the work around seems to be add for your board this entry with the right prefix for the variant. I have done that in the file attached for the boards.txt file. It solved the issue for me.
boards.txt (10.6 KB)

My boards.txt file already contained the “.build.core= arduino” for each one of the Artemis variants (but the prefix names for mine were quite different than yours). I temporarily removed all Artemis variants in my boards.txt, hoping to re-load them from the IDE. No change. So I just used your boards.txt file verbatim. Same result. Then I renamed the package.json to xxx_package.json_xxx. Also same result. IDE seems to abort no matter what. My next step will be to blow away the IDE and try from a clean start.

paulvha:

darrell_6of6:
Last night I entered the Arduino IDE, went to the BoardManager, cut/pasted the new link to https://raw.githubusercontent.com/spark … index.json, and then installed the new 2.0 Arduino Core. This changed the board for my sketch back to a default (Yun?), so I re-set it back to Artemis Redboard. I had some draft BLE code in the sketch ready to try, so I un-commented, and did a verify/upload. (It did not compile, but that is another post topic.) Now after closing the Arduino IDE, the IDE will now no longer open! Attempting to run arduino.exe results in the splash window “Initializing packages…”, “Preparing boards…”, and then disappears. Assumedly, something in the new board support library is amiss… how do I back this out and try again?

Found the issue ( I think) in the boards.txt file. In EACH variant defined e.g. : “sfe_artemis_dk.name=Artemis Dev Kit” it is missing an entry called “.build.core=arduino”, in this example “sfe_artemis_dk.build.core=arduino”. This will tell the IDE where the core code can be found for the board. If you had selected one of the Apollo3 boards and closed the IDE, at startup it will fail as there is an empty entry for the mandatory core. Removing the package for Apollo3 Json will cause all the Apollo3 boards to be excluded at start and thus you can use IDE. It will then select the first board it will find in the IDE. So the work around seems to be add for your board this entry with the right prefix for the variant. I have done that in the file attached for the boards.txt file. It solved the issue for me. boards.txt

After a complete uninstall/reload of the IDE, I could duplicate what had happened to me before, and editing the boards file to add the “.build.core=arduino” to EACH Artemis type fixed the problem. Thanks Paul! – Darrell

This is getting a bit weird…

Background: I downloaded Paul’s boards.txt, and it didn’t work, so I also went into Arduno->Preferenc es and added darrell_6of6’s link to the board manager. Things went off into the weeds, so I ended up deleting Arduino (saved a few minutes by noticing I still had the .zip file in my ~/Downloads directory), and also did a “rm -rf SparkFun” in ~/Library/Arduino15/packages. Brought up the “clean” Arduino, and used Board Manager to get the “latest” versions.

Interestingly, if I try to compile with Paul’s boards.txt (in ~/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.0.0), I get an error message about “Invalid line format” at line 207. With the version in the 2.0.0, my little example will compile (albeit with many compiler warnings). HOWEVER, (WEIRDNESS) if I quit Arduino and try to bring it back up with the 2.0.0 boards.txt, it (apparently) crashes, but if I have Paul’s version in place, Arduino will come up.

Scoring other points for Arduino: In their infinite wizDUMB, they don’t allow you to “copy text” from the “Errors” window. (I think it might work to change “console.error.file=stderr.txt” to something else in preferences.txt, but since you have to make changes with Arduino NOT running, it doesn’t seem worth the effort at the moment.) And scoring another “blast from the past”, apparently since it has to recompile the libraries every time, it reminds me of how long it took to compile a “hello world” program back in the days of Unix 6 running on a PDP-11/34 (late 70s)…

There was indeed a copy/paste error in the earlier boards.txt. attached the corrected version.

boards.txt (10.6 KB)

Hey, sorry I wasn’t subscribed to this topic and I got tied down with other things. The BLE functionality is only implemented in the version +2.0.0 of the Arduino core; you need to upgrade it (I believe that we noted it in the updated Arduino guide).

That being said I wouldn’t manually change the board definitions/arduino core in the file system. The Arduino IDE can get a little finicky with those changes and files specifically. Use the board manager to upgrade (or uninstall) the Arduino core. However, if you get stuck in that limbo… I recommend going for a fresh install (yeah, I know it’s a pain):

  • Uninstall the Arduino IDE and remove any application specific folders , like the Arduino15 folder and usually (My Documents )Arduino folder.

  • Then, install a fresh instance of the Arduino IDE, board definitions, and libraries. (Note the Arduino IDE version limitation from the guide (below 1.8.12), or else you’ll run into upload issues as well.)

Here is a link to the Arduino IDE guide for the Artemis as a reference: https://learn.sparkfun.com/tutorials/ar … rduino-ide

I am currently running v1.8.5 of the Arduino IDE (sometimes the latest release can be buggy) with v2.0.1 of the Apollo3 Arduino core, and it works well for the ArtemisDK. Unfortunately, I don’t have a board that gets serially uploaded, but my coworker informs me he can upload to his RedBoard Artemis following the guide linked above.

I am trying to use the bluetooth as well, so I attempted the steps noted in this thread. I upgraded the core to 2.0.2. After I tried a couple things unsuccessfully, I tried compiling the simplest example, the “Blink” sketch. That one compiles and uploads, but the LED doesn’t blink. I added Serial messages and nothing is returned. Any help would be appreciated.

In your sparkfun core directory:

c:/Users/YourName/AppData/Local/Ardino15/packages/SparkFun/hardware/apollo3/2.02/variants/SFE_ARTEMIS/variant.cpp

comment out UART Serial1(SERIAL1_TX, SERIAL1_RX); line.

That will fix the Serial problem – at least it did for the Nano.

The LED problem also happens with Edge2 board. Haven’t been able to get it’s LED’s to light either.

Thanks for your response. I commented out that line in “SFE_ARTEMIS/variant.cpp” and in “SFE_ARTEMIS_NANO/variant.cpp” both separately and in both files with no change in being able to get Serial communication back or get the LED to blink.

For reference I should have mentioned, I’m doing this on a Mac, and I’m using the “Sparkfun Variable Loader (Out of Order)” that is marked as out of order, but according to the Arduino IDE, it completes successfully. If I use the “Ambiq” bootloader it says it attempts upload 3 times and fails. I tried changing the Baud rate to all possible options and have no success.

I’m win10. Sparkfun Variable Loader will not work at all. Only Ambiq works. Also, I use a terminal emulator called Termite. It will not display anything or work at all unless the board has completed booting prior to connecting the serial. That’s about all I know about this. Core needs a little work I think.

@matsciguy wrote:

I’m doing this on a Mac

If I use the “Ambiq” bootloader it says it attempts upload 3 times and fails. I tried changing the Baud rate to all possible options and have no success.

Same here.

As for svl, mine failed due to the Big Sur update bug but manual reconfiguration to enable svl.py fixed that (output below). I have yet to verify the BLE LED code is advertising though.

Artemis SVL Bootloader
Script version 1.7

Phase:	Setup
	Cleared startup blip
	Got SVL Bootloader Version: 5
	Sending 'enter bootloader' command

Phase:	Bootload
	have 138976 bytes to send in 68 frames
	Sending frame #1, length: 2048
...
...
...
	Sending frame #68, length: 1760

	Upload complete

	Nominal bootload bps: 9137.18