Detect nearby beacons with Bluez - ibeacon

I installed Bluez and I am trying to scan and get UUID Major, Minor and if possible mac address for nearby ibeacon. I found similar questions and they refer to a script which I found here . When I launch the script I get this error
Set scan parameters failed: Input/output error
Did someone know how to solve the problem or has another solution ?
If I start transmitting with the beacon and then I start the scan I get no result at all and I have to interrupt the script.

You should test that the BlueZ installation is working properly on your Linux machine. Try using the hcitool dev command to see if it lists attached devices properly.
You may want to refer to a BlueZ installation guide like this one for Ubuntu to verify that you have your dongle set up properly.

Related

modprobe: FATAL: Module lirc_rpi not found in directory /lib/modules/5.10.92-v7+

I am trying to Configure Lirc for my Rpi 3b+ for a personal project. I am using this guide. When running sudo modprobe lirc_rpiI get the error of modprobe: FATAL: Module lirc_rpi not found in directory /lib/modules/5.10.92-v7+ Can anyone help me solve this?
That LIRC should not work on Rpi is a misunderstanding. LIRC works on all linux systems, RPi included, but certainly not on Arduino (Arduino don't run Linux).
The basic problem is that the guide you refer to is severely outdated. In particular, the hardware.conf file is not used on modern LIRC installations.
As for the possible need for a lirc_rpi kernel moduled this depends on the actual use case. In most cases, LIRC uses either the serial ports or the lirc0 device, neither of which needing any specific kernel module.
The complete upstream docs are available at https://www.lirc.org/html/configuration-guide.html. It might be possible to give some more feedback if you describe your use case in more detail.
Lirc is not meant to work on raspberry pi, only other computers. You should use something else like an ardino. Good luck

Gammu - gammu - detect under windows?

I am pretty new to gammu, my nokia which was working fine with it has died and I am getting a Huawei K4505 3g modem to replace it.
I would like to try using gammu-detect, but am running under windows and it isnt included in the distribution files.
Is there a way of getting it/ using it under windows, or alternatively can anyone direct me to the correct config settings for my 'new' modem.
I have searched everywhere, and have found some references to installing detect under windows, but no details as to how to actually do it!
Many thanks .... David.
update ... couldnt find windows version of --detect, but config file worked fine
with device = com19 and connection = at19200
NOt possible to use a usb connection type directly, so need to map modem to a virtual com port first.

NodeMCU version unknown

I'm new with NodeMCU firmware use. I have a Amica ESP-12E (v2?) dev kit connected to a DHT22 which I program using the Arduino IDE. All is setup and working fine.
My problem came when I wanted to update NodeMCU firmware. Since I don't really know what came pre installed from China, I downloaded ESPlorer to try to determine NodeMCU version. I get the following "error" when I reset the dev board:
Communication with MCU..Got answer! Communication with MCU established.
AutoDetect firmware...
Can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
{{a long string of weird characters that I can't copy and paste appear here}}
At this point I'm totally clueless about what version of firmware I have. Is there a way to obtain NodeMCU firmware version by software via Arduino IDE code, ESPlorer GUI or something similar?
On the other hand, is there a really easy way to compile/download latest NodeMCU firmware BIN file? Even one with all the modules active will be fine for me now, I'm just trying to understand and test things.
You seem to be confusing two very different platforms. I leave out some details as not to confuse you any further.
Arduino: you use Arduino programming in the Arduino IDE then build and install a binary to your device whenever the application changes. No NodeMCU firmware needed!
NodeMCU: you flash the NodeMCU firmware once (e.g. using esptool.py) and then upload Lua code (e.g. using ESPlorer) whenever the application changes. This is more lightweight than the Arduino platform.
On the other hand, is there a really easy way to compile/download
latest NodeMCU firmware BIN file?
Yes, have a look at the NodeMCU documentation at http://nodemcu.readthedocs.io/en/latest/en/build/. The easiest is to use the cloud builder at https://nodemcu-build.com/. I currently suggest to build from the dev branch because flashing is easier with it.
As pointed out you have several options for firmware and you'll need to make a choice as to which suits you going forward. If you are going to stick with the Nodemcu LUA firmware you can determine the version by typing:
print(node.info())
at the command line prompt.
There are alternatives to using ESPlorer e.g. Putty or Coolterm that will give you the raw output from the device with no interpretation. So if you have the correct serial port settings and the device plugged into the USB port it will show the banner when you reset giving an indication of the origin and version of the installed firmware.
In ESPlorer, there is an option under settings which if unchecked will stop looking checking for the version of the code.
For whatever reason, ESPlorer is not designed to read nodemcu version.
The error message throws you off, could lead you to think, there is an error.
At best, the above error can be ignored. It has no impact at all. In background, init.lua is up and running.

UHD error with REDHAWK

I made a node which contains a USRP_UHD and a GPP (and make sure the ip_address is correct for USRP_UHD). I launched the domain based on this node. However, I got the following error:
UHD Error:
Device discovery error: AssertionError: libusb_init(&_context) == 0
in libusb_session_impl::libusb_session_impl()
at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
UHD Error:
Device discovery error: AssertionError: libusb_init(&_context) == 0
in libusb_session_impl::libusb_session_impl()
at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
...
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
UHD Warning:
Unable to set the thread priority. Performance may be negatively affected.
Please see the general application notes in the manual for instructions.
EnvironmentError: OSError: error in pthread_setschedparam
I did get two unallocated (TX/RX for each) tuners, but it is not easy to allocate these two tuners for use for any parameters.
Besides, if I just launch the domain and launch the single device USRP_UHD, or simply run the discover USRP_UHD command via the command line window, I got the same error:
UHD Error:
Device discovery error: AssertionError: libusb_init(&_context) == 0
in libusb_session_impl::libusb_session_impl()
at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
2016-02-01 16:59:20 WARN USRP_UHD_i:943 - WARNING: NO UHD (USRP) DEVICES FOUND!
Could anybody figure out where this problem is? Thanks in advance!
So, first of all, the good news is that this is happening during autodetection of USB devices, so your N2xx is not inherently affected, but:
UHD 3.5.3 is not only old, it's ancient. You should really uninstall it (If you've got Debian or a derived one [Ubuntu], it'd be sudo apt-get remove uhd-host libuhd003 libuhd-dev), install a new version directly from Ettus (can help you with that, if necessary) and rebuild Redhawk against that version.
Really, really do that. There's been so much improvement in behaviour like failure handling that fixing this without updating isn't really worth it.
Now, if you explicitly specify a device address that allows you to cancel USB-based USRP detection completely, you should be fine. As device address, use type=usrp2 for USRP2, N200 and N210.
I ran into this issue trying to install UHD v3.9.3 in a CentOS 7 Docker container - the error message points to a usb issue, not related to Redhawk. The Redhawk Device, USRP_UHD, is just an abstraction layer on top of the Ettus UHD drivers, so the easiest way to tell whether the problem is Redhawk or something else is to try one of the UHD commands directly from a terminal to generate the same error, like uhd_usrp_probe.
To check if the problem is directly related to the usb drivers try the command lsusb. This should list all usb devices connected to your OS. These are good debug tips to isolate where the problem is.
If you happen to be doing this using Linux containers or Docker you have to give the proper privileges, see docker-any-way-to-give-access-to-host-usb-or-serial-device. Otherwise, assuming you built UHD from source, check the output of make test step - if all the tests passed there shouldn't be anything wrong with the UHD library.
Edit: Also if you're running this inside a VM you have to make sure your host has given network/USB/etc privileges to the hypervisor (ex. VirtualBox) during installation, or that you've attached the correct virtual hardware in the VM configuration.

QEMU for Win7 hosting Debian : no more able to connect to the network

I'm fighting strongly against a problem that is making me crazy.
I’m extensively using QEMU over a Win7 64bits machine for running different Linux VMs (Debian, Raspbian).
In the past I configured the network following the QEMU instructions using the OpenVPN TAP device and network bridge in Win7 : it ran perfectly and the Linux machine was able to connect the “real world” networks, internet and so on.
In the last few days, on the contrary, this nice behavior stops working. The Windows situation is unmodified (the OpenVPN TAP driver settings are the same, the bridge is still there, when the bridge is active Windows still see the network, the TAP driver becomes “busy” when the QEMU VM starts as usual, the QEMU startup scripts are still the same…), but the emulated Linux system (whatever image I use) is unable to connect the network.
The “eth0” interface is active but unable to get the IP address from the DHCP and also using fixed IP address doesn’t solve the problem, since the IP address is not seen by the “real” network.
I have tried to uninstall and reinstall again the OpenVPN TAP driver, to downgrade Win QEMU to the previous version, but no way !
The only change that I made in the HOST configuration has been to install GNS3 (with its own TAP driver), but without including the QEMU VM in any GNS3 network.
Does anybody have suggestions regarding what kind of checks I have to do on QEMU in order to solve the problem ?
Any help will be appreciated
Regards
Ugo Poddine
I was finally able to get out.
I was forced to restore a previous system image : all attempts to uninstall and reinstall the OpenVPN TAP driver were useless.
The problem is probably due to the update of the OpenVPN TAP driver : with the v.9.0.0.9 no problem, but updating to the 9.21.1 seems to have generated the problem.
I'm now able to use again QEMU and GNS3 in network.
But what a strange case !

Resources