I have been trying to get Raknet up and running on my Raspberry Pi (2).
I am using a simple client server test program to connect from my windows machine to my raspberry pi. Using tshark on the Pi I can see that all message are arriving on the Pi. However, the server application does not seem to pick those up. As far as I can deduce all ports are open, the machines are on the same network, the code is correct (taken from some github repo with examples for raknet).
The frustrating thing is that a while back I though I solved this communication by starting my server app as root (sudo). However, in the meantime something has been changed in my setup which makes this no longer the case. Any help is appreciated.
I completely forgot about my question here. It actually had to do with privileges on the networks we use here. I had been testing on two different networks without realizing. Problem has been solved.
Related
I have what I believe to be a very simple question.
Context
I have a Raspberry Pi Zero W running Raspbian Lite (2020-02-13-raspbian-buster-lite.img).
Question
How do I change just one file on the SD Card, e.g. in the host partition, to auto-configure the raspberrypi as a wifi hostpot, and call it raspberrypi.
Also, I would like to be able to set the hotspot to be open, or with a password raspberry (just like the ssh password :) ).
What I tried already
I found lots of instructions on installing software packages, but unless I'm connecting via ssh already, then I can't run commands unless I'm already networked to the pi.
Why do I want this?
I want to be able to do this, for much greater ease of connecting to a raspberrypi in the first instance, for example, along with enabling ssh, this would allow very simple ease of access for incoming connections.
Only an idea
Finally, what does anyone think of the idea of enabling this by default in Raspbian. It can be disabled is required, but would substantially ease the process of connecting to a Pi with a Raspbian image out of the box - allowing a use to see so-called "proof-of-pi" immediately after first boot.
As far as I've seen, configuring the Pi before-first-boot by editing the boot partition files is limited. However there are some custom tools out there where you can look at creating a custom image or design some provisioning steps for your Pi.
PiBakery is a tool for creating custom images of Raspbian. Setting up a WiFi hotspot will most certainly require a custom script for tool installation and configuration.
I know that you can configure a SD card to auto-connect to WiFi (for normal network connections) by creating a wpa_supplicant.conf file and setting some values in boot's config.txt, you may want to check some of the documentation from the Raspbian project regarding config.txt. Keep in mind that the default raspberrypi.org image is slightly different than the Raspbian Project's image, so your mileage may vary.
Finally, depending on your use case for this/deployment strategy, you can also look into changing the Pi's boot mode so that it boots from a network host, kind of like "PXE Boot" for Windows machines. You'd have to host a provisioning server that the Pi can get information from and sync up with, which may be out of the bounds of what you're trying to accomplish, but I figured I'd bring it up!
I recently bought a Raspberry Pi 3 Model B and started to set it up. I followed some tutorials and finally was able to access it remotely without having to plug it to a monitor, a keyboard, a mouse...
Everything is okay but it just bothers me a little bit that whenever I reboot it or I don't use it for some time I have to ping it on the computer before being able to control it remotely. If I don't ping it, connection fails.
It's not a big problem but is something I'd like to be solved. Thank you for your attention!
UPDATE: Just did a clean installation and now it works fine and can be accessed remotely at any time. Thanks to anybody that tried to help!
Let me start by saying that I have no experience with Linux and this is my first attempt at getting into the IoT with a raspberry pi3. My question is why can I connect via ssh to my pi when I use the ip address but not the hostname?
After getting everything set up at home, I tried to remote in via PuTTY from my laptop. (The laptop is less than 6 months old and if I need to provide the specs on it, I can. It is running windows 10 if that matters). It worked when I entered the ip address of the pi, but when I tried again with the host name (which is clearly defined in the raspberry pi configuration) it said host does not exist. I used hostname.local and still failed.
Today, I brought the whole setup to work to try a few more scenarios. From my work desktop, which is running windows 7 and not wireless, I could remote in via hostname.local. I then tried again on a different laptop running windows 7 and it worked too. Next attempt was on another new (less than 3 months old) laptop running windows 10 and it failed to remote in via the hostname.
This would tell me that there is nothing wrong with my home network or the network at work, and it also makes me think that this has nothing to do with the pi, since other computers can resolve the hostname to the ip address and successfully login. What the hell am I doing wrong or missing?
I spent 2 nights googling and browsing forums trying to find an answer for this but cant, so instead of bashing this post, please poke me for more information you think might be helpful for a solution.
EDIT I gave my computer and PI to my cousin to fix. He installed Samba, though I don't know what it does differently. After doing more research, it sounds like the problem I was having was a DNS issue. I don't know how it was resolved by downloading samba on the pi, but I can now connect via the hostname.
So if I understand correctly it would appear that there is some particular settings on that laptop preventing you from using SSH if that is the only thing you are changing? I think this is likely to be something to do with the security settings on the laptop but Windows isn't my thing sorry.
I have a series of RPi's running Raspian which need to deployed in various location around the world.
They will have internet access, but will all be behind a router. Is there an off-the-shelf solution to keep the possibility to create a SSH connection to them? I am thinking about solving problems, upgrading etc.
I am thinking of a 'server' solution where a 'client' on the RPi keep an active connection so a SSH connection can be established when required. Any suggestions will be much appreciated!
I have experimented with several services including LogMeIn Hamachi and Weaved among others. I would highly recommend using Weaved because it allows you to meet your goal (SSH to pi behind a router), and the setup is painless. You may even find some other uses that are quite handy.
See the installation details at https://developer.weaved.com/portal/members/betapi.php
Steps to be up and running:
Go to http://www.weaved.com and sign up.
Install weaved on your pi, and follow the prompts for SSH (Instructions at https://developer.weaved.com/portal/members/betapi.php).
Go to "My Devices" at weaved.com and get the new internet accessible proxy address for your pi.
Enjoy!
Firstly,here, I will mention all what I did to make raspberry pi as a web server or as a data cloud. But all the issues which were applied did not work. There are some problems in somewhere , but I dont know where, what , how.. ?
So let me start.
Firstly,I booted my raspberry pi with Raspian OS. It works in a best manner for sure.Then, I installed ntfs-3g to make it possible to read my hard drives by raspberry pi.
When I connected my hard drive (500 GB), raspberry pi went crazy,it freezed and so on.
I have two hypotheses. One of them , maybe hard drive could be so huge for raspberry pi to read and it could take lots of time to read.
But someone could do with 1TB hard drive. So this one is dead!
Another hypothesis is that hard drive is formatted with NTFS. Maybe it could be problem.
At first, I booted raspberry pi from a usb storage and when I connected that hard drive, raspberry tried to boot itself from hard drive, not from usb.That's why this is one another hypothesis. I havent disproved this yet. But i will and let you know.
Although I could not connect my hard drive to raspberry pi, I gave a break to that issue and I tried to create a connection from remote network to my raspberry pi.
I made raspberry's IP as a static. I could connect it from ssh and file zilla(ftp) LOCALLY. I disabled firewall of my router and observed my router's external IP. It has not changed for many days although I dont have a static external IP. Then, I arranged my port forwarding like these
"router_external_IP":8080 destination(raspberry's internal IP) is 22 (for SSH)
"router_external_IP":9000 destination(raspberry's internal IP) is 80 (for HTML)
"router_external_IP":8500 destination(raspberry's internal IP) is 3306(for mySql)
When SSH server and Mysql server ran on the raspberry pi, I tried to connect to raspberry pi
by SSH with "router_external_IP":8080 (from putty)
by browser with "router_external_IP":9000
by browser with "router_external_IP":8500
NO ONE WORKED :( ! [By the way, I installed web servers on it, but i did not mention]
Someone can say that "Are you sure about ports are open ?".
Yes I am sure I checked it out. But I am not sure on my router are forwarding these ports to raspberry pi or not . Also, I can not debug it.
Actually, I have 2 hypotheses on that also.
First one is that maybe router does not forward these ports to raspberry pi.
Second one is that maybe I am doing something wrong and that is why although router forwards all given ports to raspberry, raspberry can not respond.
I can not disprove these since I dont know how to debug.
I do not know what to do. I just got lost. Please help me on these issue.
An easy way to check if your router is forwarding your ports is to check them at: http://canyouseeme.org . If, as you say, all your ports are open on your internal network, if "canyouseeme" can't see your services then you know you need to tweak your router settings.