X forwarding on iOS client - ios

I want to control a GUI app on my Raspberry Pi 2 (Raspbian) via SSH X forwarding with my iOS device. I heard that both the client and the server need to have X. So is there an app or a way to do this on iOS. Or should I use another method?

I think you can consider using TeamViewer or any alternatives. To build some GUI remote controlling is really complicated and you need to care too much things, like NAT, firewalls...

Related

Is it possible to access a Chromebook via ssh through USB?

My employer has asked me to prepare for testing several thousand Chromebooks (mix of models/manufacturers) to refurb/flip. This may be a recurring thing.
Most or all of these will be old enough that CCD will not be available. I'd like to connect a widget such as a Raspberry Pi to the USB and have it automate testing as much as possible.
I know I can use keyboard emulation to inject commands, but I'd like to get a crosh session running over USB so that I can read info from the DUT besides just controlling it.
Google shows bazillions of returns about using a Chromebook as an ssh terminal but what I'm looking for is the opposite. I'm prepared for the answer to be a simple "no" but I'm concerned because I can't find that anyone else has asked this question. I don't think I'm that creative, so I suspect my Goog-fu is weak.
The answer appears to be "no". However I solved it another way; using "gadget mode" I have a Raspberry Pi ZW enumerate as a keyboard and a serial port. I put the Chromebook into Developer mode, open a developer shell with ctrl/alt/F2, or on a PC/linux or Mac system open a terminal window and type "sudo su" (these have to be done manually). Then I have the RPi issue this bash command to identify the serial port "in the blind":
SERPORT=/dev/serial/by-id/$(ls /dev/serial/by-id) # Chromebook or PC/linux
(or)
SERPORT=$(ls /dev/cu.usbmodem*) # Mac
Now I can have the RPi inject commands via the keyboard, put ">$SERPORT" on the end of each command, and the output comes in the RPi gadget serial port. The RPi then packages the data and forwards it over WiFi to our CRM. It's working nicely for Chromebooks, PCs booted into linux, Mac desktops and Macbooks.
Edit:
The company I work for has actually turned this into a product and so I'm not sure how much detail I should share, but...
I learned my way around gadget mode on the RPi from this link. There are examples for setting up a keyboard and a serial port. Using the templates in that link, I made a device called /dev/hidg0 which emits keyboard scancodes from the RPi to the Chromebook. I also made a device called /dev/ttyGS0 which the Chromebook sees as a serial port.
So I send keystrokes with some python like:
with open("/dev/hidg0","bw") as hid:
hid.write(blah)
and then have the Chromebook send text to the serial port, which I then read by looking at /dev/ttyGS0
Hopefully this will be enough to get you started. I found the isticktoit link very helpful.

Communicating between a Lightroom plugin and an iOS app over a LAN

I've asked this on Adobe's LR SDK forum, thought I'd ask here as well.
I want to create a plugin for Lightroom 6+ that allows two-way communication to take place between a LR plugin and an iOS app. The iOS device would be on the same local network.
What is the best method of accomplishing this? I was thinking about using LRSocket, this is the most direct method? I assume with this method the iOS app would need to act as the server and the LR plugin would be the connecting client? But, all the documentation and examples I’ve found, regarding general LRSocket usage, imply that localhost is used. This would make direct communication with an iOS device over WiFi impossible if it can only use localhost?
Any information would be appreciated.
I've just started out trying to do the same thing, albeit with an Android app, and run into the same (apparently insurmountable) issue that LrSocket.Bind only seems to be able to bind to the localhost interface.
The only way I can think to get around this is to have an intermediary port forwarder on the LR host OS that forwards traffic between localhost:port and ethernet/wifi:port
You could use ssh on a mac, I guess, and there are port-forwarding applications for Windows (ssh is allegedly coming soon). PassPort (an old application from the XP era still seems to work).
It's a bit....messy, though.
Another option would be to use LrHttp.get (and/or .post), but that's going to have to poll for information, and may be a bit laggy for some requirements.

Working with PiCAN + raspberry pi 3 running windows IoT Core

I want to connect the PiCAN with my raspberry pi3 running windows IoT Core. I think I need a universal driver for the mcp2515 to work with the windows in Pi. I already tried using the instructions given in https://developer.microsoft.com/en-us/windows/iot/docs/driverdeployment to deploy the driver given in https://github.com/AustinWise/Mcp2515Can . But I got stuck in the instructions. I hope someone has already done this and maybe can help me with it? Did anyone successfully use this CAN board with Raspberry Pi (windows iot core)?
Thank you :)
Is a driver required in the first place?
Short answer is No.
Although a device driver is preferred, such work is not officially or community done yet.
The benefit you get from developing a device driver might include:
Native OS support for PiCAN board.
Create your create the custom IoT image, and deploy it to Microsoft store.
Possible performance improvements
others…
However, in order to develop an device driver, you need to follow the WDK framework. If you are comfortable with picking up new stuff, go ahead and try it out. You might need to refer to the linux source driver code for WDK driver developing.
If your purpose is to get the board working, you don’t need to get yourself into all these troubles.
In fact, you only need to get the SPI controller and GPIO controller, open the SPI device and initialize GPIO interrupt pin like Mcp2515Can does.
But, even after enabling the SPI, I couldn't receive anything on the
Raspberry Pi.
First, you can use Raspbian and turn on the CAN driver support to verify that you got all the wirings right. Here is the user guide you can reference.
If you can rule out the possibility of hardware failures, step into your C# code to troubleshoot the software.
Good luck.

Windows 10 IoT - Raspberry pi 2

I have to build a rover which has a camera on it and through webcam samples i am able to view the preview of it. I also came up with another app with has controls for the rover's motors. It works fine when i connect this device to a monitor and work with it, but for my purpose it needs to be headless. Is there any way i could remotely access the application. I am stuck up with so many different solutions like duplicating the entire project as webpage or could open the same application is the development machine that they communicate with each other. All i have to do is remotely control the rover with a video preview and even lower fps is acceptable.
There are a lot of ways to do this. (As #BerndGit implies.)
The easiest (IMHO) is to SSH in to the RPi from another computer and forward X11. That second computer will need to be configured for accepting X11 sessions.
Look for "SSH X11 Display Forwarding" for details on how to make this work on your setup.

Azure IoT Communication

I have an embedded device that can be controlled by JSON over UDP. I am currently performing this via an iOS App, and everything works great.
I am now wanting to be able to also control my device from a remote location. And am wanting to use Azure to perform this task. I envision that I will set up an Azure Website which will enable me to select options which then send the JSON to my device, which is behind a firewall.
My question is which of the Azure Services should I be looking into? Also, what is the best way to get the JSON packet to the device behind the firewall (I do not want to use port forwarding).
In general, to avoid an attack surface from outside your LAN (where you have your embedded device), the better solution is to open and output connection from embedded device to the cloud and to leave it open so that it can send and receive data/command.
In this case, on Azure you can use the Service Bus (queue, topic/subscription or event hub) to send/receive with AMQP protocol but it is strictly related to your device and capabilities.
Can you share more information on it ? How much it is a constrained device or a more power device with an high level OS (Linux, Windows, ...) ?
Paolo Patierno
About using Amqp on devices running android is very tedious. The java implementation in dalvik is missing a lot of required apis to be there.
By the way, do you know where we can find information about related path segments to use in amqp pure syntax in Azure, to interact with IoT-Hub end-points. Like for queue for example, we can have :
amqps://:#.servicebus.windows.net/
Thanks

Resources