Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing modem settings from the command line

2 views
Skip to first unread message

Spiros Bousbouras

unread,
Jul 18, 2021, 12:43:49 PM7/18/21
to
I have a modem which requires a Javascript browser to change modem settings.
This has been an irritation for a while. I have finally managed to write a
little utility which allows me to turn on and off the 2.4 GHz wireless signal
from the command line and I'm making it available to the world with the hope
that others may also find it useful. Also another utility which captures all
the exchanges between a browser and a modem and stores them in a file ; this
latter utility allowed me to figure out how to write the former. Both are
written in C99 and tested on Linux. License is public domain. You can get
them at http://vlaho.ninja/prog/#modem-settings . The online README file
(also part of the download) has instructions and a lot more details.

--
There are always people who think that horror movies are just kind of one
half-step away from porno to begin with.
Stuart Gordon

Spiros Bousbouras

unread,
Jul 18, 2021, 1:19:01 PM7/18/21
to

William Unruh

unread,
Jul 18, 2021, 1:19:57 PM7/18/21
to
On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> I have a modem which requires a Javascript browser to change modem settings.

A modem? What modem? Modems differ. Commands to modems differ.

> This has been an irritation for a while. I have finally managed to write a
> little utility which allows me to turn on and off the 2.4 GHz wireless signal

Modem? Wireless signal?

Spiros Bousbouras

unread,
Jul 18, 2021, 1:30:57 PM7/18/21
to
On Sun, 18 Jul 2021 17:19:56 -0000 (UTC)
William Unruh <un...@invalid.ca> wrote:
> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> > I have a modem which requires a Javascript browser to change modem settings.
>
> A modem? What modem?

Netgear , Super Hub 2ac VMDG490 .

> Modems differ. Commands to modems differ.

Indeed. If you read the README file , your questions may be answered.

> > This has been an irritation for a while. I have finally managed to write a
> > little utility which allows me to turn on and off the 2.4 GHz wireless signal
>
> Modem? Wireless signal?

I don't understand the questions.

Spiros Bousbouras

unread,
Jul 18, 2021, 1:39:53 PM7/18/21
to
On Sun, 18 Jul 2021 17:43:47 +0200
Spiros Bousbouras wrote:
[...]

This is strange. Someone or something reposted my message with ID
<R+EiOUcg...@bongo-ra.co> right after I made it. The reposting changed
the From: line in the header. Anyone has any clue what's happening ?

William Unruh

unread,
Jul 18, 2021, 2:30:38 PM7/18/21
to
On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> On Sun, 18 Jul 2021 17:19:56 -0000 (UTC)
> William Unruh <un...@invalid.ca> wrote:
>> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
>> > I have a modem which requires a Javascript browser to change modem settings.
>>
>> A modem? What modem?
>
> Netgear , Super Hub 2ac VMDG490 .
>
>> Modems differ. Commands to modems differ.
>
> Indeed. If you read the README file , your questions may be answered.

And I should click on click-bait?

Spiros Bousbouras

unread,
Jul 18, 2021, 3:05:06 PM7/18/21
to
On Sun, 18 Jul 2021 18:30:37 -0000 (UTC)
William Unruh <un...@invalid.ca> wrote:
> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> > Indeed. If you read the README file , your questions may be answered.
>
> And I should click on click-bait?

My idea of clickbait is something which is intentionally provocative so
that people will get the irresistible compulsion to go to the link. I
don't believe this applies to what I posted. In any case , would you
consider it preferable if I posted the whole README here ? IMO it would
be poor form to post something kind of long. So my opening post gave
the general idea and if someone is interested , they can read the README
to get the details.

--
Is anyone besides me ready for a good pandemic!?
www.imdb.com/review/rw2735248

William Unruh

unread,
Jul 18, 2021, 4:17:49 PM7/18/21
to
On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> On Sun, 18 Jul 2021 18:30:37 -0000 (UTC)
> William Unruh <un...@invalid.ca> wrote:
>> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
>> > Indeed. If you read the README file , your questions may be answered.
>>
>> And I should click on click-bait?
>
> My idea of clickbait is something which is intentionally provocative so
> that people will get the irresistible compulsion to go to the link. I
> don't believe this applies to what I posted. In any case , would you
> consider it preferable if I posted the whole README here ? IMO it would
> be poor form to post something kind of long. So my opening post gave
> the general idea and if someone is interested , they can read the README
> to get the details.

Unfortunately you went to the other extreme-- made it so short and
unspecific that the reader had no idea what it was that you were talking
about. Wireless is a hub or router, not a modem, as your subsequent
response indicated. Modems (modulator-demodulator) are now 50 years old.
So while I admire your restraint at not posting all of the details, I
was complaining that you posted so so few that I certainly could not
figure out what you could be talking about. And it was so generic (while
what you refering to was very specific to your particular
hub/router/modem).
There are many aspects of clickbait, and one is to post something so
vague to a help group, that someone, wanting to help, or possibly use,
will click on your site. There are many kinds of bait.
Some might respond to a naked Woman's picture, others, on net help groups
might repond to a tool to help them connect to internet.
>

Spiros Bousbouras

unread,
Jul 18, 2021, 5:49:16 PM7/18/21
to
On Sun, 18 Jul 2021 20:17:48 -0000 (UTC)
William Unruh <un...@invalid.ca> wrote:
> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> > My idea of clickbait is something which is intentionally provocative so
> > that people will get the irresistible compulsion to go to the link. I
> > don't believe this applies to what I posted. In any case , would you
> > consider it preferable if I posted the whole README here ? IMO it would
> > be poor form to post something kind of long. So my opening post gave
> > the general idea and if someone is interested , they can read the README
> > to get the details.
>
> Unfortunately you went to the other extreme-- made it so short and
> unspecific that the reader had no idea what it was that you were talking
> about. Wireless is a hub or router, not a modem, as your subsequent
> response indicated. Modems (modulator-demodulator) are now 50 years old.

Ok , I admit I hadn't given much thought to the distinctions between a router
and a modem. I was thinking of a modem as something which connects the
computer to the internet and in that sense a router qualifies. Now I know
better.

> So while I admire your restraint at not posting all of the details, I
> was complaining that you posted so so few that I certainly could not
> figure out what you could be talking about. And it was so generic (while
> what you refering to was very specific to your particular
> hub/router/modem).

My opening post mentioned 2 utilities. One is specific to my router. The
other will store in a file the HTTP requests and responses between any router
and the browser and hopefully by studying those the user will learn how to
reproduce programmatically the requests which modify the settings as they want
them. Even the utility specific to my router is not that specialised because
the router was provided by Virginmedia which is one of the most popular U.K.
ISPs and I posted to uk* groups.

> There are many aspects of clickbait, and one is to post something so
> vague to a help group, that someone, wanting to help, or possibly use,
> will click on your site.

It was clear that I wasn't asking for help. And if someone wants to use my
code , they would have to go to my website anyway. On the other hand , someone
who has no use for my code , would not find the README interesting either.
But anyway , hopefully I've cleared things now.

> There are many kinds of bait.

--
- Do you read Sutter Cane ?
- Wh... what ?
- Do they speak English in "what" ?

Spiros Bousbouras

unread,
Jul 18, 2021, 6:10:14 PM7/18/21
to
On Sun, 18 Jul 2021 16:43:47 -0000 (UTC)
Spiros Bousbouras <spi...@gmail.com> wrote:
> You can get
> them at http://vlaho.ninja/prog/#modem-settings . The online README file
> (also part of the download) has instructions and a lot more details.

Based on the comments I have changed the link to
vlaho.ninja/prog/#router-settings .

Martin Gregorie

unread,
Jul 18, 2021, 6:36:48 PM7/18/21
to
On Sun, 18 Jul 2021 21:49:12 +0000, Spiros Bousbouras wrote:

> My opening post mentioned 2 utilities. One is specific to my router.
>
Understood.

> The other will store in a file the HTTP requests and responses between
> any router and the browser and hopefully by studying those the user will
> learn how to reproduce programmatically the requests which modify the
> settings as they want them. Even the utility specific to my router is
> not that specialised because the router was provided by Virginmedia
> which is one of the most popular U.K. ISPs and I posted to uk* groups.
>
What does this offer that Wireshark doesn't do? Apart, that is, from only
looking at HTTP and HTTPS traffic?

Wireshark is my current go-to tool whenever I need to understand network,
i.e. TCP/IP, traffic in any detail.


--
Martin | martin at
Gregorie | gregorie dot org

William Unruh

unread,
Jul 18, 2021, 7:16:21 PM7/18/21
to
On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> I have a modem which requires a Javascript browser to change modem settings.

A modem? What modem? Modems differ. Commands to modems differ.

> This has been an irritation for a while. I have finally managed to write a
> little utility which allows me to turn on and off the 2.4 GHz wireless signal

Modem? Wireless signal?

> from the command line and I'm making it available to the world with the hope
> that others may also find it useful. Also another utility which captures all
> the exchanges between a browser and a modem and stores them in a file ; this
> latter utility allowed me to figure out how to write the former. Both are
> written in C99 and tested on Linux. License is public domain. You can get

Spiros Bousbouras

unread,
Jul 18, 2021, 7:16:22 PM7/18/21
to
On Sun, 18 Jul 2021 18:30:37 -0000 (UTC)
William Unruh <un...@invalid.ca> wrote:
> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> > Indeed. If you read the README file , your questions may be answered.
>
> And I should click on click-bait?

My idea of clickbait is something which is intentionally provocative so
that people will get the irresistible compulsion to go to the link. I
don't believe this applies to what I posted. In any case , would you
consider it preferable if I posted the whole README here ? IMO it would
be poor form to post something kind of long. So my opening post gave
the general idea and if someone is interested , they can read the README
to get the details.

William Unruh

unread,
Jul 18, 2021, 7:16:22 PM7/18/21
to
On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> On Sun, 18 Jul 2021 17:19:56 -0000 (UTC)
> William Unruh <un...@invalid.ca> wrote:
>> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
>> > I have a modem which requires a Javascript browser to change modem settings.
>>
>> A modem? What modem?
>
> Netgear , Super Hub 2ac VMDG490 .
>
>> Modems differ. Commands to modems differ.
>

Spiros Bousbouras

unread,
Jul 18, 2021, 7:16:22 PM7/18/21
to
On Sun, 18 Jul 2021 17:19:56 -0000 (UTC)
William Unruh <un...@invalid.ca> wrote:
> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> > I have a modem which requires a Javascript browser to change modem settings.
>
> A modem? What modem?

Netgear , Super Hub 2ac VMDG490 .

> Modems differ. Commands to modems differ.

Indeed. If you read the README file , your questions may be answered.

> > This has been an irritation for a while. I have finally managed to write a
> > little utility which allows me to turn on and off the 2.4 GHz wireless signal
>
> Modem? Wireless signal?

William Unruh

unread,
Jul 18, 2021, 7:16:23 PM7/18/21
to
On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> On Sun, 18 Jul 2021 18:30:37 -0000 (UTC)
> William Unruh <un...@invalid.ca> wrote:
>> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
>> > Indeed. If you read the README file , your questions may be answered.
>>
>> And I should click on click-bait?
>
> My idea of clickbait is something which is intentionally provocative so
> that people will get the irresistible compulsion to go to the link. I
> don't believe this applies to what I posted. In any case , would you
> consider it preferable if I posted the whole README here ? IMO it would
> be poor form to post something kind of long. So my opening post gave
> the general idea and if someone is interested , they can read the README
> to get the details.

Unfortunately you went to the other extreme-- made it so short and
unspecific that the reader had no idea what it was that you were talking
about. Wireless is a hub or router, not a modem, as your subsequent
response indicated. Modems (modulator-demodulator) are now 50 years old.
So while I admire your restraint at not posting all of the details, I
was complaining that you posted so so few that I certainly could not
figure out what you could be talking about. And it was so generic (while
what you refering to was very specific to your particular
hub/router/modem).
There are many aspects of clickbait, and one is to post something so
vague to a help group, that someone, wanting to help, or possibly use,

Spiros Bousbouras

unread,
Jul 18, 2021, 7:16:23 PM7/18/21
to
On Sun, 18 Jul 2021 16:43:47 -0000 (UTC)
Spiros Bousbouras <spi...@gmail.com> wrote:
> You can get
> them at http://vlaho.ninja/prog/#modem-settings . The online README file
> (also part of the download) has instructions and a lot more details.

Spiros Bousbouras

unread,
Jul 18, 2021, 7:16:23 PM7/18/21
to
On Sun, 18 Jul 2021 20:17:48 -0000 (UTC)
William Unruh <un...@invalid.ca> wrote:
> On 2021-07-18, Spiros Bousbouras <spi...@gmail.com> wrote:
> > My idea of clickbait is something which is intentionally provocative so
> > that people will get the irresistible compulsion to go to the link. I
> > don't believe this applies to what I posted. In any case , would you
> > consider it preferable if I posted the whole README here ? IMO it would
> > be poor form to post something kind of long. So my opening post gave
> > the general idea and if someone is interested , they can read the README
> > to get the details.
>
> Unfortunately you went to the other extreme-- made it so short and
> unspecific that the reader had no idea what it was that you were talking
> about. Wireless is a hub or router, not a modem, as your subsequent
> response indicated. Modems (modulator-demodulator) are now 50 years old.

Ok , I admit I hadn't given much thought to the distinctions between a router
and a modem. I was thinking of a modem as something which connects the
computer to the internet and in that sense a router qualifies. Now I know
better.

> So while I admire your restraint at not posting all of the details, I
> was complaining that you posted so so few that I certainly could not
> figure out what you could be talking about. And it was so generic (while
> what you refering to was very specific to your particular
> hub/router/modem).

My opening post mentioned 2 utilities. One is specific to my router. The
other will store in a file the HTTP requests and responses between any router
and the browser and hopefully by studying those the user will learn how to
reproduce programmatically the requests which modify the settings as they want
them. Even the utility specific to my router is not that specialised because
the router was provided by Virginmedia which is one of the most popular U.K.
ISPs and I posted to uk* groups.

> There are many aspects of clickbait, and one is to post something so
> vague to a help group, that someone, wanting to help, or possibly use,
> will click on your site.

It was clear that I wasn't asking for help. And if someone wants to use my
code , they would have to go to my website anyway. On the other hand , someone
who has no use for my code , would not find the README interesting either.
But anyway , hopefully I've cleared things now.

> There are many kinds of bait.

Martin Gregorie

unread,
Jul 18, 2021, 7:16:24 PM7/18/21
to
On Sun, 18 Jul 2021 21:49:12 +0000, Spiros Bousbouras wrote:

> My opening post mentioned 2 utilities. One is specific to my router.
>
Understood.

> The other will store in a file the HTTP requests and responses between
> any router and the browser and hopefully by studying those the user will
> learn how to reproduce programmatically the requests which modify the
> settings as they want them. Even the utility specific to my router is
> not that specialised because the router was provided by Virginmedia
> which is one of the most popular U.K. ISPs and I posted to uk* groups.
>

Spiros Bousbouras

unread,
Jul 19, 2021, 5:17:11 AM7/19/21
to
On Sun, 18 Jul 2021 22:36:47 -0000
Martin Gregorie <mar...@mydomain.invalid> wrote:
> On Sun, 18 Jul 2021 21:49:12 +0000, Spiros Bousbouras wrote:
> > The other will store in a file the HTTP requests and responses between
> > any router and the browser and hopefully by studying those the user will
> > learn how to reproduce programmatically the requests which modify the
> > settings as they want them. Even the utility specific to my router is
> > not that specialised because the router was provided by Virginmedia
> > which is one of the most popular U.K. ISPs and I posted to uk* groups.
> >
> What does this offer that Wireshark doesn't do? Apart, that is, from only
> looking at HTTP and HTTPS traffic?

Possibly nothing. I don't remember if I had heard of wireshark before your
post. Before I wrote my code I was guessing that probably tools existed which
would provide the functionality I wanted but that they would be general
purpose and complicated. So , since I had never used such a tool , I figured
it would be simpler to build something small myself and add further
functionality as needed rather than start with something preexisting but big
and try to figure out how to make it do what I wanted.

In any case , how complicated would it be to do with wireshark the
following :

* Make it listen for connections on port 8080.

* Drop non local connections so that only the browser running on the same
computer can connect.

* Forward everything it gets to the router , then forward any replies from
the router back to the browser and continue like this back and forth until
terminated. With each side it must reproduce exactly what happened with the
other. So for example , if a router sends a response and then terminates the
connection then wireshark must forward the response to the browser and also
terminate the connection ; but if the router sent a response and did not
terminate the connection then wireshark must forward the response to the
browser and not close the connection. It must also store all the exchanges
in a file.

There were a couple of other things I thought that I might have needed to do
but in the end weren't necessary. Using my utility as an intermediary between
the browser and the router , the browser was adding the following 2 lines in
the header :

Host: localhost:8080
Referer: http://localhost:8080/

I was concerned that the router may modify its behaviour based on the
existence of those lines. If this had happened , my utility would have needed
to eliminate the Referer: line , change the Host: line so that it had
the address of the router and otherwise preserve the header and body as it
received them from the browser. Can wireshark do this ?

> Wireshark is my current go-to tool whenever I need to understand network,
> i.e. TCP/IP, traffic in any detail.

--
Am I *no one* ? Are you *no one* ? Because that's all we can ever have of each
other: an imitation, a Copy. All we can ever know about are the portraits of
each other inside our own skulls.
"A kidnapping" by Greg Egan

Spiros Bousbouras

unread,
Jul 19, 2021, 5:38:06 AM7/19/21
to
I see now that the same has happened with several other posts in the thread.
For example a post with (partial) header

From: William Unruh <un...@invalid.ca>
Newsgroups: uk.comp.misc,uk.comp.os.linux
Subject: Re: Changing modem settings from the command line
Date: Sun, 18 Jul 2021 17:19:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <sd1nrs$cb9$1...@dont-email.me>
References: <R+EiOUcg...@bongo-ra.co>

was reposted with header

From: William Unruh <Willia...@f1.n221.z2.fidonet.fi>
Newsgroups: uk.comp.os.linux
Subject: Re: Changing modem settings from the command line
Date: Sun, 18 Jul 2021 18:19:56 +0200
Organization: rbb soupgate
Message-ID: <7079...@f1.n221.z2.fidonet.fi>
References: <18089...@f0.n0.z0.fidonet.org>

There doesn't seem to be a post with ID <18089...@f0.n0.z0.fidonet.org> .

Or

From: Martin Gregorie <mar...@mydomain.invalid>
Newsgroups: uk.comp.misc,uk.comp.os.linux
Subject: Re: Changing modem settings from the command line
Date: Sun, 18 Jul 2021 22:36:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <sd2adv$dqa$1...@dont-email.me>
References: [... long list of references ...]

was reposted as

From: Martin Gregorie <Martin....@f1.n221.z2.fidonet.fi>
Newsgroups: uk.comp.os.linux
Subject: Re: Changing modem settings from the command line
Date: Sun, 18 Jul 2021 23:36:47 +0200
Organization: rbb soupgate
Message-ID: <1883...@f1.n221.z2.fidonet.fi>
References: <1153...@f0.n0.z0.fidonet.org>

Again , there's no post with ID <1153...@f0.n0.z0.fidonet.org> .

Curiouser and curiouser.

--
The devil lies in the quantifiers.

Spiros Bousbouras

unread,
Jul 19, 2021, 7:16:23 AM7/19/21
to
-email.me>

Martin Gregorie

unread,
Jul 19, 2021, 8:27:53 AM7/19/21
to
On Mon, 19 Jul 2021 09:17:10 +0000, Spiros Bousbouras wrote:

> In any case , how complicated would it be to do with wireshark the
> following :
>
Wireshark is simple enough to use. Basically you just point it at an
ethernet port and it logs what goes in and out, showing packet header
details and content as both text and hex. That's about all you need if
you're handling TCP/IP message streams using ASCII or Unicode character
encoding.

It automatically recognises a wide variety of packet types and uses this
info to make its logs more readable. It has filters to omit irrelevant
packets and also filter logged content as its displayed. It can display
EBCDIC, Ascii and Unicode text, i.e. if you're having to deal with X.25
or SNA data streams there's a good chance it can make these readable too.

https://www.wireshark.org

or just install it and see what it does. I think you'll find its a
standard package for most Linux distros, including Raspbian.

Andy Burns

unread,
Jul 19, 2021, 8:33:29 AM7/19/21
to
Spiros Bousbouras wrote:

> Spiros Bousbouras wrote:
>
>> This is strange. Someone or something reposted my message
>
> I see now that the same has happened with several other posts in the thread.

It's like the sorcerer's broom, we have 9 identical named threads now,
maybe stop replying to them?

Martin Gregorie

unread,
Jul 19, 2021, 8:55:46 AM7/19/21
to
It looks very much as if this is due to fidonet ingesting and then
regurgitating messages, possibly due to somebody fiddling with its
configuration and/or having more than one connection to the NNTP system
that aren't aware of each other.

T'would be nice if they put things back the way they were and stopped
messing about.

Spiros Bousbouras

unread,
Jul 19, 2021, 10:41:37 AM7/19/21
to
On Mon, 19 Jul 2021 13:33:25 +0100
I don't reply to fidonet.fi messages but I don't think it makes a difference.
My guess is that until they fix it , every post on uk.comp.os.linux will be
duplicated. We should look at the positive side : this group last had activity
in January this year. This way we get some posts even if there is repetition
involved !

Martin Gregorie

unread,
Jul 19, 2021, 1:16:03 PM7/19/21
to
ail.me> <8AOg+laAkVhUfU=x...@bongo-ra.co>

Andy Burns

unread,
Jul 19, 2021, 1:16:04 PM7/19/21
to

Martin Gregorie

unread,
Jul 19, 2021, 1:16:06 PM7/19/21
to
On Mon, 19 Jul 2021 13:33:25 +0100, Andy Burns wrote:

It looks very much as if this is due to fidonet ingesting and then
regurgitating messages, possibly due to somebody fiddling with its
configuration and/or having more than one connection to the NNTP system
that aren't aware of each other.

T'would be nice if they put things back the way they were and stopped
messing about.



0 new messages