Connecting laptop to Raspberry Pi with Node server - node.js

I have a web app running on a Node.js server on a Raspberry Pi. I can use my MacBook to connect to the WiFi for the Raspberry Pi only if the MacBook is plugged into an internet connection through an ethernet cable as well.
If an ethernet cable is plugged into my MacBook and then the other end is connected to LAN, I can use my WiFi to connect to the RPi, but as soon as I disconnect my ethernet cable from the MacBook, I cannot connect to the RPi via WiFi. How can I start troubleshooting this issue?

Related

Why does my WiFi connection become slow when I connect my Bluetooth speaker on Ubuntu 22.04 LTS?

I tried disconnecting my Bluetooth speaker, then everything works fine but whenever the Bluetooth speaker is connected the WiFi becomes so slow that I barely can use the internet.
Disconnecting the Bluetooth speaker fixes it but I need to connect my Bluetooth speaker as well.

Port forwarding using Raspberry Pi

I installed a PPP (Point to Point Protocol) in my Raspberry pi in order to connect with another Linux based card using serial port (with USB-RS422 cable). The PPP is well installed and configured, so from the raspberry pi I can ping the Linux card, my goal is to access the Linux card through the raspberry pi, I active the port forwarding in my raspberry pi also I added a route in my PC (Windows based).
For information, my PC is under my company network, the raspberry is under an IoT device network managed also by my company. Please have a look at the below diagram to well understood the situation.
enter image description here
My Question is : Do you have any idea to how can I access the based Linux
Card through the raspberry pi? Should I use nftables for that? if yes how? any other suggestions?
To clarify more, I changed the design, which means I connect my raspberry pi to my pc using ethernet cable and tried to ping the based card through the raspberry pi, it works well, means that I could ping the based card from my pc. Please have a look at the below picture:
enter image description here

Two UART Devices (One for USB and one for Bluetooth)

I need to make the Raspberry Pi communicate with the Arduino via USB Cable. From this, I will use the port on the USB which supports Serial Communication. However I also need to make the Raspberry Pi communicate through Bluetooth in a Mobile App via Serial Communication as well. Since both Serial devices use different ports according the the Raspberry Pi 3 Model B documentation, can it communicate at the same time? (The Arduino to Raspberry Pi and Raspberry Pi to Mobile App). The Bluetooth uses the /dev/ttyAMA0 port then I will use an USB port to connect the Pi to the Arduino.
Example using pySerial library.
serialArduino = serial.Serial('/dev/ttyACM0', 9600)
serialBluetooth = serial.Serial('/dev/ttyAMA0', 9600)

Raspberry pi 3 Model B no autoconnect wifi when I shutdown

I have a problem with my Raspberry Pi3, Model B connecting to Wi-Fi.
I have the Raspberry 3 display 7" where I can see if Wi-Fi is connected.
When I connect and disconnect the Raspberry with ethernet wire the Wi-Fi works, then when I reboot the Wi-Fi works perfectly too, and I can reboot whenever I want and Wi-Fi works.
But when the Raspberry Pi shuts down and wakes up Wi-Fi doesn't work.
The file /etc/wpa_supplicant/wpa_supplicant.conf:
network={
ssid="My_wifi_name"
psk="Password"
}
Some idea?
If you need another file say me please, I'm new here.

Share wireless connection with ethernet device - Raspberry Pi 3 (Raspbian)

I would like to share a internet connection to a computer which is connected to Raspberry Pi 3 via ethernet cable. I am using WIFI connection for my Raspberry.
I have already set the IP settings on other computer but it does not work like when you are connecting two computers.
I need static IP on Raspberry and on other computer. I have already set that Raspberry has static IP (wlan0), but when I set ethernet (eth0) to static IP, internet on Raspberry stops working.
That is how my network should be
ifconfig from Raspberry
Thank you for your help, BR Matevz
I suggest you need to use a network range for the network between the computer and the Raspberry pi. The network between the router and Raspberry is 192.168.50.0/24
The network between the computer should be something different, for example it could be: 192.168.51.0/24
The Raspberry pi could then be 192.168.51.1 and the computer could be 192.168.51.2
You would then have to use IP forwarding on the PI and possibly NAT as well.

Resources