Gumstix Overo wifi drops continously - embedded-linux

I am using Gumstix overo and from the past many days I am unable to get my Wifi working correctly.
I followed the instructions from Gumstix Overo Wifi and Overo Wifi to set correct parameters in /etc/network/interfaces and /etc/wpa_supplicant.conf.
/etc/network/interfaces file:
# Wireless interfaces
auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
down killall -q wpa_supplicant
wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="xxxxxx"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
scan_ssid=1
psk="xxxxx"
priority=10
}
After setting up and running ifdown wlan0 && ifup wlan0 i constantly get this message:
[ 1176.528778] cfg80211: Calling CRDA to update world regulatory domain
[ 2155.687255] cfg80211: Calling CRDA to update world regulatory domain
[ 1175.293609] cfg80211: Calling CRDA to update world regulatory domain
My iwconfig:
lo no wireless extensions.
wlan0 IEEE 802.11bg ESSID:off/any
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
My lsmod looks like this:
root#overo:~# lsmod
Module Size Used by
libertas_sdio 16484 0
libertas 99993 1 libertas_sdio
firmware_class 6920 2 libertas_sdio,libertas
ipv6 252525 22
cfg80211 172644 1 libertas
rfkill 17524 3 cfg80211
lib80211 5138 1 libertas
mt9v032 7169 1
omap3_isp 132270 0
v4l2_common 8681 2 omap3_isp,mt9v032
ads7846 10528 0
videodev 98880 3 omap3_isp,mt9v032,v4l2_common
media 12853 3 omap3_isp,mt9v032,videodev
I am using yocto project for gumstix cloned from https://github.com/gumstix/Gumstix-YoctoProject-Repo
It would be great help if I could get any inputs where I am doing wrong.

The reason for wifi drop is the Network manager. By disabling it we can run ifconfig, iwconfig without any interference from the NetworkManager.
or Another workaround is this which is quite successful:
After creating SD card with proper Image on, do not unmount the partitions.
Install a Custom systemd Service
To bring up the wireless interface on boot, you will need to create and install a custom systemd service on the microSD card.
In the rootfs partition, create a new service script:
$sudoedit /media/rootfs/etc/systemd/system/network-wireless#.service
Copy and paste the following into the file:
Description=Wireless network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/ifconfig %i up
ExecStart=/usr/sbin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant.conf
ExecStart=/sbin/dhclient %i
RestartSec=1min
Restart=on-failure
ExecStop=/sbin/ifconfig %i down
[Install]
WantedBy=multi-user.target
Save this file.
Because we are editing these files on a development machine, the normal systemd method of enabling services (systemctl) will not work. To enable our new service:
~ Change into the multi-user.target.wants directory on the root filesystem:
$cd /media/rootfs/etc/systemd/system/multi-user.target.wants/
~ Create a symbolic link to enable the service:
Overo Series COMs
$sudo ln -s ../network-wireless#.service network-wireless#wlan0.service
Finally, edit the wpa_supplicant configuration file:
$sudoedit /media/rootfs/etc/wpa_supplicant.conf
Change it to look like the following:
network={
ssid="Your Network's SSID"
psk="Your WPA2 Passkey"
}
Save the file.
Unmount the partitions on the microSD card.
SSH Into Your System
1) If you don't know the ip $ssh root#overo.local
2) If you know the IP address $ssh root#192.xx.xx.xx.local

Related

How to Change IP address in 30 seconds automatically?

I have developed a web scrape software for personal use. Now I need to change my IP address in every 30 seconds for resist block. What is the best way to change IP address in every 30 seconds?
Thank You.
Use proxy plugins that can help you do this.
If you are on UNIX system, you can try this:
Create an ip.sh file with content below, replacing eth0 by your network interface if necessary and by the 3 first numbers of your network's IP address (e.g. 192.168.1)
chmod 700 ip.sh
./ip.sh (use sudo if you're not using the administrator account)
ip.sh file:
#!/bin/bash
index=2
while :
do
ifconfig eth0 <IP>.${index} netmask 255.255.255.0 up
index=$((index+1))
if [ "$index" -gt "254" ]; then
index=2
fi
sleep 30
done

Simulate Network Latency mac Sierra

I am trying to simulate network latency for all traffic to a certain ip/url. I tried using a proxy through Charles but the traffic is going through HTTP or SOCKS. I found some information online but it does not seem to work for me. Can anyone see what is wrong with my commands?
#enable pf
pfctl -E
#add a temporary extra ruleset (called "anchor") named "deeelay
(cat /etc/pf.conf && echo "dummynet-anchor \"deeelay\"" && echo "anchor
\"deeelay\"") | sudo pfctl -f -
#add a rule to the deeelay set to send any traffic to endpoint through new rule
echo "dummynet out proto tcp from any to myurl.com pipe 1" |
sudo pfctl -a deeelay -f -
#Add a rule to dummynet pipe 1 to delay every packet by 500ms
sudo dnctl pipe 1 config delay 500
I see this warning when I run the commands:
No ALTQ support in kernel
ALTQ related functions disabled
Is that the issue?
The problem was the proto parameter. The application is not using tcp, it is using another protocol. You can either supply all the protocols you want as a list like so:
proto { tcp udp icmp ipv6 tlsp smp }
Or you can just remove the proto parameter altogether and it will do all protocols.

Mac OSX – open a port

I want to open the port 25 of my Mac, so I edited the file /etc/pf.conf
MacBook-Pro-de-nunito:~ calzada$ more /etc/pf.conf
#
# Default PF configuration file.
#
# This file contains the main ruleset, which gets automatically loaded
# at startup. PF will not be automatically enabled, however. Instead,
# each component which utilizes PF is responsible for enabling and disabling
# PF via -E and -X as documented in pfctl(8). That will ensure that PF
# is disabled only when the last enable reference is released.
#
# Care must be taken to ensure that the main ruleset does not get flushed,
# as the nested anchors rely on the anchor point defined here. In addition,
# to the anchors loaded by this file, some system services would dynamically
# insert anchors into the main ruleset. These anchors will be added only when
# the system service is used and would removed on termination of the service.
#
# See pf.conf(5) for syntax.
#
#
# com.apple anchor point
#
pass in proto tcp from any to any port 80
pass in proto tcp from any to any port 25
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
But when I restart the service, I got these errors:
MacBook-Pro-de-nunito:~ calzada$ sudo pfctl -f /etc/pf.conf
pfctl: Use of -f option, could result in flushing of rules
present in the main ruleset added by the system at startup.
See /etc/pf.conf for further details.
No ALTQ support in kernel
ALTQ related functions disabled
/etc/pf.conf:24: Rules must be in order: options, normalization, queueing, translation, filtering
/etc/pf.conf:25: Rules must be in order: options, normalization, queueing, translation, filtering
/etc/pf.conf:26: Rules must be in order: options, normalization, queueing, translation, filtering
pfctl: Syntax error in config file: pf rules not loaded
adding the lines at the end of the file:
MacBook-Pro-de-nunito:~ calzada$ sudo pfctl -f /etc/pf.conf
pfctl: Use of -f option, could result in flushing of rules
present in the main ruleset added by the system at startup.
See /etc/pf.conf for further details.
No ALTQ support in kernel
ALTQ related functions disabled
MacBook-Pro-de-nunito:~ calzada$ nmap -p 25 localhost
Starting Nmap 7.40 ( https://nmap.org ) at 2017-03-12 21:35 CET
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00023s latency).
Other addresses for localhost (not scanned): ::1
PORT STATE SERVICE
25/tcp closed smtp
Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
Are you sure you have something listening on port 25? If you don't have anything listening on port 25 it will show as closed.
As you ran nmap on localhost you wouldn't even need to allow anything through the firewall. You would only need to allow it through the firewall if traffic was coming inbound from another device.
You can use the following to check if a program is listening on port 25
lsof -n -i:25 | grep LISTEN

Observium can't resolve host, but I can ping it

./add_device.php 1.2.3.4 catalyst v1
fails with
Try to add 1.2.3.4:
Could not resolve 1.2.3.4.
Devices failed: 1.
but ping works
fping 1.2.3.4
1.2.3.4. is alive
but snmpwalk works like:
snmpwalk -v 1 -c catalyst 1.2.3.4
iso.3.6.1.2.1.1.1.0 = STRING: "Cisco IOS Software, Catalyst...
...
web interface add device also fails same way.
what am I missing?
The community edition can't resolve IP's (go figure), so you have to create an entry in /etc/hosts for your IP and assign somename.whatever to it and then use that hostname and it will work.

ipv6 neigh entries getting failed

I have bunch of ipv6 neigh entries which are failed:
6000::2828:2802 dev eth2 lladdr 00:1f:a0:02:0e:b2 STALE
7000::1e1e:1e01 dev eth1 FAILED
8000::1e1e:1e01 dev eth1 FAILED
4000::1414:149e dev eth2 lladdr 00:03:00:04:00:09 PERMANENT
5000::1e1e:1e01 dev eth1 FAILED
3000::a0a:a3a dev eth1 lladdr 00:03:00:03:00:09 PERMANENT
Now, When I use flush to remove these entries, it says nothing to flush. Do you guys know how to flush or remove these entries, If I delete the entry, it goes in the failed state. Can I change the time for these values, so it automatically gets removed in say 10 seconds.
They should completely disappear when you do something like
ip -6 neigh del 3000::a0a:a3a dev eth1
But much more important: those addresses are bogons. They should never be in use anywhere... Seeing them in your neighbor discovery tables means that your system thinks they are on-link, and that should not be the case.
I suggest you look at your network configuration first. Your interfaces might have the wrong prefixes of prefix-lengths configured...
Yes you can have them removed in 10 secs or whatever.
$ sysctl net.ipv6.neigh.default
...
net.ipv6.neigh.default.gc_interval = 30
net.ipv6.neigh.default.gc_stale_time = 60
...
gc_interval is seconds after which the clean-up kicks in to remove stale entries.
gc_stale_time is seconds after which the entries are marked to be stale.
You can set both these values to 10. You can override these values exclusively for eth1 under net.ipv6.neigh.eth1.
$ sysctl -w net.ipv6.neigh.eth1.gc_interval=10
$ sysctl -w net.ipv6.neigh.eth1.gc_stale_time=10

Resources