As title, I want to use my raspi 3 to connect my smartphone and send data, but however it failed.
First, I use bluetoothctl and it can successfully scan my devices and build connection.
However, I fail when using hcitool. (I 've use hcitool dev to verify that it is truely hci0)
I type sudo hcitool hci0 lescan to scan my BLE devices (android smartphone) but my devices cannot be scanned. I've wonder to know what is the problem in it .......
(My bluetooth version is 5.43)
Related
i am trying to send adb commands to over 25 Android devices using TCP- Through my WiFi connection: May i know how i can skip connecting each or any of this devices through USB first before running the adb commands?
In the first time that you connect to the device - you must connect with a usb cable and write these adb commands:
adb tcpip xxxx
adb connect yy.yy.yy.yy:xxxx
where the xxxx - is 4 digits port and the yy.yy.yy.yy is the device ip address
Then, every time you want to connect - you should just write again this code - and you don't need to connect the device using USB cable!
I am new to android.I have Raspberry pi 3 device.I can connect mobile device to Raspberry pi 3 over classic Bluetooth.now i am confused about Raspberry how to connect mobile device to Raspberry over bluetooth low energy.we can connect BLE device to android device and get Characteristics and can write Characteristics.now i want to do same thing in Raspberry pi 3 like (heart rate monitor,MI band 2)
Do it using a program
You can do it programmatically using DBus Calls. DBus is an interprocess Communication method used in linux. You can use DBus bindings for different languages such as python or C to make the DBus calls and do the operations.
A few links to help you get started :
DBus tutorial - https://dbus.freedesktop.org/doc/dbus-tutorial.html
BLE DBus API - https://elinux.org/images/3/32/Doing_Bluetooth_Low_Energy_on_Linux.pdf
Using Gatttool from terminal
Gatttool is a terminal tool just like hcitool. You can use the following commands to get the thing working:
hcitool lescan Gives you the list of nearby Low Energy Devices
gatttool -b mac_adress_of_le_device -I gives you an interactive session with the mentioned LE device
From the interactive session give connect to connect to the device
primary to get the primary services.
From this result, you can use the handle values to get the list of characteristics of a specific service. characteristics handle
To get the value of a characteristic use char-read-hnd handle
To get the characteristic descriptor, use char-desc handle
to write to a characteristic char-write-req handle value
Hope This helps!
Has anyone figured a way of installing PPPD or something similar in order to have an active internet connection via a GSM modem on a Raspberry Pi 3 running on Android Things DP5?
Thank you!
Seems DP5 of Android Things still didn't support Internet connections via USB modem dongles (and it's impossible to add support manually, because as in this answer of Blundell described: the source code is not available for Developer Preview). But You can use UART and AT commands like AT+SAPBR.
Has anyone had any luck using USB debugging with an Edison while also using a USB peripheral? It looks like you have to use the switch to activate the bigger USB port, which also cuts off the debugging port. I'm trying to use a USB camera, but can't see the debugger info to actually figure out what's not correct. I also get a connection refused when attempting to use adb connect on the wifi ip.
It looks like you have to use the switch to activate the bigger USB port, which also cuts off the debugging port.
Correct, only one port can be active at a time between the USB Host and USB OTG on the Edison. If you just need access to logs for debugging, connect another USB cable for the serial debug console as described on the Android Things Edison page. This will give you shell access and you can run logcat.
I'm trying to use a USB camera, but can't see the debugger info to actually figure out what's not correct.
It's worth noting that USB cameras are not supported in the current preview release. It's unlikely that the device will be recognized as a camera through the APIs, though you may still be able to access it as a raw USB device if you wish.
I also get a connection refused when attempting to use adb connect on the wifi ip.
The Edison defaults to USB mode for ADB, but you should be able to set it to TCP mode to connect over the network (much like an Android phone):
$ adb tcpip 5555
$ adb connect <ip address>:5555
…or the following, which should persist the configuration across a reboot:
$ adb root
$ adb shell setprop persist.adb.tcp.port 5555
$ adb reboot
$ adb wait-for-device
$ adb connect <ip address>:5555
For the past week I have been programming an Arduino Uno with a computer running Windows 7. When I first started, I found the device on COM6 and was able to upload code no problem. Recently it suddenly stopped receiving code under the error:
Serial port 'COM6' not found. Did you select the right one from the
Tools > Serial Port menu?
The Serial port menu though is grayed out. Research has told me to open up Device Manager and update drivers but there is no other devices tab in my Device Manager. The Arduino is run off the power of the USB cable and runs the code I uploaded a few days ago just fine. What can I do to be able to upload code to the Arduino?
Update:
I installed the Arduino software on another computer and it does not recognize the Arduino either. One of the comments indicates that this could be a problem with the FTDI chip. How can I test if this is the case, and if it is, can I fix it?
There are two types of cable:
Charging Cable
Data Transfer Cable
So try changing the cable, if you have already tried every USB driver and port; or else
Install a new driver using this link, http://www.wch.cn/download/CH341SER_MAC_ZIP.html.
But after installing the driver, if it doesn't work, then change the cable.
For Linux:
To solve the problem, simply run the IDE as super user, so go to terminal and type 'sudo arduino'.
To solve this problem permanently:
In the terminal, run 'gksudo gedit'
In gedit, open the /usr/share/applications/arduino.desktop file.
Change the line Exec=arduino
to Exec=gksudo arduino. Save the file.
Similarly, do the same for Windows...
Also try to re-install Arduino driver.
The Arduino probably started using a different port. When you plug Arduinos into a different USB port it sometimes defaults to a new COM port. Check your device settings for which ports are being used and try each of those. Also try plugging it into a different USB port (if no ports are displayed) and it should register with a new COM. If that fails reboot your machine and repeat the above. If that fails reinstall the Arduino USB driver and repeat above. If that fails you might have fried your Arduino's USB chip (or some other hardware on the Arduino).
For Linux: Vinayk93 is completely right. Adjust the serial port's access rights like so:
$ cd /dev/ ; ls -l ttyA* -- find the right portname, then
$ sudo chmod 666 ttyACMx -- x is 0 or 1