python script for changing fusion line profile

Advanced feature discussion, beta programs and unsupported "Labs" features.
3 posts Page 1 of 1
by ryanca » Fri Mar 13, 2015 10:15 pm
This is unofficial, unsupported, and poorly tested. It will probably cause your modem to catch fire and I take no responsibility for this. I threw this together this evening, and share it because it may be useful to others. There is currently no error checking. The API I'm using is totally undocumented and could change at any time. I reserve the right to ignore any requests for help or complaints about it not working. Thank you for understanding.

So, the Sonic member portal has a feature that will let you change your line profile. This seems to take my service (upgraded to X2 this morning) down for about 90 seconds when I change a setting. Not sure if it works on non-X2 fusion.

https://gist.github.com/ryancdotorg/9f0 ... 8a66aa8823

What's it good for? Schedule (with cron) it to switch you to Annex M and Interleave before an automated upload (of backups perhaps) and back to Annex A when done. Schedule it to put you in Fastpath while you're likely to be at home for improved response times and Interleave when away for better transfer speeds.

Usage:

Print info about your connection:

Code: Select all

$ ./fusion-line.py show
Activate "fastpath" for lower ping times at the cost of slightly reduced upload & download speeds

Code: Select all

$ ./fusion-line.py fastpath
Activate "interleave" for slightly increased upload & download speeds at the cost of higher ping times (default)

Code: Select all

$ ./fusion-line.py interleave
Activate "Annex M" for increased upload speeds at the cost of decreased download speeds

Code: Select all

$ ./fusion-line.py upload
Activate "Annex A" for increased download speeds at the cost of decreased upload speeds (default)

Code: Select all

$ ./fusion-line.py download
by dane » Mon Mar 16, 2015 9:35 pm
Thanks for releasing this, it's nice to see folks building on what we offer.

One idea I've had is a tool which would look for a saturated or busy uplink, and after it was busy for 5-10 minutes, would push to Annex M. The downside would be the 60-90 seconds of a re-sync, but the perhaps during a big upload, backup, etc, you'd "shift into high gear", making upload the priority, in an automated way. Dunno if the re-sync downtime is worth the upside here, but it's a concept.
Dane Jasper
Sonic
by ryanca » Sat Mar 21, 2015 12:18 am
I was thinking about automatic profile switching, but given that the line takes 60-90 seconds to re-sync I worry about the routers on either end being down long enough that the ARP cache for the routers on either end expires and "ICMP destination host (or net) unreachable" messages start killing connections. Might be possible to address that with firmware tweaks.

A schedule feature would be nice though, as would a slightly more official API - even documenting the current one somewhere and promising not to change it without fair warning would be great :-)
3 posts Page 1 of 1