Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

3 votes
3 answers
62 views
Share internet over external wlan
I have multiple devices (A, B, C). Device A is a sensor that captures data and shares it with device C (Android) over a local Wi-Fi network. The problem is that the application to receive data only works on Android, and Android does not support being connected to two networks simultaneously, so when...
I have multiple devices (A, B, C). Device A is a sensor that captures data and shares it with device C (Android) over a local Wi-Fi network. The problem is that the application to receive data only works on Android, and Android does not support being connected to two networks simultaneously, so when C connects to the Wi-Fi that A emits, it can correctly receive the data captured by A, but loses internet connection. I would like to know if a third device B (Ubuntu 23.10) with internet thanks to a 4G modem, can connect to the Wi-Fi network that A broadcasts and share internet through that Wi-Fi network so that C has internet when it connects to A's Wi-Fi. enter image description here A is not configurable, it is a purchased device and I cannot modify anything. A emits a Wi-Fi signal and to receive data it is necessary to connect an Android device (C) to A's Wi-Fi network in order to receive data from its application. If A could connect to a hotspot issued by C there would be no problem since A and C would be connected and C would maintain an internet connection. However, A's app does not support that functionality and the only way to receive the data captured by A is to connect C to the Wi-Fi created by A. I would like to know if I can add another device (B), with an OS that does support simultaneous connection of network interfaces (for example Ubuntu) and share the internet through the Wi-Fi created by A. I have searched many similar questions about it, but none that solve my problem. In most of the questions asked, the internet is shared through a network cable or by creating a hotspot, however, I need to share the internet through the Wi-Fi network that A creates and not create a new one. On the other hand, I have found a lot of information about bridges and bonding, but I have not achieved favorable results either.
WorkPhone ID002 (31 rep)
Mar 22, 2024, 01:13 PM • Last activity: Mar 22, 2024, 09:25 PM
0 votes
1 answers
812 views
What are the best practices for configuring durable IOT Linux devices? Should I use an Overlay File System?
In the past our company used raspberry pi's for our IOT application. The problem with that was that SD cards wear out and get corrupt. We now ordered Compulab SBC's with eMMC storage running Debian. So what would be the best practices to configure durable embedded IOT devices? I would say: - Choose...
In the past our company used raspberry pi's for our IOT application. The problem with that was that SD cards wear out and get corrupt. We now ordered Compulab SBC's with eMMC storage running Debian. So what would be the best practices to configure durable embedded IOT devices? I would say: - Choose an SBC with eMMC storage - Make sure you have a journaling filesystem (has_journal is enabled on EXT4) - Write logs to ram to prevent wear on storage (in /etc/systemd/journald.conf Storage=volatile) - Ensure fsck runs at boot (in /etc/fstab the last field is set to 1 or 2) - Swap should be disabled (run free -> total Swap should be 0) Any more suggestions? Overlay file system ----------------- Raspbian has an option in 'raspi-config'->'Performance Options'->'Overlay File System' I asked Compulab if they would recommend also using it, but they think it is already as robust as it can be with filesystem journaling and fsck that runs at boot. Would using an Overlay File System to prevent writes to storage be worth the extra complexity of needing to reboot the device multiple times to disable it and enable it again if you ever want to update it later?
Matebo (29 rep)
May 2, 2023, 11:07 AM • Last activity: May 6, 2023, 10:22 AM
0 votes
1 answers
355 views
Prevent VAP from accessing the internet (with ebtables)
I'm trying to find a way to connect smart home devices to my local network but deny them access to the internet. Rather than set individual rules bound to an IP address, I'm trying to create a virtual WiFi on my DD-WRT router that has access to the local network, but drops internet-bound packets. By...
I'm trying to find a way to connect smart home devices to my local network but deny them access to the internet. Rather than set individual rules bound to an IP address, I'm trying to create a virtual WiFi on my DD-WRT router that has access to the local network, but drops internet-bound packets. By default, any new virtual WiFi gets mixed in with the main pool of bridged interfaces. This is not a totally uncommon problem, and the standard approach seems to be move the virtual interface into a bridge of its own and use a different subnet and a whole mess of iptables rules. e.g. https://unix.stackexchange.com/questions/462055/dd-wrt-prevent-vap-from-accessing-the-internet Surely we can do better than that. I expected to be able to add a single ebtables rule to get the effect I want. Something like this illegal rule: ebtables -t broute -I BROUTING -i wl0.1 -o $(get_wanface) -j REJECT -o and REJECT aren't valid in this context, so the closest I can get is: ebtables -t broute -I BROUTING -i wl0.1 -p IPv4 --ip-destination ! 192.168.1.0/24 -j DROP The design here intends to hook into the broute table (very early in the global chain) and DROP packets out of the bridge router. The packets it targets are any that come in on the virtual WiFi and intend to go somewhere other than the local subnet. This kind-of works. Maybe for the first local / WAN test I do, but after that my diagnostic apps hang and the network feels very unhealthy. I think this is because ebtables can't do anything fancy with IP, so the concept of REJECT doesn't really apply here. This is a problem, because DROP leaves the phone off the hook and I have nothing handling where the DROP'd packets go (I don't even know where they go / how to intercept them / how to REJCET them etc.) Does this ebtables approach have legs or is it a lost cause?
Brandon Lesko (11 rep)
Oct 19, 2022, 04:11 AM • Last activity: Oct 20, 2022, 06:26 PM
0 votes
1 answers
210 views
how can I detect if my infinite cp command has failed using bash
I have a little data collector, a Raspberry Pi Zero W, which, on boot, mounts a remote folder on mnt using sshfs. The data transfer is effected using a cp command, e.g., `cp device file &` where device is local and file is in the remote folder. This is intended to be an infinite loop. If power to th...
I have a little data collector, a Raspberry Pi Zero W, which, on boot, mounts a remote folder on mnt using sshfs. The data transfer is effected using a cp command, e.g., cp device file & where device is local and file is in the remote folder. This is intended to be an infinite loop. If power to the Pi fails the process restarts when power returns. But what if the server goes down during the copying? I'd like to then loop into a reboot until copying resumes. But how can I tell, from the pi, when the server is out?
Dave Stevens (11 rep)
Jul 19, 2022, 02:35 AM • Last activity: Jul 19, 2022, 04:31 AM
0 votes
0 answers
38 views
WPS Push-Button for Bluetooth?
Is there any such thing like the WPS Push-Button function for Bluetooth? I would like to connect a headless IoT device to a smartphone. Unfortunately the IoT device has no input capability (just a button).
Is there any such thing like the WPS Push-Button function for Bluetooth? I would like to connect a headless IoT device to a smartphone. Unfortunately the IoT device has no input capability (just a button).
flood (388 rep)
Feb 14, 2022, 06:56 PM
3 votes
1 answers
1867 views
How to connect to the internet, via a bluetooth access point, from command line
The question may seem highly specific, but I didn't seem any answer anywhere. Accessing the internet via a bluetooth access point sounds like an odd choice, but I believe it's the right one in my case, where a very small machine with a small battery running debian, should be able to connect to the i...
The question may seem highly specific, but I didn't seem any answer anywhere. Accessing the internet via a bluetooth access point sounds like an odd choice, but I believe it's the right one in my case, where a very small machine with a small battery running debian, should be able to connect to the internet every time once in a while at a low battery cost. I have, at my disposal, android and ios devices that are able to share an internet connection via bluetooth. My own device has a micro controller that also has a bluetooth chip. It can normally scan devices, pair to them, and connect to them via bluetooth (done using bluetoothctl), but I couldn't find how to establish an internet connection via a BT device I am connected to. In fact I don't even know how to test it: can I just leave the bluetoothctl prompt and ping google? Is that even a thing that can be done, provided an internet connection was established? Thanks in advance.
Tohkai (35 rep)
Oct 23, 2019, 10:56 AM • Last activity: Jan 26, 2022, 12:53 PM
0 votes
0 answers
771 views
LPAd (eSIM) Linux?
Is anyone aware of a LPAd for Linux devices, both Android and Windows support this as of currently. I have searched the internet and was unable to find any information about if / or an eSIM LPAd will ever be supported on Linux. Maybe someone is aware of a program capable of this which can run on Lin...
Is anyone aware of a LPAd for Linux devices, both Android and Windows support this as of currently. I have searched the internet and was unable to find any information about if / or an eSIM LPAd will ever be supported on Linux. Maybe someone is aware of a program capable of this which can run on Linux? Or maybe someone here has successfully implemented an eSIM in a Linux environment? https://source.android.com/devices/tech/connect/esim-overview https://support.microsoft.com/en-us/windows/use-an-esim-to-get-a-cellular-data-connection-on-your-windows-pc-0e255714-f8be-b9ef-9e84-f75b05ed98a3 Thank you!
icyli2 (1 rep)
Dec 19, 2021, 08:56 AM
0 votes
1 answers
71 views
can't get service to run on Rock64 SBC
I have a python script that displays the current IP address and time to a LCD screen attached to my device (Rock64 SBC). The python script runs fine on it's own. from subprocess import check_output from time import sleep from datetime import datetime from RPLCD.i2c import CharLCD lcd = CharLCD('PCF8...
I have a python script that displays the current IP address and time to a LCD screen attached to my device (Rock64 SBC). The python script runs fine on it's own. from subprocess import check_output from time import sleep from datetime import datetime from RPLCD.i2c import CharLCD lcd = CharLCD('PCF8574', 0x27, auto_linebreaks=False) lcd.clear() def get_ip(): cmd = "hostname -I | cut -d\' \' -f1" return check_output(cmd, shell=True).decode("utf-8").strip() while True: lcd_line_1 = datetime.now().strftime('%b %d %H:%M:%S') lcd_line_2 = "IP " + get_ip() lcd.home() lcd.write_string(f'{lcd_line_1}\r\n{lcd_line_2}') sleep(10) Then the service code for lcd.service is this: [Unit] Description=LCD IP Display After=multi-user.target [Service] Type=simple ExecStart=/bin/sh -c "python3 /home/rock64/pi/lcd_ip.py" WorkingDirectory=/home/rock64/pi Restart=always User=rock64 [Install] WantedBy=multi-user.target *systemctl status lcd.service* displays: rock64@rock64:/etc/systemd/system$ systemctl status lcd.service ● lcd.service - LCD IP Display Loaded: loaded (/etc/systemd/system/lcd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2021-08-19 15:10:11 CDT; 11s ago Process: 5029 ExecStart=/bin/sh -c python3 /home/rock64/pi/lcd_ip.py (code=exited, status=1/FAILURE) Main PID: 5029 (code=exited, status=1/FAILURE) Aug 19 15:10:11 rock64 systemd: lcd.service: Service hold-off time over, scheduling restart. Aug 19 15:10:11 rock64 systemd: lcd.service: Scheduled restart job, restart counter is at 15. Aug 19 15:10:11 rock64 systemd: Stopped LCD IP Display. Aug 19 15:10:11 rock64 systemd: lcd.service: Start request repeated too quickly. Aug 19 15:10:11 rock64 systemd: lcd.service: Failed with result 'exit-code'. Aug 19 15:10:11 rock64 systemd: Failed to start LCD IP Display. rock64@rock64:/etc/systemd/system$ journalctl _PID=5029 -- Logs begin at Sun 2018-01-28 09:58:18 CST, end at Thu 2021-10-14 12:18:00 CDT. -- Aug 19 15:10:10 rock64 sh: Traceback (most recent call last): Aug 19 15:10:10 rock64 sh: File "/home/rock64/pi/lcd_ip.py", line 5, in Aug 19 15:10:10 rock64 sh: lcd = CharLCD('PCF8574', 0x27, auto_linebreaks=False) Aug 19 15:10:10 rock64 sh: File "/home/rock64/.local/lib/python3.6/site-packages/RPLCD/i2c.py", line 168, in __i Aug 19 15:10:10 rock64 sh: auto_linebreaks=auto_linebreaks) Aug 19 15:10:10 rock64 sh: File "/home/rock64/.local/lib/python3.6/site-packages/RPLCD/lcd.py", line 98, in __in Aug 19 15:10:10 rock64 sh: self._init_connection() Aug 19 15:10:10 rock64 sh: File "/home/rock64/.local/lib/python3.6/site-packages/RPLCD/i2c.py", line 173, in _in Aug 19 15:10:10 rock64 sh: self.bus = SMBus(self._port) Aug 19 15:10:10 rock64 sh: PermissionError: [Errno 13] Permission denied I have chmod +x the main python file and the files i2c.py and lcd.py. ls -ls shows rock64@rock64:~/pi$ ls -la lcd_ip.py -rwxr-xr-x 1 rock64 sudo 500 Aug 13 17:08 lcd_ip.py lastly, I have added the following lines to visudo rock64 ALL=(ALL) NOPASSWD: /etc/systemd/system/lcd.service rock64 ALL=(ALL) NOPASSWD: /home/rock64/pi/lcd_ip.py rock64 ALL=(ALL) NOPASSWD: /home/rock64/.local/lib/python3.6/site-packages/RPLCD/ic2.py rock64 ALL=(ALL) NOPASSWD: /home/rock64/.local/lib/python3.6/site-packages/RPLCD/lcd.py and I still get "error 13 permission denied". Any suggestions?
Shawn (117 rep)
Aug 16, 2021, 03:28 PM • Last activity: Aug 20, 2021, 04:12 PM
0 votes
1 answers
706 views
Connection two raspberry PI via Wi-Fi direct
I wanted to play with the Wi-Fi direct protocol and really understand it as I want to pretend I have a sensor network that follows the pattern: 1. wake up 1. establish a network 1. trade data 1. disconnect 1. wait for next window 1. and repeat. I have come close, but I can't quite figure out how to...
I wanted to play with the Wi-Fi direct protocol and really understand it as I want to pretend I have a sensor network that follows the pattern: 1. wake up 1. establish a network 1. trade data 1. disconnect 1. wait for next window 1. and repeat. I have come close, but I can't quite figure out how to get the full protocol to work. I started with two identical Raspberry PI 4's running Raspbian 10. I have added the following packages: ~~~ openssl-server, bison, flex, build-essential, libglib2.0-dev, dbus-glib-1-dev, libssl-dev, libreadline-dev ~~~ I have downloaded and compiled the following: ~~~ desktop-file-utils, libnl, wpa_supplicant-2.9 ~~~ The wpa_suuplicant-2.9 was build and configured using http://www.linuxfromscratch.org/blfs/view/svn/basicnet/wpa_supplicant.html and the information from README-P2P running iw list shows P2P-client, P2P-GO, P2P-device as being supported I have modified wpa_supplicant.conf adding the following information:
ctrl_interface=/var/run/wpa_supplicant
device_name=My P2P Device **
device_type=1-0050F204-1
running wpa_cli then running p2p_find allows each device to find a printer that is nearby, but not each other I have played with using p2p_group_add on one of the pis. By using it, I can get the other pi to see the one which I did the p2p_group_add via p2p_find. I haven't fully figured out this procedure yet; however, the problem with p2p_group_add is it skips GO negotiation. This in my mind defeats the purpose of using Wi-Fi direct as I want each pi to take a turn as GO so I can distribute its workload across all devices. Any help would be much appreciated. Thank you in advance. Tim
Timothy Atkinson (9 rep)
May 27, 2020, 02:16 PM • Last activity: Jul 3, 2020, 12:47 AM
0 votes
0 answers
164 views
Cannot post request to localdomain 127.0.0.1:80 in RHEL7 while setting up Mainflux
I am trying to setup Mainflux on my Linux RHEL 7 Server. While doing `mainflux-cli provision test` it shows an error as: Post http://localhost/users: dial tcp 127.0.0.1:80: connect: connection refused I have tried following: Wget: wget 127.0.0.1 --2020-04-02 09:52:01-- http://127.0.0.1/ Connecting t...
I am trying to setup Mainflux on my Linux RHEL 7 Server. While doing mainflux-cli provision test it shows an error as: Post http://localhost/users: dial tcp 127.0.0.1:80: connect: connection refused I have tried following: Wget: wget 127.0.0.1 --2020-04-02 09:52:01-- http://127.0.0.1/ Connecting to 127.0.0.1:80... failed: Connection refused. Traceroute: traceroute 127.0.0.1 traceroute to 127.0.0.1 (127.0.0.1), 30 hops max, 60 byte packets 1 localhost (127.0.0.1) 0.062 ms 0.029 ms 0.027 ms Ping: ping 127.0.0.1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. ^C --- 127.0.0.1 ping statistics --- 87 packets transmitted, 0 received, 100% packet loss, time 86006ms Can anyone help with configuring this. How to check if Mainflux is running, and if running then on which url.
Nishchay Maurya (1 rep)
Apr 3, 2020, 06:59 AM • Last activity: Apr 3, 2020, 09:11 AM
0 votes
2 answers
385 views
iptables rule to block local net port
I'm on local 192.168.1.0/24 network with an openwrt router at 192.168.1.1 and I want to block any tcp connection to an IoT device that has an open port, let's say 192.168.1.12:5001. I don't have access to the device's linux so I can't enforce the rule there, Is that even possible from the router wit...
I'm on local 192.168.1.0/24 network with an openwrt router at 192.168.1.1 and I want to block any tcp connection to an IoT device that has an open port, let's say 192.168.1.12:5001. I don't have access to the device's linux so I can't enforce the rule there, Is that even possible from the router without any complex segmentation? maybe I need special router/switch? I have tried these on the router, but none of them work:
root@OpenWrt:~# iptables  -I INPUT  -p tcp --destination-port 5001 -j DROP
root@OpenWrt:~# iptables  -I OUTPUT  -p tcp --destination-port 5001 -j DROP
root@OpenWrt:~# iptables  -I FORWARD  -p tcp --destination-port 5001 -j DROP
(I'm fine dropping any packets to port 5001 just for testing)
martin (203 rep)
Mar 2, 2020, 09:33 PM • Last activity: Mar 2, 2020, 10:15 PM
-1 votes
1 answers
606 views
Ubuntu Core as Hyper-V virtual machine image
As Ubuntu Core can be installed on an Intel® NUC, is there any possbility to make it run as Hyper-V virtual machine to play around with it?
As Ubuntu Core can be installed on an Intel® NUC, is there any possbility to make it run as Hyper-V virtual machine to play around with it?
Stefan (101 rep)
Feb 11, 2020, 10:30 AM • Last activity: Feb 16, 2020, 08:55 PM
3 votes
1 answers
6576 views
installing eclipse/paho.mqtt c++ client on Debian
I'm developing a C++ program (for a home IoT Project) on Debian 9 that needs to act as an MQTT client. I found paho.mqtt would be helpful in this regard, but none of the on-line documentations to install it worked so far. Does anyone has any experience on getting paho mqtt c++ client to work on Debi...
I'm developing a C++ program (for a home IoT Project) on Debian 9 that needs to act as an MQTT client. I found paho.mqtt would be helpful in this regard, but none of the on-line documentations to install it worked so far. Does anyone has any experience on getting paho mqtt c++ client to work on Debian 9? If so, could you help me with the steps I need to do to get it working? (My Backgroud : I'm pretty comfortable around Linux, kind of OK when it comes to writing code in C or C++, but not that familiar with how c++ compiler works or how to get get C++ header files available for my program in this case) Thanks in advance!
ChinM (33 rep)
Jul 1, 2019, 03:30 AM • Last activity: Jul 2, 2019, 07:39 AM
2 votes
0 answers
5921 views
Line-ending problem with Telnet: can't remove LF from CRLF when sending command
I am unable to get Telnet to send only CR (`\r`) at the end of a command, despite setting the `crlf` toggle to ` ` (see example below). Instead, Telnet always sends CR-LF (`\r\n`). My goal: retrieve data from a remote device connected to a cell-modem through an RS-232 port. Currently, I’m using Teln...
I am unable to get Telnet to send only CR (\r) at the end of a command, despite setting the crlf toggle to ` (see example below). Instead, Telnet always sends CR-LF (\r\n`). My goal: retrieve data from a remote device connected to a cell-modem through an RS-232 port. Currently, I’m using Telnet to send my requests for the data. I have good reasons to believe this is possible, and I need to be able to scale up and automate. Requirements: the remote device requires that commands end only in CR. My understanding of the problem: I assume the extra LF is causing the device to fail to properly read my commands. More specifically, I think the LF is left over from each command, and added to the beginning of the next command. I infer this because the very first time I issue a command to the remote device after resetting the device, I actually get the correct response. All subsequent responses, however, indicate the device did not understand the command. Details: if I launch Telnet, and set it to return hex values (set netdata, plus set prettydump to make it easier to read), I can see that the lines end in CR (hex=0d) and LF (hex=0a) even though asked Telnet to end the lines in only CR plus NULL. I.e., I expected the last character to be 00, not 0a. See snippet below (host and port replaced with "x"). FYI: "QD" is my command, which asks the device to report the current date, and "BADD" is the device's response when it doesn't understand a command. $ telnet telnet> toggle crlf Will send carriage returns as telnet . telnet> toggle crlf Will send carriage returns as telnet . telnet> set netdata Will print hexadecimal representation of network traffic. telnet> set prettydump Will print user readable output for "netdata". telnet> open x.x.x.x xxxx Trying x.x.x.x xxxx... Connected to x.x.x.x. Escape character is '^]'. QD > 0x0 51 44 0d 0a < 0x0 42 41 44 44 0d 0a BADD Platforms I have tested: Ubuntu 18.04.1 using Telnet, inetutils-telnet, and PuTTY; Windows 7 using Cygwin, PuTTY, and TeraTerm; Windows 10 using PuTTY. Similar post: https://unix.stackexchange.com/questions/331109/any-way-to-send-just-n-in-telnet – the question in this other post, however, was the reverse: the line endings needed to be LF only. Summary of question: how do I get Telnet to send only CR at the ends of lines?
nuthatch (21 rep)
Jun 20, 2019, 10:04 PM • Last activity: Jun 25, 2019, 05:30 PM
0 votes
2 answers
672 views
What is best approach for setting up internet gateway from orange pi running Raspbian
I have cheap IoT device from Orangepi running raspbian server with wlan0 and ppp0 interfaces. wlan0 will be connected to access point in the local network. the ppp0 interface will be connected to GSM network through /dev/modem0 and provide internet access for the device. 1. want orangePi to be able...
I have cheap IoT device from Orangepi running raspbian server with wlan0 and ppp0 interfaces. wlan0 will be connected to access point in the local network. the ppp0 interface will be connected to GSM network through /dev/modem0 and provide internet access for the device. 1. want orangePi to be able to connect internet itself through ppp0 2. want all devices in the local network that will be connected to router/access point be able to connect to the internet through IoT ppp0 interface 3. also want to be able to setup port forwarding from ppp0 interface to some devices in the local network What will be the best approach to do it and how to configure IoT Linux box?
gio (19 rep)
Jun 15, 2018, 08:09 AM • Last activity: Nov 1, 2018, 05:03 PM
0 votes
1 answers
55 views
Is it possible to replace a debian ttyx console window with a graphical application?
On debian, how can I replace a ttyx console window with a graphical application? I am running debian 9.3(Stretch); it does not come with a graphical desktop as it's more of an Internet of Things version of debian. It comes with 6 ttyx consoles and I want to know whether or not one of these can be re...
On debian, how can I replace a ttyx console window with a graphical application? I am running debian 9.3(Stretch); it does not come with a graphical desktop as it's more of an Internet of Things version of debian. It comes with 6 ttyx consoles and I want to know whether or not one of these can be replaced with a graphical application. The reason I am trying to figure this out is to view network diagnostics for my server in real-time(I already made the graphical application). My application uses x windows as a graphical subsystem and my IoT server does have a graphical head.
shadowstalker75 (13 rep)
Jun 30, 2018, 02:12 PM • Last activity: Jun 30, 2018, 05:24 PM
0 votes
1 answers
1993 views
Crontab with sudo not working on Debian BeagleBone Black
On my Beaglebone Black device, I want to run python code at startup which is shared here https://github.com/acseckin/hmrid. The python code requires super user privileges. The Debian version I used on the device was installed with the image "Debian 8.7 2017-03-19 4GB SD IOT". The code works fine fro...
On my Beaglebone Black device, I want to run python code at startup which is shared here https://github.com/acseckin/hmrid . The python code requires super user privileges. The Debian version I used on the device was installed with the image "Debian 8.7 2017-03-19 4GB SD IOT". The code works fine from the terminal. > sudo python /home/debian/hmrid/runhmrid.py Debian users and roots crontab does not work when I append the following line. > @reboot sudo python /home/debian/hmrid/runhmrid.py But other code that does not require a super user is working perfectly when I add a crontab for a Debian user like > @reboot python /home/debian/hmrid/runNotSuperUser.py
acs (125 rep)
Jun 28, 2017, 06:34 PM • Last activity: Oct 17, 2017, 06:25 PM
0 votes
0 answers
707 views
Why ad-hoc network devices do not see each other?
I have 3 devices. On one tetwork one device can see another, yet they both can not see the third one. They are in same wi-fi ad-hoc network. 2 of them see each other and one does not see no one. Devices are in cl.ose proximity (10cm). How to figure out why? For one That does not play with others: ==...
I have 3 devices. On one tetwork one device can see another, yet they both can not see the third one. They are in same wi-fi ad-hoc network. 2 of them see each other and one does not see no one. Devices are in cl.ose proximity (10cm). How to figure out why? For one That does not play with others: ==== Here is ifconfig: root@edison:~# ifconfig wlan0 wlan0 Link encap:Ethernet HWaddr 78:4b:87:a9:87:53 inet addr:192.168.2.50 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::7a4b:87ff:fea9:8753/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1528 Metric:1 RX packets:1342297 errors:0 dropped:852312 overruns:0 frame:0 TX packets:158162 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:80024954 (76.3 MiB) TX bytes:10973582 (10.4 MiB) Here is iwconfig: root@edison:~# iwconfig wlan0 wlan0 IEEE 802.11abgn ESSID:"pi-ad-hoc" Mode:Ad-Hoc Frequency:2.427 GHz Cell: 3A:41:3D:F5:20:A2 Tx-Power=31 dBm Retry long limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:on Here is iwlist scan (strangly it shows **more then one network** with same name): Cell 01 - Address: 3A:41:3D:F5:20:A2 Channel:4 Frequency:2.427 GHz (Channel 4) Quality=70/70 Signal level=-4 dBm Encryption key:off ESSID:"pi-ad-hoc" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s Mode:Ad-Hoc Extra:tsf=0000002153a8a359 Extra: Last beacon: 90ms ago IE: Unknown: 000970692D61642D686F63 IE: Unknown: 010882848B962430486C IE: Unknown: 030104 ... Cell 06 - Address: 2E:5D:62:E8:17:46 Channel:4 Frequency:2.427 GHz (Channel 4) Quality=70/70 Signal level=0 dBm Encryption key:off ESSID:"pi-ad-hoc" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s Mode:Ad-Hoc Extra:tsf=00000021521e98ce Extra: Last beacon: 25920ms ago IE: Unknown: 000970692D61642D686F63 IE: Unknown: 010882848B962430486C IE: Unknown: 030104 ... Cell 08 - Address: 0A:27:49:3D:49:E9 Channel:4 Frequency:2.427 GHz (Channel 4) Quality=70/70 Signal level=0 dBm Encryption key:off ESSID:"pi-ad-hoc" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s Mode:Ad-Hoc Extra:tsf=0000002153313756 Extra: Last beacon: 7920ms ago IE: Unknown: 000970692D61642D686F63 IE: Unknown: 010882848B962430486C IE: Unknown: 030104 ... Cell 09 - Address: E2:32:E6:6A:CC:A9 Channel:4 Frequency:2.427 GHz (Channel 4) Quality=70/70 Signal level=0 dBm Encryption key:off ESSID:"pi-ad-hoc" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s Mode:Ad-Hoc Extra:tsf=0000002153a96297 Extra: Last beacon: 40ms ago IE: Unknown: 000970692D61642D686F63 Here is ping: root@edison:~# ping 192.168.2.2 PING 192.168.2.2 (192.168.2.2): 56 data bytes ^C --- 192.168.2.2 ping statistics --- 8 packets transmitted, 0 packets received, 100% packet loss root@edison:~# ping 192.168.2.1 PING 192.168.2.1 (192.168.2.1): 56 data bytes ^C --- 192.168.2.1 ping statistics --- 7 packets transmitted, 0 packets received, 100% packet loss root@edison:~# And here for the one of that do work: ==== ping: pi@pi3-2:~ $ ping 192.168.2.1 PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data. 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=8.13 ms 64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=6.99 ms 64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=7.80 ms 64 bytes from 192.168.2.1: icmp_seq=4 ttl=64 time=7.39 ms ^C --- 192.168.2.1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 6.998/7.584/8.138/0.441 ms pi@pi3-2:~ $ ping 192.168.2.50 PING 192.168.2.50 (192.168.2.50) 56(84) bytes of data. ^C --- 192.168.2.50 ping statistics --- 9 packets transmitted, 0 received, 100% packet loss, time 7999ms ifconfig: pi@pi3-2:~ $ ifconfig wlan0 wlan0 Link encap:Ethernet HWaddr b8:27:eb:67:07:fc inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::ac7f:b393:aac1:78bf/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1528 Metric:1 RX packets:1287637 errors:0 dropped:158601 overruns:0 frame:0 TX packets:487835 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:91775299 (87.5 MiB) TX bytes:46478896 (44.3 MiB) iwconfig pi@pi3-2:~ $ iwconfig wlan0 IEEE 802.11bgn ESSID:"pi-ad-hoc" Mode:Ad-Hoc Frequency:2.427 GHz Cell: 3A:41:3D:F5:20:A2 Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on iwlist wlan0 scan pi@pi3-2:~ $ iwlist wlan0 scan wlan0 Scan completed : Cell 01 - Address: 3A:41:3D:F5:20:A2 Channel:4 Frequency:2.427 GHz (Channel 4) Quality=70/70 Signal level=-35 dBm Encryption key:off ESSID:"pi-ad-hoc" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s Mode:Ad-Hoc Extra:tsf=0000000000000000 Extra: Last beacon: 154751220ms ago IE: Unknown: 000970692D61642D686F63 IE: Unknown: 010882848B960C121824 IE: Unknown: 030104 IE: Unknown: 06020000 IE: Unknown: 32043048606C IE: Unknown: DD070050F202000100 IE: Unknown: 010882848B962430486C IE: Unknown: 2A0100 IE: Unknown: 32040C121860 IE: Unknown: 2D1A21001FFF00000000000000000000000000000000000000000000 IE: Unknown: 3D1604001300000000000000000000000000000000000000 IE: Unknown: DD09001018020010000000
DuckQueen (105 rep)
Nov 30, 2016, 09:52 AM • Last activity: Dec 3, 2016, 10:22 AM
1 votes
2 answers
240 views
What do you use when you can't use Bash?
I am trying to make a shell script that runs on a widest variety of *nix systems. So, if I wrote a bash script backwards compatible with old versions of the shell, but what if bash wasn't on the system? For example, is there another commonly used shell for embedded hardware? Or what did we use befor...
I am trying to make a shell script that runs on a widest variety of *nix systems. So, if I wrote a bash script backwards compatible with old versions of the shell, but what if bash wasn't on the system? For example, is there another commonly used shell for embedded hardware? Or what did we use before bash was cool? I'd like a simple script that helps me automate a wide verity of *nix systems, both old and new. More and more *nix systems are lumped into the "Internet of Things", and I want to write some highly-compatible home-brew scripts that can also work with these devices. (Which is why I started with Bash.)
HulkBash (13 rep)
Feb 10, 2016, 03:36 PM • Last activity: Sep 25, 2016, 12:32 AM
2 votes
0 answers
2107 views
How to test shellshock against remote machine using a simple script
I am interested in testing for shellshock vulnerable machines that I don't have shell access to on my LAN's and WAN's such as IPMI cards and Internet of Things devices. What is the best way to remotely verify the vulnerability on machines? Does anybody have a simple shell script that can be run? I w...
I am interested in testing for shellshock vulnerable machines that I don't have shell access to on my LAN's and WAN's such as IPMI cards and Internet of Things devices. What is the best way to remotely verify the vulnerability on machines? Does anybody have a simple shell script that can be run? I want to avoid using any websites that do this test as they may actually take advantage of the information gained by running the tests on vulnerable machines.
Timothy C. Quinn (519 rep)
Sep 25, 2014, 06:25 PM • Last activity: Sep 25, 2016, 12:31 AM
Showing page 1 of 20 total questions