Trying to connect a Redbear Blend Micro Arduino board over BLE from a Rasperry Pi B+
Raspbian Jessie kernel 4.1.13+ (also tried on wheezy w identical issue)
Bluez 5.37
Tried several different ways of installing Bluez but in essence followed this http://www.elinux.org/RPi_Bluetooth_LE.
pi#raspberrypi:~ $ sudo hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 5C:F3:70:75:A3:EA ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:1722 acl:0 sco:0 events:85 errors:0
TX bytes:788 acl:0 sco:0 commands:70 errors:0
pi#raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
EC:EA:FA:D8:F9:77 BlendMicro
EC:EA:FA:D8:F9:77 BlendMicro
pi#raspberrypi:~ $ sudo gatttool -b EC:EA:FA:D8:F9:77 -t random -I
[EC:EA:FA:D8:F9:77][LE]> connect
Attempting to connect to EC:EA:FA:D8:F9:77
Error: connect: Connection refused (111)
[EC:EA:FA:D8:F9:77][LE]>
The same procedure on my Ubuntu:
ubuntu:~$ sudo gatttool -b EC:EA:FA:D8:F9:77 -t random -I
[ ][EC:EA:FA:D8:F9:77][LE]> connect
[CON][EC:EA:FA:D8:F9:77][LE]> primary
[CON][EC:EA:FA:D8:F9:77][LE]>
attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x0011 uuid: 713d0000-503e-4c75-ba94-3148f18d941e
attr handle: 0x0012, end grp handle: 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb
[CON][EC:EA:FA:D8:F9:77][LE]>
What I tried:
Different versions of Bluez5 installation and don't think that is the issue.
I read that the Raspberian kernel version didn't support Bluez 5 and downgraded to 3.10.25+ which resulted in the Raspberry's USB ports being disconnected
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=120539&p=819468
Tried three different bluetooth dongles (including a plugable and a CSR) and they all give the same error on the RBi and works fine on the Ubuntu.
I'm aware of this stack posting.Cannot connect to BLE device on Raspberry Pi
This is solved.
Bluez 5 is not compatible with the default Kernel version 4.1.13 for Raspbian Jessie or Wheezy.
The solution is to step back to an earlier Kernel. In my case I first tried Kernel 3.10.25+ which killed all USB port on my RBi B+. Then downgraded to Kernel 3.12.36+ and that solved the issue and I can now connect from gatttool.
Downgrading is easy. Just do:
sudo rpi-update f74b92120e0d469fc5c2dc85b2b5718d877e1cbb
sudo reboot
And the connection below
pi#raspberrypi:~ $ sudo gatttool -b EC:EA:FA:D8:F9:77 -t random -I
[EC:EA:FA:D8:F9:77][LE]> connect
Attempting to connect to EC:EA:FA:D8:F9:77
Connection successful
[EC:EA:FA:D8:F9:77][LE]> primary
attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x0011 uuid: 713d0000-503e-4c75-ba94-3148f18d941e
attr handle: 0x0012, end grp handle: 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb
Related
I tried to debug my code with eclipse with the j-link debugger and gdb sserver and client.
I tried different settings but couldn't solve the error.
Eclipse error:
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:2331
Error message from debugger back end:
Truncated register 16 in remote 'g' packet
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link LITE-Cortex-M-5V compiled Mar 3 2016 12:49:54
GDB Server output:
Hardware: V8.00
S/N: 638100545
Feature(s): GDB
Checking target voltage...
Target voltage: 5.03 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
GDB closed TCP/IP connection
Any hint what could solve my problem?
I'm working on the project and use neo-6m, raspberry pi 3. I follow these steps but I get an error. Please help me.
Neo 6M VCC -----> Raspberry pi 5v Neo 6M GND -----> Raspberry pi GND
Neo 6M RX -----> Raspberry pi TX (gpio 14) Neo 6M TX ----->
Raspberry pi RX (gpio 15)
sudo nano /boot/config.txt
At the end of the file add the follwing lines:
dtparam=spi=on
dtoverlay=pi3-disable-bt
core_freq=250
enable_uart=1
force_turbo=1
sudo nano /boot/cmdline.txt Replace the content with the follwing line (delete everything in it and write down the following content):
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
sudo reboot
sudo cat /dev/ttyAMA0
and this error:error
I am running the "default" mongodb on the Rasp Pi. I cannot connect to mongod running on my Raspberry Pi from my Mac running a mongo client. I can connect to the web page (my ip:28017...http://192.168.86.20:28017/). I made all the tweeks on the Raspberry pi I needed to make (opening the ports (results below), modification to mongodb.conf bind_ip parameter (see below).
Why am I not able to connect from my Mac client? Thank you.
The error I get through the mongo client on the Mac is:
$ mongo --host 192.168.86.20
MongoDB shell version v4.2.3
connecting to: mongodb://192.168.86.20:27017/?compressors=disabled&gssapiServiceName=mongodb
2020-02-09T03:56:39.564-0800 E QUERY [js] Error: couldn't connect to server 192.168.86.20:27017, connection attempt failed: SocketException: Error connecting to 192.168.86.20:27017 :: caused by :: Operation timed out :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
2020-02-09T03:56:39.568-0800 F - [main] exception: connect failed
2020-02-09T03:56:39.568-0800 E - [main] exiting with code 1
Version of mongod on Raspberry pi:
> db.version()
2.4.14
version of mongo client on mac:
$ mongo
MongoDB shell version v4.2.0
Raspberry Pi:
$ cat /proc/cpuinfo | grep 'Model'
Model : Raspberry Pi 3 Model B Rev 1.2
Version of Raspbian:
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
The ports are available:
tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:28017 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
The mongodb.conf bind_ip has been set:
#bind_ip = 127.0.0.1
bind_ip = 0.0.0.0
#port = 27017
I have two diff wifi APs with same SSID.
I tried to use nmcli to connect to a specific BSSID but failed.
Can anybody help?
# nmcli -f "in-use,ssid,mode,chan,rate,signal,bars,security,bssid" dev wifi list |grep "AC5300 "
* ASUS_AC5300 Infra 9 54 Mbit/s 100 ▂▄▆█ WPA2 34:97:F6:6E:31:20
ASUS_AC5300 Infra 10 54 Mbit/s 82 ▂▄▆█ WPA2 88:D7:F6:88:AC:30
# nmcli dev wifi connect ASUS_AC5300 bssid 88:D7:F6:88:AC:30
Error: Failed to add/activate new connection: Active connection removed before it was initialized
This command seems to be worked on ubuntu 14.04. I dunno why.
I'm trying to run a iperf3 client (ubuntu server 17.04 VM) to server(ubuntu server 17.04 VM) test for maximum parallel streams possible with the -P option. Currently have reached a max of ~1022 streams before it will terminate with buffer overflow error. Have made the following changes to stretch the limits -
- Increased the /etc/security/limits.conf soft and hard limits for nofile to 16384
- Increases the ulimit to 16384
Are there any other changes that I can make to exceed the ~1022 limit that I am reaching?
Test:
iperf3 client:
iperf3 -c 10.37.129.4 -P 4096
iperf3 server:
iperf3 -s
Error:
root#ubuntu-server# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.37.129.5, port 26967
[ 5] local 10.37.129.4 port 5201 connected to 10.37.129.5 port 50920
[ 6] local 10.37.129.4 port 5201 connected to 10.37.129.5 port 26980
*****output omitted***********
[1016] local 10.37.129.4 port 5201 connected to 10.37.129.5 port 24249
[1018] local 10.37.129.4 port 5201 connected to 10.37.129.5 port 42339
[1020] local 10.37.129.4 port 5201 connected to 10.37.129.5 port 10062
***** buffer overflow detected ***: iperf3 terminated**
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7908b)[0x7fa0cf99208b]
That’s a security hole in iperf3. I strongly suggest that you report it.