I am trying to connect my Raspberry pi 3B which has Android Things installed to my PC using the Serial debug cable. I connected it as instructed Here and followed the below steps using PUTTY on Windows 10.
N.B: Same issue is with the Android Emteria version for Raspberry pi 3B.
All I get is an empty console window, which I can't even type into. The device is not seen either in Android studio or using the ADB tool
I am not sure about which Com to use, here's my device manager:
Note
I am able to connect the device using Wifi, and ADB using this command:
adb connect <ip address>
and I install apps normally and they work fine using Android Studio.
Now, I want to make the Serial debug method work, and will it allow me to run my apps from Android studio + see the Logcat logs? Plz review my above mentioned steps and tell me if I am missing something.
From your device manager, it looks like the driver for your serial cable may not be installed correctly.
Assuming you are using the recommended cable from Adafruit, you need to install the proper drivers for Windows. Try downloading the Silicon Labs drivers (http://www.silabs.com/Support%20Documents/Software/CP210x_Windows_Drivers.zip) and installing those. You may need to restart your computer to complete the installation.
Otherwise, if it's a Cypress cable, you may need to update the Cypress UCM Client Peripheral Driver that your device manager is showing an error on. Right click on that and select update driver.
Once your serial cable is installed properly and recognized by Windows, you should be able to connect to your Pi as instructed.
Related
I have a machine controlled by a raspberry pi. For servicing I want to connect the local wifi network. The machine has no controls with which you could enter ssid and password. With a combination of button pushes a connection to the wifi must be made.
In my program I have the following code:
void start_Wps(void) {
if (!fork())
execl("wpa_cli","-i","wlan0","wps_pbc", NULL);
}
If I start my program from a ssh terminal it works most of the time. However when I let my code start from rc.local the rpi never connects to my wifi network.
In case your project shall work in an enterprise environment, can you be sure that WPS is supported on the client’s access points?
Another thing to consider: WPS is in decline. It is not supported e.g. in Android since Android 9, WPA3 security won’t be supported by WPS and its successor has already been presented by Wi-Fi Alliance.
It is called “Wi-Fi Easy Connect” and it basically is a device provisioning protocol that also allows the connection of “headless” device, i.e. without display or input. You could connect your mobile phone to the Wi-Fi network on the customer’s premise, read the QR code that you previously put on your machine and then the phone takes care of connecting the machine to the network.
More detailed information is provided on Wi-Fi Alliance’s website: https://www.wi-fi.org/discover-wi-fi/wi-fi-easy-connect
If you want to make sure that your project is future-proof and will be maintainable for years to come, you might want to look into that.
My Raspberry Pi 3 can connect briefly to my Android mobile, but once I accept the connection on the Raspberry Pi, I get this error:
GDBus.Error:org.bluez.Error.Failed: No such file or directory. Try to connect manually.
Please help me on this.
You can fix that from Bluetooth control. Type $bluetoothctl as root then you will end up with Bluetooth shall. There you should type "power on" command. After that you can use "scan on" command to check connection.
to continue from Dinusha's answer, after you scan and find your device's ID (you should also be able to see it's name in parentheses) you'll need to pair with the device by doing
pair <device ID>
then connect with the device by doing
connect <device ID>
You'll be able to see status of the connection
There are cases where I use a separate bluetooth dongle for connections I don't want dropped
Raspbian Jessie has some issues as far as I know with the Bluetooth module. I'd recommend using bullseye or buster. Also, there are a couple issues regarding the newest kernel. Run the following command to see if your phone which you are willing to connect is listed:
sudo bluetoothctl devices
If your mobile device is still listed here and not paired on the mobile side, there is your problem. Remove the device using the following command in RPI:
sudo bluetoothctl remove <mac-adress-of-device>
Adb does not recognize my Nexus devices but does recognize my Samsung Tab 2 7 inch tablet.
C:\Users\Allen Edwards\AppData\Local\Android\sdk\platform-tools>adb devices
List of devices attached
c0808e004a14c2f device
The device recognized is the Samsung. There are also a Nexus 5x, Nexus 4, Nexus 7, and Nexus S connected.
In Windows Explorer I can browse the Samsung, Nexus 5x and Nexus 7 but not the other two.
All have USB debugging and are connected as MTP or as USB for File Transfer in the case of the Nexus 5x.
The Google USB Driver shows up as up to date in the SDK Manager and also comes back as up to date if I try and manually update it from a fresh download. ADB shows up as up to date when I try and update it.
I uninstalled the Nexus 5x USB driver from Device Manager and when I plugged it back in the same driver was installed which interestingly has a date of 2006. How can that be right?
It would seem logical that somewhere I have a Samsung usb driver that is interfering with the Google usb driver but I have the latest Google usb driver downloaded and point all the update drivers to that and I get that Windows says it is up to date, MTP USB Device.
The Googling I have done typically suggests things that I have done, like checking USB Debugging, or updating the drivers.
I thought perhaps Windows was getting the wrong driver for the Nexus 5x so I thought I would uninstall it and manually install it but as soon as I uninstall it, the icon vanishes and upon refreshing for new hardware, the same driver is installed.
Any ideas of things I can try?
Uninstall USB driver using SDK Manager instead of Device Manager. Device Manager just reinstalls the same driver on the next connection of the device.
I'm trying to learn how to write C code that will read from the serial port in Linux. I've found what seems to be a good tutorial here.
I want to be able to test this code, so I think I need either a serial port, or a way to write to the serial port while the code from above is reading.
I'm running Ubuntu 10.04 as a virtual machine on my Mac using virtualbox. My idea was to set up a virtual serial connection and write from the host to the guest. Hopefully something as simple as cat "Hello World" > /tmp/fake_serial in a host terminal, and for that to be read by the program in the link above.
Is this possible? I've tried adding a serial port using virtual box and when I try to do the above command I get an error saying I can't write to a socket.
The second option I thought of was using something like minicom inside the guest OS, to connect to say /dev/ttyS1 and write messages for my code to read at the same time. Again, assuming that the baud rates and other settings are OK, would this be possible?
I don't have a lot of experience working with serial ports, so I'd appreciate any suggestions about the best way to do this. Thanks in advance.
So to get this working I just added another Ubuntu VM on VirtualBox, and connected the two together via a virtual serial port. My main, original VM, which I use for a lot of developing will be referred to as VM1. The new VM, with a small hardrive that will only be used for sending messages to VM1 will be called VM2. These are both Ubuntu 10.04 VMs.
In VirtualBox go to Settings for VM1, go to ports, and change the settings as follows:
Now go to VM2, and select settings, ports, then change as follows:
Now first you need to start VM1. When that's booted then boot VM2. Now you can open a terminal in VM1, and type screen /dev/ttyS0 38400 (you may need to run sudo apt-get install screen before this works). Then go to VM2, open a terminal, and type echo "Hello" > /dev/ttyS0.
You should see Hello appear in the terminal open in VM1. When you're done running screen press ctrl-a k to kill it, otherwise if you try to do other stuff with the serial port you may get an error message saying that the port is busy.
When I had to do some serial port testing from my real to virtual machine I ended up doing a "loop back" type testing. I took two USB-Serial converters and a RS232 F-F adaptor and connected my machine to itself. Then in VirtualBox under Settings->USB you can route one of the two USB-Serial converters to be "owned" by your VirtualBox.
Once you plug in the converters one will register with the Mac and one with the Ubuntu "computer" then you can do serial communication as normal between the two machines.
You may also be able to emulate a virtual serial port using a pty ("pseudo-teletype" device), but I'm not positive on that one since I believe the ability to do that was locked down in newer kernels.
I ran into a similar situation running a QNX guest using VirtualBox 5.0.10 on an Ubuntu 14.04 host.
My solution seems general enough to apply to the above-mentioned case.
I configured the guest VM in the same way that Kells1986 setup his VM1:
Under the "Serial Ports"/"Port1" tab:
check "Enable Serial Port"
set "Port Number" to "COM1"
set "IRQ" to "4"
set "I/O Port" to "0x3F8"
set "Port Mode" to "Host Pipe"
uncheck "Connect to existing pipe/socket"
set "Path/Address" to an accessible file-system path (e.g. "/home/safayet/vmSerialPipe")
According to the VirtualBox manual:
You can tell VirtualBox to connect the virtual serial port to a
software pipe on the host. ... On a Mac, Linux or Solaris host, a local domain socket is used ... On Linux there are various tools which can connect to a local domain socket or create one in server mode. The most flexible tool is socat and is available as part of many distributions.
A domain socket is an IPC mechanism on UNIX systems similar to a pipe.
I connected to the "pipe" end of the virtual serial port on the Ubuntu host using the socat command:
socat - UNIX-CONNECT:/home/safayet/vmSerialPipe
When I run my BB Simulator; I keep getting the following error:
Port in Use - BlackBerry Smartphone Simulator
Could not open port 19780 because it is in use by another program (possibly another instance of this simulator). You must close the other program for network operations to function correctly.
I have modified rimpublic.properties under MDS/config, but no luck.
[UDP]
UDP.receive.port=29781
UDP.send.default=29780
Any suggestions to get MDS and Simulator running???
I am running Win 7.
I had Microsoft Client for ISA Server installed on my machine and that seems to be causing problems for BB MDS simulator. MDS and BB Simulator work fine after disabling the ISA client.
In general if the MDS simulator is having problems running, there is a another web server running on the machine which is causing port conflicts.