Raspberry pi with SIM7600E not connecting to internet automatically after reboot - iot

Please note that I have a Raspberry pi 4 and a SIM7600E-H1C module and I want my Raspberry pi to be connected to the internet all the time. So I used the SIM7600 module, plugged in and inserted the SIM card. I can provide internet to Raspberry pi using this command
enter image description here
and the IP of both SIM7600 and Raspberry pi must match in order to use the internet, for example:
enter image description here
but my problem is When the Raspberry pi Reboot and turn it back on Refuses to connect automatically as expected So I have to re-enter the sudo command every time my computer reboots.
enter image description here
I want SIM7600E works like an aircard that inserts a SIM card and plugs it in to use the internet right away. Can anyone help me with this? Or is there a way to set the IP somewhere?
I follow this website https://www.elementzonline.com/blog/accessing-internet-(jio-sim)-in-sim7600-4g-modem-v2.0-with-Raspberry-pi-using-qmi-interface

Related

Connet to Raspberry PI on Extender

So here's my setup. Our home wifi is Verizon, with a router in the living room connected to the incoming coax, with a wireless extender upstairs in my office and another extender in the basement, both of which are also connected to the coax network. All of this basic configuration works fine for our basic wireless needs (phone, laptops, tablets, etc.).
The issue I'm having is that I have a Raspberry PI connected wirelessly to the upstairs wifi extender that runs a small Postgres database that I use for my programming tinkering. If I'm connected on my laptop or PC to that extender, I can use PG Admin or remote desktop to connect to the rPI using its IP address. However, if I'm connected to the main router or the other extender, I can't access the rPI anymore - even pinging the IP address times out. I'm assuming this is because the extender the rPI is connected to is technically a different wifi network than the ones broadcast by the router or the other extender. I'm hopeful that maybe there's some way to configure this setup that I can access the rPI from my in-home network no matter which device I'm connected to, because it's all linked via the coax that runs through the house, but I'm not sure how to make that happen, but I don't have the knowledge in this specific area to know where to adjust my settings.
Anyone have any ideas? I feel like it could either be a simple fix or something that's totally impossible. Any help is appreciated.
The issue was that I had configured both extenders and the router to broadcast on the 2.4ghz and 5ghz bands (different SSID on the 2.4ghz band) for older devices that didn't seem to like the 5ghz netowkr. The rPI was connected to the 2.4ghz network, but my laptop was connected to the 5ghz one. Switching the rPI to use the 5ghz band (or plugging it in to the extender, or switching the laptop to use the 2.4ghz network) made it visible.

Is there any way to recognize multiple usb-uart devices attach to the raspberry?

I'm trying to connect 2 usb-uart device to my raspberry with Android for thing.
My problem is I cannot difference my devices because de Api to get the uart devices attach to it only give me a list of string without any descripcion:
PeripheralManager manager = PeripheralManager.getInstance();
List<String> deviceList = manager.getUartDeviceList();
List of available devices: [USB1-1.2:1.0, USB1-1.4:1.0]
The only way that I could recognize my uart devices is looking in which port of the raspberry is attached.
So, the USB1-1.2:1.0 is the specific port that show the figure.
But, if i don't put the device in the correct usb port, the raspberry will not be able to use it and is not scalable.
There is another way to difference the uart devices?

Creating a Wi-Fi local network with no Internet access in RaspberryPi3

I need to create a wireless network with no Internet access with a Pi, because I need to communicate to it with an Android smartphone and a laptop, but being the RPi the highest step in the network hierarchy.
I've found -and tried- that I can do an adhoc network, but I am unable to connect to it with the smartphone. The other alternative is creating a Wi-Fi hotspot, with no NAT, but I don't really have a deep knowledge on networks so I'm really lost in which IP adresses I have to set.
I've followed this tutorial, and found it really useful. Could anyone tell me what should I modify from it to make it only local -apart from not doing the NAT?
The Rapsberry Pi 3 has built in Wi-Fi that can serve as an access point. Based on my experience, with the Pi acting as an access point, you should be able to connect to any device, be it Android or not.
The Pi will act as access point and serve as a DHCP daemon, assigning and handling IP addresses to any devices that connect to it. This will be a standalone network and will not be able to share an Internet connection unless you bridge it. Follow this tutorial up until the Internet sharing part:
https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md
Also, it would be better to ask this in the Raspberry Pi stack exchange.

Wifi diagnostic tool

I am working on a room which contains 6 wifi IP cameras. There are also the same wifi IP cameras in other close rooms. This cameras have their own wifi access point. I can't manage anything on this wifi network.
I have a raspberry Model 3 in this room. I tried to set up a wifi access point on this raspberry.
I can't connect to this access point, but if in unplug everything and go to try far away from this rooms, everything works great.
So i am wondering if the raspberry is not disturbed by this big wifi traffic.
What should i do ?
Here is an extract of my /etc/hostapd/hostapd.conf
Do you see something i can change in order to make it work ?
interface=wlan0
driver=nl80211
ssid=XXXX
hw_mode=g
channel=6
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=XXXXXXX
rsn_pairwise=CCMP
Thanks
Try changing the channel=6 to channel=1 in your config file. This should help if the wifi cameras are using channel 6 as well.
https://www.lifewire.com/best-wifi-channels-for-your-network-818278
If you have an Android phone handy you could try installing a WiFi Analyzer app, e.g. this one or else you may be able to use iw on the Raspberry PI to do a local scan:
iw dev wlan0 scan
Either/both of the above should show you which channels are being used within range. Then, as Gilbert says you could change the config to use a less congested channel.
I use a modification of the above command to give me a count of access points against each channel:
iw dev wlan0 scan | grep 'primary channel' | sort | uniq -c

Automating/scripting Wifi connections

I am using Ubuntu 14.04 with an external wifi key.
My goal is to successfully connect to a wifi spot without going through the GUI using a script
I have tried the following commands:
-nmcli nm wifi on
-nmcli -p dev wifi
-nmcli con up id "essid"
The second command gives me a good list of available wifi issues, however when I try to connect with the third command an error prevents the connection:
-Error: Unknown login: my "essid".
I've tried many other commands located in the wireless part of the forum, but without success.
If I use the GUI and just click once on a wifi spot to connect it without the above commands It Works.
Thank you for your interest in my concern.
Sorry for my very bad english.
"nmcli con up" only connects to existing connections and uses the saved named of the connetion as ID, not the SSID of the network.
To connect to a "new" wireless network use:
nmcli wifi connect <(B)SSID> [password ] [wep-key-type key|phrase]
If you can live without NM, then what I used to do in order to programatically connect to wifi networks was to use iwconfig and dhclient.
In order to associate to the wireless AP:
iwconfig YOUR_INTERFACE essid YOUR_ESSID channel YOUR_WIFI_CHANNEL key YOUR_PSK
In order to get an IP address via DHCP:
dhclient YOUR_INTERFACE
Note that if NM is still running, this will not work.

Resources