Coder Social home page Coder Social logo

duo's Introduction

RedBear Duo


image

The RedBear Duo is a thumb-size development board designed to simplify the process of building Internet of Things (IoT) products. It provides everything you need -- Wi-Fi, BLE and a powerful Cloud backend, all in a compact form factor that makes it ideal for your first prototype, a finished product, and everything in between. More >>

Purchase your RedBear Duo now:

Directories and Files

  • certs/: FCC & CE certifications
  • docs/: Documentation for improving your experience on the Duo
  • driver/: Duo Windows USB driver
  • firmware/bootloader/: Released bootloader images for Duo
  • firmware/dct/: Some configuration files can be applied to Duo's internal DCT
  • firmware/javascript_interpreter/: Released JavaScript interpreter images for Duo
  • firmware/python_interpreter/: Released Python interpreter images for Duo
  • firmware/system/: Released system firmware images
  • firmware/wifi/: Wi-Fi firmware for the wireless module
  • hardware/: Hardware design files, datasheets and pin mapping
  • scripts/: Useful scripts for playing with the Duo

Documentation

References

Tutorials

3rd Party

Resources

Supports

ToDo

  • Add more BLE examples to the Particle Build (Web IDE) and Arduino IDE.

    The BLE examples are not completed yet, for Web IDE, we have not yet added any examples for BLE, if you want to try BLE using Web IDE, please browse this, copy & paste the code to the Web IDE.

  • Reduce power consumption for BLE

    We will work with Broadcom to reduce the power consumption for the Duo BLE.

License

Copyright (c) 2016 Red Bear

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

duo's People

Contributors

cheong2k avatar chihung avatar daliu avatar kennethlimcp avatar lanzhihao avatar mfk-ableton avatar urnenfeld avatar xuguohui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

duo's Issues

Stuck in Green blinking loop

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?

DFU install on OS/X with brew

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

Can't upload sketch to Arduino with latest version

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:

  1. Using 0.3.2 board libraries on 1.8.5 Arduino and opening the redbear duo blink sketch and uploading via USB. avrdude runs and sends and receives a bunch of byte data and stops with the following:

avrdude: error: programmer did not respond to command: write block

  1. I've tried updating the firmware to 0.3.2 (latest) but the two methods have failed:
    a) After fixing the iOS app from the latest pull request from 3 days ago, I connected to the duo using wifi OTA. The app downloads 0.3.2 firmware and repeatedly tries to update it to the duo but upon completion it is still running 0.3.0 from the factory setting.
    b) Using dfu-util, it displays the following:
    `
    MacBook-Pro-5:v0.3.2 qoobit$ sudo dfu-util -d 2b04:d058 -a 0 -s 0x8020000 -D duo-system-part1-v0.3.2.bin
    dfu-util 0.9

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.

DFU user Part

In firmware0.2.2 ,after Dfu user-part the led will flash magenta after flash cyan

SoftAP not wornking after flash app

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?

The Password verification value comes out to be wrong

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 ?

Error opening DuoApp in Android Studio

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.

step 3d

hello,
can you send me the step 3d of RedBear Dua board ?

thank

串口驱动无法安装

下载了duo_windriver,按照教程安装驱动时,显示“找不到驱动文件”是怎么回事,电脑是window7

digitalPinToInterrupt() missing

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),

Receiving message on callback does not work on Redbear Duo

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);
}

sendNotify not working on 0.3.2 board/firmware

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

SoftAP HTTP Endpoint Documentation

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

Tutorials Needed

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!

Can't find device with dfu-util

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,

Device unable to start(10)

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

RedBear Duo App crashes with iOS v11

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.

Duo low power setting

Is there possible to set the duo to low power mode ? If do, is there any tutorial on that? Thx for help

Charlie Foxtrot

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'

Clarification on OSX Serial Port

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?

Losing Wifi Connection

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

Using duo as slave MCU

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?

Where do i buy this device?

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

error at 4% sometime at 30%....

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

Make the device id available after initial pairing.

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.

Specify why one needs zadig

In getting started instructions you tell the user to get zadig, but you should even explain what the purpose is (install drivers for DFU).

Windows WDF_VIOLATION error

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.