BLE pairing failure when changing MAC address using HCI command - bluetooth-lowenergy

I'm engaging in dev. project which uses BlueZ v5.26 and TI CC2564 chip.
Recently there needs to change BT MAC address to be in the range of that customer owns. To meet, I used hci command as chip maker guides in the following link. And, I also tried with 'bdaddr' tool in bluez.
http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands#HCI_VS_Write_BD_Addr_.280xFC06.29
It looks controller MAC address is changed, but Bluetooth daemon still keeps chip original MAC address. Bluetoothctl shows original address. When trying to pair with BLE device, authentication failure happens at the moment. I guess it's because of this address mismatch in the daemon. Is there any way to make bluetooth daemon to use revised address after updating MAC with HCi command?
Thank you for the answer in advance.

Related

Serial Port not working on Surface Book

I have a Microsoft Surface Book that I've dual booted Linux Mint on. I'm writing a program that needs to read in data from a serial port, but my serial ports don't seem to be working. The behavior is consistent across Mint and Windows (Testing done through Cygwin). It gets a bit of data the first 2-5 seconds that the device is plugged in (viewing the data through screen, same thing happens if I just use pyserial to print data incoming from serial port), then nothing.
What could be happening? I think I've isolated the problem to the serial ports - the Surface Book has 2 USB ports and the same thing happens on both of them, and I've tested the hardware that I'm plugging into it on 2 other computers (One Linux and one Mac OS), and it works fine on both of those.
Your MS Surface, seemingly, has a yellow triangle exclamation mark icon (over the adapter icon) without any driver to install/download. And properties in the device status box window say This device cannot start. (Code 10) or A device which does not exist was specified. Right?
If it's so you should wait for an update from MS. It's notorious problem.
I ended up getting the computer replaced on warranty for an unrelated issue months later, and what do you know, on the new computer the serial ports work fine. That indicates to me some sort of hardware problem, given that the issue persisted across OS's.
maybe this will help:
see Arduino examples for serial port communication - search google:
arduino serial c++
arduino serial c#
arduino serial c++ linux
the point is to open port properly you need to open a file, not a port. not with usual c - assembly write to port code.
another option you are using an unintentionally bought fake USB to serial cable with a Fake PL2303 chip
then you need to install the old version of the driver.
search in google:
Fake PL2303 + your os name:
install driver Fake PL2303 windows 10
another option is maybe it conserves energy and closes the port because it feels it is unused.
in windows> device manager,> properties of a device - usually USB root hub > power management - allow the computer to turn off this device to save power - uncheck it.
https://superuser.com/questions/408683/why-my-usb-mouse-gets-suspended-after-3-seconds-of-inactivity
https://blogs.msdn.microsoft.com/usbcoreblog/2013/11/08/help-after-installing-windows-8-1-my-usb-device-doesnt-charge-or-it-disconnects-and-reconnects-frequently/
also, you could look in windows events - to see what happens. usually, failures like this are registered in the events log.
an unlikely option is it consumes too much current, like a short circuit. and the device protection circuit shuts the chip off. also probably it does not have such circuit. one possibility is to try with an external powered hub.
the most probable of these is the power saving mechanism
I was experiencing the same problem - came across the solution on another site. The USB 3 ports on Surface Book aren't compatible with something or other to do with Com Port but running the device through a cheap USB hub solved my problem straight away and it was instantly recognised by the Arduino IDE

Dragion yun shield ip address

I just got an arduino yun shield by dragino.
I plugged into my computer usb with an Arduino uno following the instructions of the wiki and powering it from 5v > vin.
After a while the wifi network popped up, so I entered it.
Went to http://192.168.240.1/ where I found the website / settings panel and added a password and connected to my own wifi network.
Now I have no idea how to get back to that website, what ip adress to use, or even how to reset those settings so it makes its own wifi network.
I can connect to the Arduino yun through the Arduino program, but I got this error after just trying to do a blinking light. It does not show me the IP for it.
I have also tried connecting it to the wall outlet but it didn't create a network.
Is there anyway to completely reset the board?
It seems as if the shield was set to connect to your WiFi which in turn was set to get an IP address from your WiFi Router. If you want to find out what IP Address was assigned to the shield by the WiFi Router then you can go about it in two ways:
Log onto your WiFi Router and see if it contains a DHCP clients
list. If the shield was assigned an IP from that router then it will be in that list as well.
Use software like SoftPerfect Network Scanner (https://www.softperfect.com/products/networkscanner/) to scan for all hosts on your network. You can then see which IPs were assigned to the hosts. One of them will most probably be the shield.
According to the shield's user manual you can reset to factory settings:
5.7 How to reset the Yun Shield? Yun Shield has a toggle button which can be used for reset. When the system of Yun Shield is
running, user can press the toggle button to reset the device.  If
pressing the toggle button and release after 5 seconds , it will
reset the WiFi setting and other settings will be kept.  If
pressing the toggle button and release after 30 second s , it will
reset ALL the setting to factory default.
There are many options.
If you haven't changed the name of your Yun it's likely to have the default hostname: arduino.local, therefore, if the device has connected properly, you should be able to access it in the browser as http://arduino.local
This should work on OSX. On Windows you will need to use the Bonjour Service for this (which should come with iTunes for Windows). On Linux you can use avahi.
Another option is to ask your Yun what it's IP address is using an Arduino sketch and the USB cable. You can find some handy examples in Arduino > File > Examples > Bridge
I recommend checking out sketches like :
WiFiStatus
YunSerialTerminal
ShellCommands
Either of these should allow you to get see useful info in Serial Monitor.
For example, if you send the ifconfig command via Serial Monitor.
Also, as Blurry Sterk already mentioned, you have the WiFi reset button which can reset the Wifi settings to default. By the way, with the default settings, the WiFi Access Point network name is
Arduino Yun-XXXXXXXXXXXX", where the twelve 'X' are the MAC address of your Yún
(according to the Arduino docs).
write it down (or at least the first 3 parts). You can see devices on your network along with the mac addresses using the arp command.
On Windows:
arp -a
On OSX:
arp -a -x -l
You can find the Yun's mac address in the list, and the IP from there.

Arduino yun wifi network not appearing in my available network on windows 8

I'm connecting my Arduino Yún to my laptop via USB cable and as I read in Arduino documentation:
When you first power on the Yún, it will create a WiFi network called
ArduinoYun-XXXXXXXXXXXX. Connect your computer to this network.
But in my case nothing appears and I didn't found anything related to this on the web.
I'm running Windows 8.1 on my laptop.
Any idea how I can solve this problem?
It sounds as if something is wrong with the wifi configuration on the Yún. Has it previously been configured? Try resetting the wifi by pressing the "Wifi RST" button for more than five seconds (but less than 30).
More info here.
The question you asked is already answered by #mellbratt. You have successfully configured Yun and connected it to the network (configuration of WiFi by providing SSID and security key in web panel). The thing you have to do now, is to find what IP your Yun device is assigned on that network. You can use tools like Angry IP Scanner to scan the network and find your IP if you cannot access it from myusername.local. Using that IP you can access the web panel.

Arduino COM port not found

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

Why don't I receive signal and status for WiFi using QSystemNetworkInformation

I wrote a piece of software which does nothing else than reading network status and signal strength for each network mode (gsm, wlan (wifi), bluetooth, ...) on my device (Nokia E51) and printing it out.
My test device is connected to bluetooth, wlan (wifi) and 3G (wcdma), but it's only able to give me the signal strength of 3G (and also returns the correct name of my carrier). for wlan and bluetooth it gives me the undefined state und isn't able to read any signal strenght. But I am able to receive the IP address of the network I'm connected via wlan.
All I do is:
QSystemNetworkInformation::networkSignalStrength(QSystemNetworkInformation::WlanMode);
and calling the method for the network status.
As I said, it works flawless for 3G.
Any ideas? Thanks a lot.
After an SDK update, everything works fine without any code changes. So the problem wasn't in the coede, but in the QtMobility backend.

Resources