Limiting Daily bandwidth with daloradius - Raspberry Pi Q&A, Help & Troubleshooting

I have installed freeradius, daloradius , Coovachilli , & hostapd on a Raspberry Pi 3 model b using this script :
Kupiki-Hotspot-Script
The Raspberry has Raspbian OS which is Debian 9 based linux ....
The question now , can i limit daily bandwidth for every user by 650Mbs per day & once the user reaches his limit becomes disconnected & cant login until next day ??

Related

gprs/3G data connection usage time counter app

is there an application that count the usage time of gprs/3G data connection?
spb wireless monitor count the traffic size but not the time...tnx
for example:
I have 100h for month (€20) in session of 15 minutes = 400 session of 15 min. for month rounded in 15min next.
sidvizioso said:
for example:
I have 100h for month (€20) in session of 15 minutes = 400 session of 15 min. for month rounded in 15min next.
Click to expand...
Click to collapse
I can't think of any app that would suit. Most data plans for phones are now volume based. Even if there is an app that could measure your session times it would be unlikely that it would know to round up to 15 minutes.
Can you get this information from your telco? I can access my usage through my telco's webpage for free (it's normally up-to-date to within 6hrs).
the sessions are not very important for me, but i need only a connection time counting... like Homescreen++, but hs++ i must use it to see the time of connection, and i want a simple app to calcuate this time
nothing ?
Well, in Jack's ROM I use, if I'm connected to internet, simple touch of the upper bar will open a window called <Notifications> where I can see the time count from the actual session only. Maybe will help you. Ciao.
LE: see att!
useful but i don't want flash a rom... however tnx for this advise
quetzalquatl said:
Well, in Jack's ROM I use, if I'm connected to internet, simple touch of the upper bar will open a window called <Notifications> where I can see the time count from the actual session only. Maybe will help you. Ciao.
LE: see att!
Click to expand...
Click to collapse
seems a today plugin.. is there the single cab or only the rom?
i use spb wireless monitor 3
I can't believe there is still NO product in the android market that can deal with this!?
I have the exact same need as the thread starter - my provider bills me by TIME, not per data volume. So whether I am downloading or sitting idle, if I"m connected, I'm paying by the minute. I NEED to track the minutes I'm connected.
Do you mean to tell me there is NO application that will simply count down from a pre-defined quota value while I am connected and stop when I'm not?
3G Watchdog would be PERFECT for my needs but only tracks MB not Minutes Online. I have searched high and low but cannot find ANYTHING.
Could ANYONE please help?

[Q] Tethering + Bittorrent Help

I couldnt find anything through search so hopefully someone has the knowledge I need so badly .
I am tethering my Droid 1 to ubuntu 10.04 and when I start my Deluge(torrent client) everything works fine and speeds are great and around 800k/bs+. This runs solid for about two minutes and or 250mb d/l then my phone stops tethering. My phone doesn't drop WIFI the tethering just stops. I have to unplug the phone from the computer, close tethering, close wifi wait about 2 mins then start the wifi again and plug back into the computer for everything to work normal again.
I assume my droid needs to have max connections lowered or raised but I have no clue how to do this. Please help.
All specs
Phone: Droid 1
ROM: Cyan 7.0.3
Tethering app: "Wired Tether" & normal tether
OS: Ubuntu 10.04
of course using USB to connect phone to Tower (i have tired different cords)
This seems to happen once I have accumulated 250mb+ down. up is around 150mb
Please help
I've tried this on windows as well my phone will just stop teathering if I have large amounts of traffic anyone know to fix this?
Is this problem just with large amounts of data transfered via torrents or even via other means of file transfer (ftp/http/whatev)
just with torrents
torrents agressively open (and don't close) a lot of tcp connections and the phone acting like a router has to store all those connections. in the end it probably halts some software in your phone.
try lowering total number of allowed connections in your torrent client to one third of your current value, test, come back with a result.
MuF123 said:
torrents agressively open (and don't close) a lot of tcp connections and the phone acting like a router has to store all those connections. in the end it probably halts some software in your phone.
try lowering total number of allowed connections in your torrent client to one third of your current value, test, come back with a result.
Click to expand...
Click to collapse
So far so good, im past the 250mb down. Well listing to Pandora and active torrents open. Max connections where at 200 I lowered to 60. Thank you, everything seems to be working super good.
Do you know of a way (if even possible) to dump the connections my phone has stored without restarting wifi?
Don't really know, I've had this problem with my "router" (linux box) and it could be set to drop unclosed connetions withing shorter timeout. However I don't think this can be set on a phone so you will have to live with smaller number of connections

[Q] Increase max connected users on Wi-fi hotspot (2.3.4)

Its possible to increase the max number of connected users on my 3G?
Rooted LG Optimus 2x / 2.3.4 (topogigi 1.4)
If you have a laptop/computer with Windows 7 on it, you can potentially have unlimited (not tested, this is in theory ). I'm not sure how many can directly connect to the phone, but you could use Connectify (http://www.connectify.me/) to turn your computer into a wifi hotspot, then share your phone's internet to your computer via USB.
Not 100% sure this would work though and it's a bit of a pain
Meltus said:
If you have a laptop/computer with Windows 7 on it, you can potentially have unlimited (not tested, this is in theory ). I'm not sure how many can directly connect to the phone, but you could use Connectify (http://www.connectify.me/) to turn your computer into a wifi hotspot, then share your phone's internet to your computer via USB.
Not 100% sure this would work though and it's a bit of a pain
Click to expand...
Click to collapse
Thanks for the aswer, but i want to use just my android device to stream up to 8 devices.
I think that is possible making some changes on services, i just dont know what exactly.
It would be nice .. share to all people at office / home.
My friend always put his Optimus One on charger at his office & turn on tethering all day so all his office mate can surf the net ..
To get this working you have to change the Driver, but the Access Point Function is build in Userspace Drivers so very very hard to made it possible.
But I have a look at it, maybe we could patch it ;-)
Change Custom ROM
I will suggest you to change the custom ROM of your Device. This would be best option. Just because the latest builts of ROM is not having limited users feature

[Q] Connection-Type Problem

Hi.
I started programming android app´s a couple of month ago using Android Studio. That´s why I do not know all the correct programming notation´s and just want to describe what I planning to do. Hopefully someone can give me a hint of how I should proceed.
I want to create an application witch connects a large number of “child”- devices (about 30) with one “parent” - device. In other word´s only the parent device is connected to all the others and there should be no connection between the “child” - devices.
The connection should be able to transfer simple clicks e.g. on the child-device-12 buttonA was clicked should be displayed on the parent-device screen. Furthermore the parent-device should be able to receive and store small text messages from all child-devices.
The problem I have is that i´m not sure which kind of connection I should use.
I know there is the…
… the Bluetooth connection which I can´t use because it is not possible to connect more than two devices.
… the P2P connection which is also not possible because of the same reason.
… the NFC connection which I also can´t use because of it´s short range.
… the wifi connection witch might be possible because all the approximately 31 devices will be in the same area at the moment of using the application.
… and the server/client connection witch also might be possible.
Right now I imagine something like a chat or gaming room which is hosted by the parent-device for a specified number of child-connection. In order to enter the room the parent device generates a key every time a new room is created. That key is given to all the child-device user´s so that they can enter the room.
Okay, I hope someone can help me find the best connectivity solution.
Greetings, Alex!

Usb Tethering does now work under Linux?

Hello
Does someone succed to use usb thetering under linux (ubuntu 16.04 for exemple)?
It does not work for me.
Here is what happen:
I plug the phone ==> it's ok ubuntu see him.
If i chose file explorer ==> it works, i could access to the sd or the system without any problem so phone is well discoverd.
Then i anable usb thetering on the settings ==> phone stop charging, nothing happen, i could not chose usb thetering on the desktop.
It's ok with G5 or nexus 4 under android 7.X but there it does not work.
I see nothing on dmesg and lsusb, phone is already there, but it just doest not work.
Does anybody have succed to make it worked?
I know that wifi thetering works, but that's not the question here.
Yes it does!
Hi Burn02,
I had the same problem. In the end the solution was quite simple.
I am running Ubuntu 17.10
Use or favorite editor to edit /etc/network/interfaces
sudo editor /etc/network/interfaces
and add the following line
allow-hotplug usb0
then restart your computer or restart the network-manager.service
sudo systemctl restart network-manager.service
That did the trick for me.
Burn02 said:
Hello
Does someone succed to use usb thetering under linux (ubuntu 16.04 for exemple)?
It does not work for me.
Here is what happen:
I plug the phone ==> it's ok ubuntu see him.
If i chose file explorer ==> it works, i could access to the sd or the system without any problem so phone is well discoverd.
Then i anable usb thetering on the settings ==> phone stop charging, nothing happen, i could not chose usb thetering on the desktop.
It's ok with G5 or nexus 4 under android 7.X but there it does not work.
I see nothing on dmesg and lsusb, phone is already there, but it just doest not work.
Does anybody have succed to make it worked?
I know that wifi thetering works, but that's not the question here.
Click to expand...
Click to collapse
Robbie12345 said:
Hi Burn02,
I had the same problem. In the end the solution was quite simple.
I am running Ubuntu 17.10
Use or favorite editor to edit /etc/network/interfaces
sudo editor /etc/network/interfaces
and add the following line
allow-hotplug usb0
then restart your computer or restart the network-manager.service
sudo systemctl restart network-manager.service
That did the trick for me.
Click to expand...
Click to collapse
I will try!
THank's a lot.
Just tested my xz1c with my Ubuntu 16.04 LTS laptop, USB tethering just work without changing anything of my Ubuntu
ykkhern said:
Just tested my xz1c with my Ubuntu 16.04 LTS laptop, USB tethering just work without changing anything of my Ubuntu
Click to expand...
Click to collapse
Can you do a speed test while usb-tethering? Are you getting your full download speed? On mine I can only get < 1Mbps download, but 50Mbps upload. Downloads are full of RX errors and packet re-transmissions.
adibadi said:
Can you do a speed test while usb-tethering? Are you getting your full download speed? On mine I can only get < 1Mbps download, but 50Mbps upload. Downloads are full of RX errors and packet re-transmissions.
Click to expand...
Click to collapse
The 4G signal in my area is pretty bad, it usually fluctuates in between 1 ~ 3 bars. The speed test result for Download was around 0.7 ~ 0.8 Mbps; however, the result on the phone without enabling USB Tethering was around 6 ~ 7 Mbps.
I think you're not alone. I do understand that some telco do impose restrictions on the usage of USB Tethering, could the slow download speed be due to such restriction?
ykkhern said:
The 4G signal in my area is pretty bad, it usually fluctuates in between 1 ~ 3 bars. The speed test result for Download was around 0.7 ~ 0.8 Mbps; however, the result on the phone without enabling USB Tethering was around 6 ~ 7 Mbps.
I think you're not alone. I do understand that some telco do impose restrictions on the usage of USB Tethering, could the slow download speed be due to such restriction?
Click to expand...
Click to collapse
Thanks for testing that. In my case it's not from the telco, in Windows i get full speed. They also confirmed that they don't throttle. I am pretty sure it's the same bug that hit the OnePlus5 phone, which was fixed with a software update. They had the exact same behavior, <1mbps download, RX frame errors in the ifconfig output.
Unfortunately i can't open a support ticket with Sony because my support so just crashes. I will keep trying.
adibadi said:
Can you do a speed test while usb-tethering? Are you getting your full download speed? On mine I can only get < 1Mbps download, but 50Mbps upload. Downloads are full of RX errors and packet re-transmissions.
Click to expand...
Click to collapse
I have got exactly the same pb!Now it works without doing anything now, but in usb tethering, i have got a poor 1mbit/s max in download, and more then 16Mbit/s in upload.
It seems to be a little better in wifi, but not has it should be in 4g. From the smartphone i get more then that.
Did you have news from the support?
I tried to open a support ticket with a sony online chat agent, i don't know if i will hear anything back.
I think it could also be Linux related because it does work well in Windows. Somehow the rndis driver doesn't recognize the phone properly, but i don't know where i would be able to start the discussion for this, in which Linux component mailing list. ModemManager? Kernel? I've lost already a lot of time trying to do some debugging but now I'm kinda stuck.
It would be good to test with a more recent distribution then the 16.04 to see if it's better or other distribution.
But if the problem is the same that one Plus and has been solved by one plus, i doupt that we could do something...
In fhat, it's better then before, has at the moment that i have post the message, thetering whas no even working... So i don t know if it's sony that correct things or linux's community that add support for the XZ1c but it has evolved.
I will try to ask to sony too in order to repport that it's not "one case".
I have got nothing interesting from the support. :/
Just a link to http://android.com/tether ...
After comparing with my old Z5 compact, I can say that on the Linux side, not much is different. The logs generated by the two phones when they are plugged in and USB Tethering is enabled are identical. Also, the lsusb -v output is nearly identical.
The only difference is that the Z5 compact is fast and has no rx frame errors, the XZ1 compact is slow and has many rx frame errors.
adb logcat does show many errors on the ZX1c but I don't know if they are related.
Code:
E NetlinkSocket: Error in NetlinkSocket.sendOneShotKernelMessage, errmsg=NetlinkErrorMessage{ nlmsghdr{StructNlMsgHdr{ nlmsg_len{100}, nlmsg_type{2(NLMSG_ERROR)}, nlmsg_flags{0())}, nlmsg_seq{1}, nlmsg_pid{-307406705} }}, nlmsgerr{StructNlMsgErr{ error{-2}, msg{StructNlMsgHdr{ nlmsg_len{80}, nlmsg_type{256(unknown RTM type: 256)}, nlmsg_flags{261(NLM_F_REQUEST|NLM_F_ACK|NLM_F_ROOT))}, nlmsg_seq{1}, nlmsg_pid{0} }} }} }
E Tethering: [OffloadController] ERROR Error updating NAT conntrack entry: android.system.ErrnoException: NetlinkErrorMessage{ nlmsghdr{StructNlMsgHdr{ nlmsg_len{100}, nlmsg_type{2(NLMSG_ERROR)}, nlmsg_flags{0())}, nlmsg_seq{1}, nlmsg_pid{-307406705} }}, nlmsgerr{StructNlMsgErr{ error{-2}, msg{StructNlMsgHdr{ nlmsg_len{80}, nlmsg_type{256(unknown RTM type: 256)}, nlmsg_flags{261(NLM_F_REQUEST|NLM_F_ACK|NLM_F_ROOT))}, nlmsg_seq{1}, nlmsg_pid{0} }} }} } failed: ENOENT (No such file or directory), msg: 5000000000010501010000000000000002000000340001801400018008000100AC1CC26D080002000A2A92211C00028005000100060000000600020021E8000006000300CCA200000800070000069780
Burn02 said:
It would be good to test with a more recent distribution then the 16.04 to see if it's better or other distribution.
But if the problem is the same that one Plus and has been solved by one plus, i doupt that we could do something...
Click to expand...
Click to collapse
I just tested with the latest arch linux live usb stick, kernel version 4.14.9. It is still slow and ifconfig output is still full of rx errors. I'm afraid there is little hope of the issue resolving itself with a future OS update. The problem needs to be raised to someone who understands the issue better. I wish we could get some feedback from Sony about this. I guess their linux USB tethering users make up a very small part of their userbase, so we are not so important to them
THank's.
I have got an other answer from the support, they say that they will githe information to the correct service.
I am not sure that will be the case, but from this contact i could do nothing more...
PErhaps we should post on the sony talk forum?
Burn02 said:
THank's.
I have got an other answer from the support, they say that they will githe information to the correct service.
I am not sure that will be the case, but from this contact i could do nothing more...
PErhaps we should post on the sony talk forum?
Click to expand...
Click to collapse
I have already posted on sony talk forum, but it's not really helping. Maybe if you add your experience to it, it'll show them that more people are having this issue.
https://talk.sonymobile.com/t5/Xperia-XZ1-Compact/USB-Tethering-very-slow-on-Linux/m-p/1295537
No other news from the support about this problem. :/
I did not try again after the update of february but i doupt that something changed.
Hello.
No news about this problem?
Burn02 said:
Hello.
No news about this problem?
Click to expand...
Click to collapse
It's fixed!! I just decided to check, expecting the same old, but low and behold, the problem seems to be resolved!
build 47.1.A.12.119 fixes the issue.
$ ifconfig enp0s20f0u2
enp0s20f0u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
RX packets 248944 bytes 339403158 (323.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 142963 bytes 65752525 (62.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
THank's for the news!
Great to read that.
I can confirm that it's fixed
My build-number is:
47.A.12.145

Categories

Resources