Run Raspberry Pi script from Windows PC using Ethernet - ssh

As the title says, I want to run a script on the Raspberry Pi from my Windows PC. The connection between PC and Raspberry Pi 4 (Raspbian OS) should be done using an Ethernet cable. The Rasperry Pi cannot be operated permanently in the network. Is it correct that then a SSH connection is out of the question?
For background: the Raspberry Pi is connected to a camera and a stepper motor. Depending on the position of the object to be photographed, the stepper motor is moved and then a photo is taken. This photo is then to be sent back to the PC via the network cable. The script on the Raspberry Pi (rotation stepper motor and image capture) is implemented with Python and fully functional. Is it generally possible to run the Pi script using the Ethernet cable and transfer the generated images back?
Using a Windows QT GUI I want to start this script and display the images later.
Is this possible or can someone suggest a simpler way? Maybe someone already had a similar problem and would help me.
Many thanks in advance.

If you have an extra Ethernet NIC on your computer, you can directly connect your PC and Raspberry PI (on relatively newer hardware) or if that doesn't work, you can use a crossover Ethernet cable to connect your PC to the PI. Then configure an ssh server on the PI and enable Avahi and dhcpd and execute your script via that using MSYS ssh or Putty (ssh pi#hostname.local). Don't forget to change your hostname.
Bonus tip: you can also send your data (images) back over the same connection.

Related

Can a Machine Send an Image of Itself Through SSH?

I was looking into storing a backup of my raspberry pi on my PC, and since SSH is set up on it already, I think it would be nice if I could just write a script to send the contents of the SD card from the pi to my pc. Is this something computers are capable of? Thanks

ToupTek XCAM4K8MPA camera connection to Linux computer

I'm trying to connect a ToupTek XCAM4K8MPA camera to a Linux Ubuntu 20.04 64-bit computer to use with their provided ToupLite software for microscopy image capturing. The camera comes with a USB 3.0 cable, HDMI cable and USB WLAN adapter.
I have managed to set up the ToupTek ToupLite software (Link to manual, Link to download page) which, as far as I understand, comes with the SDK included. I have then connected the camera via USB 3.0 and HDMI cable to the computer, but ToupLite shows No device as in, the camera is not recognized or connected. I have tested the camera by simply connecting it to a computer monitor via HDMI cable and it works, but for capture I would like it to be connected to a computer and the WLAN or Wi-Fi connection solution is not really a good option.
Perhaps someone has some ideas of what I am missing.
Note: Relevant tags include touptek, touplite, microscopy
I ended up using the WLAN connection. Made a non-changing IP address for the camera and the ToupLite software recognizes that it is on the local network.

Android Things: ADB over USB on Raspberry Pi

I'm playing with Raspberry Pi 3 Model B and Android Things. I was able to configure everything (connect Pi over Ethernet, then reconnect over Wi-Fi with Android.local) and debug the app. However it's not convenient sometimes to debug over Wi-Fi when I travel and I have to change Wi-Fi networks or don't have Wi-Fi connection at all.
I know there is serial debug console, but it seems to be for getting logs and shell commands, not for debugging.
Any chance to have direct debugging over USB cable just like any other Android device like smartphone/tablet?
How to debug Android Things device over USB?
Briefly: you can't do it with Raspberry Pi.
Why not?
Let's look at the pin specification of Raspberry Pi micro USB (J1):
where
1: power
2: D- (data out), not connected
3: D+ (data in), not connected
4: NC, not connected
5: GND (ground)
So summing up the above said: no data pin connection - no adb. You can only power your RPi over micro USB.
Any chance to have direct debugging over USB cable just like any other Android device like smartphone/tablet?
Use another board. In fact, any board that has USB OTG and is supported by Android Things would allow debugging over USB, just as a "regular" smartphone/tablet.
And ironically, by the time of this writing, all the supported hardware platforms would fit except for Raspberry Pi :)
The NXP i.MX7D development board has the same pins as the Raspberry Pi for development, however it uses USB-C for power and ADB.
Highly recommend it over the Raspberry Pi
https://developer.android.com/things/hardware/imx7d.html
(source: android.com)
Another option is to setup Wi-Fi access point on your laptop and allow the Pi to connect to it. I have not tested it but it should work.

Raspberry Pi with TP-Link TL-WN823N, not disconnecting when hotspot is stopped

Raspberry Pi 2 (3.18.7-v7+) with Wi-Fi dongle TP-Link TL-WN823N (8192CU chipset).
I am creating a hotspot on Windows with TP-Link TL-WN823N and configured auto connection on the Raspberry Pi. But when I stop the hotspot, in most of the cases, 'wpa_cli status' shows connected state (wpa_state=COMPLETED).
I am unable to detect the source of problem. Please tell me what could be the problem and its possible solution.

USB HID Keyboard emulator

I want to make hardware keylogger from my Raspberry Pi model B. I think that I can connect keyboard to raspberry and connect raspberry to computer, but how I can emulate keyboard output?
I consider that here must be some low-level libraries for this purpose, but I can't find someone.
Thanks!
You need to implement HID device emulator on Pi in order to act like keyboard. But it seems impossible because Pi hasn't separate USB port.
No, on the Raspberry PI model B the USB hardware is actually connected to a built in Hub, this fixes the USB format as master, there is no way a model B can be a "slave device". Thats said, the SoC of the Raspberry PI is actually capable as being used for both a master and a slave USB device, so theoretically when using a model-A it could be possible to program it to behave as a slave device. Obviously its against the USB specification for a slave device to have a type-A connector, but with some soldering you could connect a type-B or even an USB-on-the-go connector.
source