Enable both WiFi and Ethernet on Pi running Stretch - linux

I'm working on a project where a Raspberry Pi 3 runs a python server which controls some arduino's that are connected to the same router via a switch. I'm using a websocket to display a GUI in my browser.I need to be able to use the gui over my primary network connection which has internet acces. The situation looks like this :
The problem is that I can't get both WiFi and Ethernet to work, just one at a time. This has mainly to do with running Stretch, but downgrading is not an option. On older Raspbian version's I could use the allow hotplug or auto setting in the interfaces file to make sure both interfaces are up. But I've heard you should not touch the interfaces file on Stretch. Can someone tell me how to do it ?:) Thanks a lot!

Related

Bluetooth Firmware Update

I have a BLE module that i'm trying to update the firmware in, but having a lot of problems connecting the recommended update software (ISupdater). All I get is 'connect failed' message. There seems to be no troubleshooting information available, so I hope that someone has run into the same issues and solved it.
For the hardware setup, I'm connecting to a PC via a USB-USART serial adapter board. I have the 3.3V, GND, reset switch, mode switch, USART connection from the RN4870 BLE module connected as per the microchip connection diagrams (https://microchipdeveloper.com/ble:rn4870-app-example-fw-upgrade). I have verified many many many times that my connections are correct.
Connection Diagram
To test the BLE connection and data transfer I have mobile devices (iOS and Android) with the recommended apps (SmartData, mBIoT). I can see the BLE broadcast in the bluetooth lists, and I can connect to it to use the apps.
For the RN4870 module, I'm able to connect to CoolTerm software to test that I'm getting communication between the terminal and a mobile device. I'm able to send and receive data on the CoolTerm terminal, and on the mobile device apps, so that suggests to me that the USART adaptor is working correctly, and so is the BLE module.
In CoolTerm, I'm able to enter the CMD mode for the RN4870 module to set and read settings of the module, so I can check and set the baudrate to the default 115200.
If I use a BM70 module (which is the same hardware as RN4870 but different firmware), i can't enter any CMD mode, or do any sort of reset. The data is still able to be sent and received, so that confirms the baud rate is correct.
When I attempt to connect to either BLE module using the ISUpdate software that is recommended in the update steps to use as the firmware updater, I'm not able to connect to the module to update the firmware. I've tried many times to get the software to connect, many different ways, without success, and it's frustrating to no end.
I've updated the MCP2200 drivers to the latest ones from the microchip website, as well as using the latest versions of the CoolTerm and ISupdater. I've also tried previous versions, but still they all have 'connect failed'
ISupdater Image
has anyone got any solutions to the issue?
PC: Windows 10, 64-bit
BLE Modules: RN4870, BM70
CoolTerm Version: v1.8.0 (build 861)
ISUpdater Version: v4.0.0.207
IS187x_102_BLEDK3v1.11_UIv1.01 for Windows 10
Mobile Apps: SmartData, LightBlue for iOS, LightBlue for Android, mBIoT
Hmm, well it turns out that the USB-USART serial adaptor (although confirmed to be working correctly) seemed to be the problem.
At first, I only had the 1 adaptor, and I had to borrow a different adaptor. After swapping this FTDI232 USB-USART Serial adaptor, the connection was made first try, and I was able to update the firmware. I have now purchased a new adaptor.
So, if you are having the same trouble, try using a different adaptor.

Alternate ways to log into BeagleBone Black when static IP is unknown

I am attempting to access my BeagleBone Black but I am having some issues and I'm needing some help.
I messed around with my BBB almost 2 years back and I statically set the IP address for eth0. Unfortunately, I don't recall what I changed it to. If I knew the network, I could probably figure it out but I haven't the slightest clue what it could be.
I am running Windows 10 on my laptop and I have a USB to USB-mini running to the device which provides to it power and a connection.
I have installed the latest drivers, PuTTY, and WireShark. I made sure the drivers were imported, ran WireShark for DHCP requests/ARP broadcasts, LL DNS updates, or SSH port references but I wasn't seeing anything on that particular interface on my laptop (ran as promiscuous and nonpromiscuous).
I read that the default IP address for the beaglebone.local is 192.168.7.2 but I wasn't able to reach it via ICMP, HTTP, or SSL.
I assumed the USB connection provides either an Ethernet-over-USB connection or a serial connection (UART through USB), so, I have both the USB connected and the Ethernet cable connected.
To see if I could just use a serial connection with PuTTY (Serial-to-USB), I opened Device Manager to see which COM port it was using. The odd thing is that COM ports aren't listed in Dev Manager, not even by default when nothing is connected. There also wasn't section for Unknown Devices.
I figured at this point, it wouldn't hurt to download the latest release of Debian for BeagleBone. I wrote the .img to a 32GB MicroSD card and held down the USER/BOOT button while I applied power (as per the instructions).
Still no luck and I'm now out of ideas.
I only have a laptop at my disposal, currently. I don't have immediate access to a monitor, mouse, and keyboard so I wouldn't be able to view what is happening internally. The LED0 is giving me the standard heartbeat flash (2 consecutive flashes followed by a longer off period).
Does anyone have any suggestions?
TIA

Bluetooth LE from Cordova app to Linux device

I need some guidance. In a nutshell, I need to be able to configure and control a device with the smart phone app over BLE.
For example, change IP address of my Raspberry Pi. To make that happen, I need 2 things.
Simple Android/iOS app that takes IP address parameters as an input, and then communicates over Bluetooth to the RPi. Note that the device needs to be discovered and connected from within the app (without going to "Settings" and pairing).
Build some server process on the Raspberry Pi that listens to USB Bluetooth dongle, receives the command with parameters and acts accordingly.
So I need help building the BLE portion of this project.
I have several years of smartphone app development experience, and 10+ years of Linux system programming. In other words, building a simple Cordova app, as well as Linux process that changes IP address is really not an issue.
However, I am totally new to Bluetooth. Can you point me to the right direction? I am sure this problem has already been solved few thousand times. Is there a tutorial? Or maybe a skeleton code I use as a starting point? Also, any recommendation for BLE USB dongle?
Thanks a lot!
I think it will be harder to find a better guide to implement low energy technology on the RaspberryPi than this one :
https://learn.adafruit.com/downloads/pdf/pibeacon-ibeacon-with-a-raspberry-pi.pdf
After this , you can download a random app on the Playstore/Appstore and check that your RaspberryPi is actually acting as a BLE device.
Finally you can start creating your own app using several available BLE plugins like :
https://github.com/randdusing/BluetoothLE
https://github.com/don/cordova-plugin-ble-central

Raspberry Wifi configuration

English is not my mother language, but I hope you can understand me. I have bought a Raspberry Pi 2. I installed Raspbian and I bought a Wifi too. This one:
http://www.ebay.com/itm/271857752471?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
I'm new too use Raspberry and I've never use Raspbian and other 'Linux' distribution... So, my biggest problem is, that raspberry doesn't recognize my wifi. I've tried to download this package: http://driver.iigoal.com/drivers/SKU108764.rar
I've tried to do what is in the guide, but I can't... Perhaps can somebody write down a description (or a short video:)), how I need to do these things?
The WiFi adapter listing on eBay does not list Linux as a compatible OS, but it lists the driver as being Realtek RTL8192cu.
I researched a little about that driver in regards to raspbian and it should have two potential drivers. the first is built into the kernel/base installation. It's module is named 8192cu.ko.
A second option exists, though it appears to be a bit experimental that comes from an RTLwifi set.
Since this is a fresh installation, I would recommend starting fresh and ensuring that the WiFi dongle is plugged in during the Raspbian installation/first boot. This should ensure that it is identified and loaded properly.
If that does not work, I would recommend plugging in the rPi 2 with an ethernet cable and running updates to the system, that may help download anything it identifies as missing or old and other greater compatibility
Plug-in the wifi adapter to a usb port,open up a terminal on Raspberry pi and type
lsusb
it will display all the usb devices in the system.
if there is an entry for your wifi adapter then it is easy to make it work.
my raspberry pi work with hardware what you bought in eBay, without more configuration as: wifi-data in wpa-supplicant, if you use terminal:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
and write
network={
ssid="NETWORK_NAME"
psk="NETWORK_PASSWORD"
}
this is normal rule for wifi configuration in raspberry pi

Node.js on Raspberry Pi

I want to have Node.js running on a RPi and a browser running on the same RPI at the time and the two talking to each other. I know I can do this over a network with a separate client machine - but I want to control the RPi I/O pins with the browser running in the RPi. Is this possible?
I would recommend using the pi-gpio npm package on Node.js. Your browser then controls the GPIO pins thru Node.js.

Resources