Questions tagged [openwrt]

OpenWRT is a Linux-based firmware program for embedded devices such as residential gateways and routers. It is very modular and feature-rich, but not all chipsets are supported.

966 questions
-2
votes
1 answer

segfault : how to know in which line code or function that caused this segfault

when execute my program in openwrt device, I get this message : prog[876]: segfault at 3000747a0 ip 08052d3f sp bfca6a0c error 4 prog[8048000+f000] my purpose is to know in which line code or function that caused this segfault it is possible to…
Anis_Stack
  • 3,306
  • 4
  • 30
  • 53
-3
votes
2 answers

How to modify the uptime command on shell?

When I type in uptime in terminal it gives me something like this 16:44:17 up 7:50, load average: 0.31, 0.47, 0.54 I want to make it to be something like this Uptime: 7h 50m Load average: 0.31, 0.47, 0.54 and save it to uptime.txt How can I do…
Squidward
  • 131
  • 3
  • 14
-3
votes
3 answers

How to move and rename a file with random characters in shell?

I have this file: /root/.aria2/aria2.txt and I want to move it to: /var/spool/sms/outgoing/aria2_XXXXX Note that XXXXX are random characters. How do I do that using only the facilities exposed by the openwrt (a GNU/Linux distribution for…
Squidward
  • 131
  • 3
  • 14
-3
votes
2 answers

get MAC address from IP address in LAN network with router installed Openwrt

I need to detect MAC address of devices connecting to my router (running Openwrt). The idea is when a client connects to my router wirelessly, I can get its IP address (my router runs a simple C webserver). I want to get the MAC address of the…
Trung Tran
  • 231
  • 1
  • 3
  • 11
-4
votes
3 answers

How to generate random numbers under OpenWRT?

With a "normal" (i mean "full") linux distro, it works just fine: sleep $(echo "$[ ($RANDOM % 9 ) ]") ok, it waits for about 0-9 sec but under OpenWRT [not using bash, rather "ash"]: $ sleep $(echo "$[ ($RANDOM % 9 ) ]") sleep: invalid number…
LanceBaynes
  • 1,393
  • 6
  • 16
  • 23
-4
votes
2 answers

catch Ctrl+C in C program

I use the following code to catch Ctrl+C in my C program Code void sig_handler(int signo) { if (signo == SIGINT) exit(EXIT_SUCCESS); } void main () { ...... if(signal(SIGINT, sig_handler)== SIG_ERR) { …
Anis_Stack
  • 3,306
  • 4
  • 30
  • 53
1 2 3
64
65