redbear / duo Goto Github PK
View Code? Open in Web Editor NEWResources for the RedBear Duo IoT development board.
Home Page: http://redbear.cc/duo
Resources for the RedBear Duo IoT development board.
Home Page: http://redbear.cc/duo
On iOS version 11, using the RedBear Duo App, when I try associating the Duo to a Wi-Fi Access Point/Router, the App crashed.
It works fine on iOS 10.
Current firmware is still based on 0.6.1-rc3 as I understand. Particle has released 0.6.3 and having 0.7.0-rc4 at this moment. Do you have any plan to merge the updates from upstream to duo's branch?
Steps to reproduce:
To reset a flashing with dfu-util is needed.
All the links that point to https://redbear.cc/duo give an error page.
Hi,
i followed the instructions of windows driver installation and dfu-util. But when I typed in ``dfu-util -l" the following message prompts: Cannot open DFU device 2b04:d058.
The device manager shows up "Duo DFU Mode", but with a exclamation mark.
I tried serval times to reinstall the usb driver.
Any ideas, what's I'm doing wrong?
I use Windows 10 home,
I don't have a bug to report, but I was wondering if there are any existing projects out there that demonstrate using the Duo as a slave MCU, communicating over SPI/Serial with another MCU?
First - this thing is a great piece of hardware.
Second - have you read your guide? your guides lead to guides that lead to guides and now I have an app on my android in chinese, outdated firmware that I'm still trying to figure out how to update, like 4 different pieces of software and multi-page read-me's on how this is somehow all suppose to be easy...
Particle Photon (the complicated version - install node & particle-cli): particle update
the end - or just flash a sketch from their web ide with the latest version of the firmware picked.
Redbear duo (the simple version): I literally don't know where to begin.
Somehow I managed to get all this going a few years ago... I was expecting after that much time for the process to have been simplified, but its worse! I got the RBLink cause I wanted some expansion options - which apparently means I need software written not by redbear.. and your versions don't match up btw: "STM32 ST-LINK Utility v3.9.0.exe" as "linked" to from ST-LINK Utility Which version was that again? Zadig? Unsigned drivers?
I'm sure someone with some knowledge is going to rip me a new one at how simple it really is and that I've been looking at old/wrong instructions... just keep in mind I got here from the link(s) on readbear.cc that send me to the kickstarter page AND the github page... PLEASE simplify this process.. I ran out of ibuprofen.. not kidding, my head actually hurts right now. what should have taken 10 minutes wasted the 2 hours of time I gave myself to fiddle before work and I still don't have something that works. Simplify this mess and you'll be golden - keep it complicated, you might as well just put a big sign on your site (with a link to another site) that says 'Degree in pain management required, signature required with parental consent'
I did factory reset to the device. I released the setup button when the green light was blinking after that i the device is constantly blinking white light for every 5 seconds and i cannot see the device in any port under my laptop.
I tried to install driver again using the DFU mode but still i am getting the same issue how to fix this problem
Is my device broken?? else is their any solution
Thanks in advance
I burned the bootloader using Arduino board support v0.3.1, and found I needed to chmod dfu-util. It was set to 0644, I set it to 0755.
After that I was able to flash the bootloader successfully.
Hi,
Yesterday I was testing my RedBear Duo with the Duo_RGB sketch and it was working perfectly. After that, I tried to to update the firmware via DFU-Util but it did not work. I also confurated the Wifi via Putty (this part i think worked, the GREEN LED was flashing after the process).
But today, I can not upload another sketch, because appear the error "Port Busy". If I press any button (SETUP or RESET) or unplug the board, my computer runs into the error WDF_VIOLATION (appear the famous blue screen and restart the computer).
Any ideia about what is happening?
I'm attempting to compile some legacy (but pretty recent) Arduino code for use with RedBear Duo. The digitalPinToInterrupt() definition is missing. This typically belongs in pins_arduino.h
Code fails to compile as shown:
C:\Users\don_o\Work\ArduinoSketches\libraries\MAX31856\MAX31856.cpp:63:57: error: 'digitalPinToInterrupt' was not declared in this scope
attachInterrupt(digitalPinToInterrupt(DataReadyPin),
I do not use brew very often so not sure what to do where this happens:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/dfu-prefix
/usr/local/bin is not writable.
You can try again using:
brew link dfu-util
So I thought ok use sudo brew link dfu-util but I get
Error: Cowardly refusing to `sudo brew link`
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
So I think the instructions need to be clearer
Where can I find a goodf tutorial, especially oriented to the ble part, I have experience with arduino and rpi, but I cant seem to find any on Duo. Thanks!
Hi
I got the following error when I tried to open the Duo-master\apps\android\DuoApp in Android Studio Version 3.1.2:
Error:Unsupported method: BaseConfig.getApplicationIdSuffix().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
I am fairly new to Android Studio so not too sure on the meaning of the error. Any help is greatly appreciated.
C:\Users\giova\Downloads>dfu-util-static.exe -d 0483:DF11 -a 0 -s 0x08000000 -D c:\Users\giova\Downloads\SS-1000USB.bin
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Cannot open DFU device 0483:df11
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuDNLOAD-IDLE, status = 0
aborting previous incomplete transfer
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 48244
Download [= ] 4% 2048 bytesError during special command "ERASE_PAGE" get_status
I am using redbear duo as my device to receive messages from the IBM IOT platform. I am able to send messages to the platform, but not able to receive messages. The callback function is never invoked.
The MQTT broker seems fine without any issues. Is there any problem with the MQTT client in receiving the messages that it has earlier subscribed for?
My code is here
#include <MQTT.h>
char *IOT_CLIENT = "d:::<device_id>";
char *IOT_HOST = ".messaging.internetofthings.ibmcloud.com";
char *IOT_PUBLISH = "iot-2/evt/count/fmt/json";
char *IOT_SUBSCRIBE = "iot-2/cmd/channel/fmt/json";
char *IOT_USERNAME = "xxx";
char *IOT_PASSWORD = "yyyy";
#if defined(ARDUINO)
SYSTEM_MODE(SEMI_AUTOMATIC);
#endif
// your network name also called SSID
//char ssid[] = "TP-LINK_1CE8";
char ssid[] = "D-Link_DIR-524";
// your network password (key)
char password[] = "xxxx";
void printCurrentNet();
void printWifiData();
int count = 0;
void callback(char* topic, byte* payload, unsigned int length);
MQTT client(IOT_HOST, 1883, callback);
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(115200);
Serial.println(PLATFORM_ID);
// attempt to connect to Wifi network:
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid);
WiFi.on();
WiFi.setCredentials(ssid,password);
WiFi.connect();
while ( WiFi.connecting()) {
// print dots while we wait to connect
Serial.print(".");
delay(300);
}
Serial.println("\nYou're connected to the network");
Serial.println("Waiting for an ip address");
IPAddress localIP = WiFi.localIP();
while (localIP[0] == 0) {
localIP = WiFi.localIP();
Serial.println("waiting for an IP address");
delay(1000);
}
Serial.println("\nIP Address obtained");
printCurrentNet();
printWifiData();
client.connect(IOT_CLIENT, IOT_USERNAME, IOT_PASSWORD);
if( client.isConnected() ) {
Serial.println( "Connected." );
client.subscribe(IOT_SUBSCRIBE);
}
}
void loop() {
if( !client.isConnected() ) {
Serial.println("Reconnecting...");
client.connect(IOT_CLIENT, IOT_USERNAME, IOT_PASSWORD);
client.subscribe(IOT_SUBSCRIBE);
}
//
count = count + 1;
client.publish(IOT_PUBLISH, getJson(count));
client.loop();
Serial.print( "Count: " );
Serial.println( count );
delay( 10000 );
}
void printWifiData() {
// print your WiFi IP address:
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
Serial.println(ip);
// print your MAC address:
byte mac[6];
WiFi.macAddress(mac);
Serial.print("MAC address: ");
Serial.print(mac[5], HEX);
Serial.print(":");
Serial.print(mac[4], HEX);
Serial.print(":");
Serial.print(mac[3], HEX);
Serial.print(":");
Serial.print(mac[2], HEX);
Serial.print(":");
Serial.print(mac[1], HEX);
Serial.print(":");
Serial.println(mac[0], HEX);
}
void printCurrentNet() {
// print the SSID of the network you're attached to:
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print("signal strength (RSSI):");
Serial.println(rssi);
Serial.print("Encryption Type:");
Serial.println(WEP, HEX);
Serial.println();
}
String getJson(int no){
String message = "{";
message += ""no":";
message += no;
message += "}";
return message;
}
void callback( char* topic, byte* payload, unsigned int length ) {
Serial.println("Message Received by Device");
char p[length + 1];
memcpy(p, payload, length);
p[length] = NULL;
String message(p);
Serial.println(message);
}
Currently running OSX: 10.13.5
Arduino: 1.8.5
Arduino Duo Firmware: 0.3.0 (loaded when purchased)
Installed Board Libraries: 0.3.2 (via https://redbearlab.github.io/arduino/package_redbear_index.json)
What I've tried:
avrdude: error: programmer did not respond to command: write block
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 2b04:d058
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: dfu-util: error get_status
`
I have ensured that the duo is in dfu mode with the blinking yellow light prior to trying to push the latest firmware.
I'm assuming the board manager version needs to be matched with the firmware version in order to upload sketches to the board.
After many days of tinkering and debugging I’ve finally found a workaround but it doesn’t seem to be a proper solution.
Please refer to the logs I’ve posted here for my findings: BLEController Sketch Not Working with BLEController App using duo
After swimming through the docs on github, it tried changing the sample code from all sendNotify to all sendIndicate and all the examples and my custom app works now. What is the inherent difference between the two? The docs are just a copy and paste...
At the end of the day, I recently purchase the duo and I spent some time loading your samples onto it for BLEController and SimpleChat, both of which have problems when calling sendNotify.
With BLEController, it scans and finds the device and upon connection it doesn’t receive a response and disconnects.
With SimpleChat, on first run it can only receive one message from the duo. After that all other messages are discarded.
In both cases, the duo is still able to receive messages fine, while not being able to send.
After digging into the GitHub docs, I found that there was another send function sendIndicate which I converted all your sample code to using and the both started to work as expected.
I’m wondering if there is something inherently wrong with the base sendNotify function in the latest version of the firmware.
I looked up (and confirmed through experiencing it) that sendIndicate does not get as fast of a response and causes noticeable latency when sending large amounts of data as per the nature of indications. We want to use notifications at the end of the day.
Using the RedBear MiniBLE and the Shield, both send data fairly fast. Examples are not working for the duo.
Device: iPhone X
iOS: 11.4
Arduino RedBear Duo Board: v0.3.2
Firmware: v0.3.2
OS: OSX
Also have confirmed same problems on an Android phone.
Thanks,
Warren
Is there possible to set the duo to low power mode ? If do, is there any tutorial on that? Thx for help
The device id must be available in order to associate the device with the particle cloud.
You only get one chance to observe this detail and it is not in the direct path to setup completion. Please make the device id available more prominently in the app, or make the device id part of the webpage hosted by the device alongside the LED control.
Hi,
Could you please provide the sample code for all platform which you shown in video https://www.youtube.com/watch?v=JswRiM87LZc
We have acquired MFI license, I can share details with you if required.
Can you please add a link in the readme file to the examples I had trouble finding any of these and I'm sure they would be useful for others to know when getting started.
hello,
can you send me the step 3d of RedBear Dua board ?
thank
Hi there,
I have issue of intermittently losing wifi connection. It connect to the Particle cloud and publish the data just fine but after about 20-30 minutes, it loses connection and the LED flashing green. A hard reset sometime put the wifi back online and sometime, it stuck at flashing green. Any ideas what's going on? I'm using the latest firmware (0.2.4).
Thanks,
Shawn
I have 10 redbear duo, all received the 0.3.1 update. After that, when I get into listen mode I can't see the SSID on my wifi (PC, iPhone ...etc)
I made a hard reset, SoftAP back to work. Repete all the process, set up with the credentials, flash the app via Web IDE, get into listen mode and stoped working again, even with example Blink app
What I can do?
Brand new to this and not clear on this step in the Getting Started document:
$ screen /dev/tty.usbmodemXXXXX
where XXXXX is your Duo device serial port.
Where / how does one find the XXXXX?
Hi,
I have encrypted a file using Winzip with AES-128 encryption. The password i applied is "12345678".
The Salt value stored in the encrypted zip archive is 8 bytes i.e. [0xa4 0x94 0x72 0xce 0x84 0x16 0x84 0x05].
Now i tried using the following:
fcrypt_ctx ctx;
int mode = 1;
unsigned char pwd[8] = {'1','2','3','4','5','6','7','8'};
unsigned char salt[8] = {0xa4,0x94,0x72,0xce,0x84,0x16,0x84,0x05};
unsigned char pwd_ver[2] = { 0 };
fcrypt_init(mode,pwd,8,salt,pwd_ver,&ctx);
printf("Password Verifier : 0x%02x 0x%02x\n",pwd_ver[0],pwd_ver[1]);
The output i.e. "Password Verifier" comes out to be [0XEA,0X43] which is not the same Password verifier i extracted from the ZIP archive [0X97,0XB1] using the same SALT and PASSWORD.
Have i missed anything ?
I am interested into learning how to extract firmware and editing it myself and then reinstalling into various devices. I came across your page here and am wondering how do i go about getting the various hardwares associated with dfu-util
Provide option on Arduino to compile and upload through RBLink, as the RBDuo appears as a mass storage device to drag-and-drop the executable into, à la mbed.
After upgrade to firmware 0.3.0 or 0.3.1, BLE connection is not found on Listening Mode.
Greetings,
I'm trying to interact with the RedBear DUO using Postman (popular HTTP client) to understand the DUO's endpoints before building a programmatic interface. The GET endpoints work welll; however, when attempting to use POST against the configure-ap or connect-ap endpoints I don't receive a response from the device.
Can you tell me what (if any) headers should be included in the POST? I noticed that I receive not response to GET requests if I include a Content-Type header; however, a do receive a Content-Type header in the GET response.
Thanks, I'm following the information list here: https://github.com/redbear/Duo/blob/master/docs/listening_mode_setup_protocol.md#wifi-softap
下载了duo_windriver,按照教程安装驱动时,显示“找不到驱动文件”是怎么回事,电脑是window7
In getting started instructions you tell the user to get zadig, but you should even explain what the purpose is (install drivers for DFU).
In firmware0.2.2 ,after Dfu user-part the led will flash magenta after flash cyan
Hi, can you please upload the sample code for HomeKit stuff?
Like the example you show in this video:
https://www.youtube.com/watch?v=-m54v82nr00
Hello,
After flashing FW with particle.io my redbearDuo is stuck in a blinking Green light cycle. I cannot change to FW via serial because there seems to be no valid DFU suffix signature:
Filter on vendor = 0x2b04 product = 0xd058
Opening DFU USB device... ID 2b04:d058
Run-time device DFU version 011a
Found DFU: [2b04:d058] devnum=0, cfg=1, intf=0, alt=0, name="@internal Flash /0x08000000/01_016Ka,02_016Kg,01_016Kg,01_064Kg,07*128Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash "
Any ideas how to solve this isue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.