Bluno General Arduino

Wireless programming via two Bluno Beetles

userHead r.w.boedhoe 2019-03-25 20:33:01 5595 Views3 Replies
Hi all,

I am new to this forum and recently bought two Bluno Beetle's. I am using the Arduino 1.8.9 for this project. I want to develop a device that can measure the orientation of an object and send these values with Bluetooth to a nearby computer. I want to integrate one Bluno beetle within the device and connect another one to the computer. I first want to evaluate if communication between the two Beetle's is possible. I followed the wiki page for this device and tried to configure the devices with the AT commands. One of the devices is configured to central and the other one to peripheral. After this I disconnect the peripheral device and connect it to an external power supply and try to upload the following code to the peripheral Bluno Beetle with bluetooth:

void setup() {
Serial.begin(115200); //initial the Serial
}

void loop() {
if (Serial.available()) {
Serial.write(Serial.read());//send what has been received
Serial.println(); //print line feed character
}
}

This is the basic code that can be found on the wiki page. I notice the LED is blinking on both of the Bluno Beetle which should mean that both of the devices are connected with Bluetooth. In the Arduino IDE-->Tools-->Port I can only select the central device as the peripheral is disconnected. I try to upload the code to the central device which I think should automatically upload it to the peripheral one.

I get the following error when I try to upload it to the central device:

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM12
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x20

avrdude done. Thank you.

An error occurred while uploading the sketch

How can this error be solved? I appreciate any advice.

Kind regards,

Raoul
The Netherlands
2019-03-28 22:46:44 Thanks for both of your replies. Robert, for both BLE devices I have as input: AT+BLUNODEBUG=OFF.

Graham, I do not fully understand what you meant. The peripheral device is connected to an external power supply and the central device is linked with a micro-USB cable to the computer. I turned off the Bluetooth of my laptop. I assume that the peripheral device can only be connected to the central device. The central device is configured with AT+SETTING=DEFCENTRAL. This should mean that the device is connected to the initial host settings according to this page https://www.dfrobot.com/wiki/index.php/ ... User_Guide . But this step is written on the wikipage of this device https://www.dfrobot.com/wiki/index.php/ ... ng_via_BLE . The peripheral device is configured with AT+SETTING=DEFPERIPHERAL, this should mean that the device is configured to the initial slave settings. So I do not think the peripheral device is connected to the initial host settings but the central device is.

I can connect to AT mode via the serial monitor. I am not fully aware how to connect to AT mode via the serial port.

Kind regards,

Raoul
userHeadPic r.w.boedhoe
2019-03-28 19:10:24 When you get
not in sync: resp=0xNN

1) This will not work if the BLE is connected/paired to a host. Try and stop this and then upload your sketch
2) If that still doesn't work, but you can connect to AT mode via serial port (I have this problem whenever I put the Bluno in HID mode) you should be able to re-upload a sketch again by resetting it with AT+SETTING=DEFAULT
userHeadPic graham
2019-03-28 13:38:15 Have you also input : AT+BLUNODEBUG=OFF for both BLE devices? userHeadPic robert.chen