0

What is the simplest way to connect directly to a raspberry pi 4 wirelessly so that I can run commands in a terminal, equivalent to SSH'ing to it but without an ethernet cable or an Access Point? The Pi might be in the middle of a field and I will just be around it with a laptop running linux (ubuntu), no routers or any other infrastructure near it. Security is not really a priority so even an un-encrypted channel would be ok if it simplifies things.

I tried rfcomm but had multiple issues:

  • rfcomm is now deprecated. This makes me think there's a newer alternative but I haven't found what it is
  • I followed this guide but on the client (ubuntu laptop) I don't have the serial device that's supposed to be under /dev/cu.*
  • For some reason, most guides I find using rfcomm talk about using android as a client so using a special rfcomm client App, not connecting from linux. Not sure why. having a terminal to type commands in a tiny phone screen seems useless to me
  • I would also like to send files via this connection e.g. to deploy the application that I develop for it in my laptop. If it were ssh, I can just scp. But it seems that rfcomm being a serial console is more like a local than a remote terminal

I currently connect to the Pi via SSH but obviously both the pi and the client need to connect to an external Access Point so that won't work for my real application since the connection needs to be direct from laptop to pi

I'm open to Wifi-direct, bluetooth or any other wireless channel as long as the client can run in linux and it gives me access to a terminal in the pi where I can run commands

8
  • what do you mean? i haven't excluded anything yet
    – Hilikus
    Commented Feb 24, 2022 at 5:56
  • For Bluetooth rfcomm serial connection can be done with the standard Python Socket library: blog.kevindoran.co/bluetooth-programming-with-python-3 File exchange with Bluetooth can be done with obexd: raspberrypi.stackexchange.com/a/119818/121848
    – ukBaz
    Commented Feb 24, 2022 at 6:39
  • 1
    From your question, it is unclear why you need a wireless solution, Nor is it clear why you can't set up an access point on the Pi or your laptop. Commented Feb 24, 2022 at 7:18
  • @SteveRobillard. i didn't think it was relevant why it needs to be wireless since that was just a requirement for the solution, but the reason is that the Pi will be mounted on a cart or maybe a drone. in both cases, a wired solution to connect to it is not possible. It will also be in the middle of a field away from any infrastructure. an access point on the pi or the laptop is definitely an option, how would i get a terminal though? ssh?
    – Hilikus
    Commented Feb 24, 2022 at 15:39
  • @ukBaz with the python socket library how exactly do i get a terminal? what i understand from the tutorial is that i can just send arbitrary text from client to server, but i don't have any kind of shell to execute my commands
    – Hilikus
    Commented Feb 24, 2022 at 16:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.