I can not find a library for Argon

hello i have a project that the costumer needs to be able to set his wifi credentials on the argon.

I checked out this github page GitHub - Dan-Kouba/ble-wifi-setup-manager

That is exactly what i am looking for but i cant find the library on the web ide or the workbench.

I am pretty new and a bit confused when it says “Add this library to your project (Name: `ble-wifi-setup-manager)”

Would this be on the web ide? I tried and couldnt find the library when i searched for it

Or how would i add the library to my project?

You are referring to this post I guess

As it seems @Dan-Kouba hasn’t published his firmware library yet.

So I’d suggest you post that request there too.

However, in his GitHub repo you’ll find the src folder which provides the sources needed to import into your project manually.

Hi, welcome to the community ! :slight_smile:
as @ScruffR mentioned:

to add this manually to your web IDE you have to use “+” on the top right corner:

and then just copy/paste from scr
I did the automatic_mode_example for you :stuck_out_tongue_winking_eye:
didn’t tested it, but compiling fine over 2.1.0 :+1:


1 Like

Hey there hoovdan630, my apologies I forgot to hit publish in the CLI to make the library public. Should be taken care of now. Let me know if you have further trouble getting it into your project!


Perfect!! everything seems to work. Thanks again!

Hello everyone! Just curious @Dan-Kouba did you test this out yourself to switch to another wifi ssid?

I am having a bit of problems yet… ill explain,

i got my argon and set it up with the app, got it connected to our wifi

I used the web ide and I installed the ble wifi manger library and uploaded the example automatic mode sketch

and then to test it out i went on Web BLE Argon Setup Example webpage and connected to my argon over Bluetooth (did this on chrome on my pc and my android phone)

when i scanned for networks they came up and i thought now its time for a real test, seems to be working!

to do the real world example, i unplugged argon then i logged into my wifi router and changed the name

i plugged the argon back in and the green light blinked like expected, then i connected to it over Bluetooth

here is where i ran up against, when i scanned for networks no networks were found…

i knew that the wifi named changed and was working because i could connect to it with my phone

Or am i doing it wrong maybe?

Have you had a look at the logs the device provides over USB Serial?

Yes i did look at the log using workbench here they are;

this log is when its connected to the networks (it scans successfully for networks)

Serial monitor opened successfully:
0000015397 [comm.dtls] WARN: session has 0 uses
0000158863 [wiring.ble] TRACE: Connected by Central device.
0000158893 [system.ctrl.ble] TRACE: Connected
0000163947 [app.BLEWiFiSetupManager] TRACE: Added message to the queue: {"msg_type":"scan"}
0000163947 [app.BLEWiFiSetupManager] TRACE: State Transition: 1 -> 2
0000163948 [app.BLEWiFiSetupManager] TRACE: String RX: {"msg_type":"scan"}
0000163949 [app.BLEWiFiSetupManager] INFO: key=msg_type value=scan
0000166362 [app.BLEWiFiSetupManager] INFO: WiFi Scan Complete
0000166362 [app.BLEWiFiSetupManager] TRACE: State Transition: 2 -> 1

this log is when i change the networks name (no networks are found when i scan

Serial monitor opened successfully:
0000020674 [wiring.ble] TRACE: Connected by Central device.
0000020692 [system.ctrl.ble] TRACE: Connected
0000030868 [app.BLEWiFiSetupManager] TRACE: Added message to the queue: {"msg_type":"scan"}
0000030869 [app.BLEWiFiSetupManager] TRACE: State Transition: 1 -> 2
0000030869 [app.BLEWiFiSetupManager] TRACE: String RX: {"msg_type":"scan"}
0000030870 [app.BLEWiFiSetupManager] INFO: key=msg_type value=scan
0000036069 [app.BLEWiFiSetupManager] INFO: WiFi Scan Complete
0000036069 [app.BLEWiFiSetupManager] TRACE: State Transition: 2 -> 1

@ScruffR ,@Dan-Kouba have u tried it to see if it works for you?


@hoovdan630 The library works fine for me, including in the situation you are describing. Please change your logging level to ALL for the BLEWiFiSetupManager logger and post the logs.

Additionally, make sure you don’t have other code blocking the loop function that the library needs, otherwise it won’t process the callbacks from the WiFi scan response and send them to your browser.

1 Like

Ah, actually it looks like I removed the logging code from the SSID scan. To see if the scan is returning data, just throw a Log.trace() in at line 90 to dump out the tmp_buf line to the terminal.

something like this? @Dan-Kouba

  char tmp_buf[150];  // Need: ~64 chars + SSID length + null terminator
    while (!wifi_scan_response_queue.empty()) {
        WiFiAccessPoint ap = wifi_scan_response_queue.front();
        int len = sprintf(tmp_buf, 
            "{\"msg_t\":\"scan_resp\", \"ssid\":\"%s\", \"sec\":\"%s\", \"ch\":%d, \"rssi\":%d}", 
            ap.ssid, security_strings[(int)ap.security], (int)ap.channel, ap.rssi
        rxCharacteristic->setValue((uint8_t*)tmp_buf, len);

I got it now…
What i did was i went on the particle app and removed the current wifi credentials then i set them using that Dan made

I’m exited to see what particles next device will look like since mesh isn’t a thing anymore its obvious that particle will release something new

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.