Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Robert P. J. Day
On Tue, 19 Sep 2017, Richard Guy Briggs wrote:

> On 2017-09-19 13:19, rpj...@crashcourse.ca wrote:
> >
> >   friend just handed me a d-link DCS-936L network camera, and it
> > would seem that the normal use of these is via a tablet or
> > smartphone, but i would like to be able to use my fedora linux
> > laptop and pop up a browser window (i'm assuming) and view what
> > the camera is seeing in real time, and it's not clear how i would
> > do that (yet).
> >
> >   anyone done this? i want to use the camera *only* from within
> > the secure wi-fi network in the home -- no access from outside.
> > what's the recipe here?
>
> I'm quite familiar with the Ottawa-based Lumenera cameras, having
> written Linux firmware kernel imager drivers for them:
>   https://www.lumenera.com/products/surveillance/le375.html
>
> They are just a web page on the device configured by default with
> DHCP.  Image streaming is MJPEG wrapped in HTML.  Image streaming
> can be configured for RTSP/RTP.  They don't do IPv6.
>
> I recently bought a Hikvision camera that needed another driver
> supplied for Windows.  I was able to configure it via HTTP, except
> for live exposure view and setting up motion alarms and privacy
> masks which needed the plugin.  I was able to use RTSP to stream the
> live output of that camera using standard open source tools (such as
> VLC? or maybe mplayer?) but wasn't able to get RTSP working within a
> web browser for configuration.  This camera does IPv6.

  just to be clear about all of this, i know *squat* about setting up
one of these things, having never done it before, so let me describe
what i think is the end result, and people can point out where i am
going horribly wrong.

  given that this camera supports wi-fi, i had imagined that the end
result would be that it would eventually be configured as just another
device on my in-house network, having been assigned an IP address
either dynamically or statically, at which point i imagined i could
fire up either a browser, or some webcam app like "cheese", point at
that IP address, and view the live video stream from my linux laptop
(or from a windows or mac machine with the proper software as well).
make sense so far?

  now, this particular camera has no wired ethernet port (not
surprising), so it can't be connected to the in-house router for
initial configuration. it does come with an initial SSID and password,
so i assume that, to configure, one normally downloads d-link's
configuration app (https://www.mydlink.com/apps) and connects to the
camera's wi-fi network for that initial configuration, but there is no
obvious linux client to do that. therefore, i'm assuming that one
*needs* some mobile device (iPhone, android) for that initial
configuration. am i understanding this properly?

  in short, at least for this camera, i absolutely require an android
or iphone with the d-link app for the initial configuration, which is
kind of a pain, unless i have this completely wrong.

  am i at least understanding all this correctly?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday

___
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux


Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Richard Guy Briggs
On 2017-09-20 04:09, Robert P. J. Day wrote:
> On Tue, 19 Sep 2017, Richard Guy Briggs wrote:
> 
> > On 2017-09-19 13:19, rpj...@crashcourse.ca wrote:
> > >
> > >   friend just handed me a d-link DCS-936L network camera, and it
> > > would seem that the normal use of these is via a tablet or
> > > smartphone, but i would like to be able to use my fedora linux
> > > laptop and pop up a browser window (i'm assuming) and view what
> > > the camera is seeing in real time, and it's not clear how i would
> > > do that (yet).
> > >
> > >   anyone done this? i want to use the camera *only* from within
> > > the secure wi-fi network in the home -- no access from outside.
> > > what's the recipe here?
> >
> > I'm quite familiar with the Ottawa-based Lumenera cameras, having
> > written Linux firmware kernel imager drivers for them:
> > https://www.lumenera.com/products/surveillance/le375.html
> >
> > They are just a web page on the device configured by default with
> > DHCP.  Image streaming is MJPEG wrapped in HTML.  Image streaming
> > can be configured for RTSP/RTP.  They don't do IPv6.
> >
> > I recently bought a Hikvision camera that needed another driver
> > supplied for Windows.  I was able to configure it via HTTP, except
> > for live exposure view and setting up motion alarms and privacy
> > masks which needed the plugin.  I was able to use RTSP to stream the
> > live output of that camera using standard open source tools (such as
> > VLC? or maybe mplayer?) but wasn't able to get RTSP working within a
> > web browser for configuration.  This camera does IPv6.
> 
>   just to be clear about all of this, i know *squat* about setting up
> one of these things, having never done it before, so let me describe
> what i think is the end result, and people can point out where i am
> going horribly wrong.
> 
>   given that this camera supports wi-fi, i had imagined that the end
> result would be that it would eventually be configured as just another
> device on my in-house network, having been assigned an IP address
> either dynamically or statically, at which point i imagined i could
> fire up either a browser, or some webcam app like "cheese", point at
> that IP address, and view the live video stream from my linux laptop
> (or from a windows or mac machine with the proper software as well).
> make sense so far?
> 
>   now, this particular camera has no wired ethernet port (not
> surprising), so it can't be connected to the in-house router for
> initial configuration. it does come with an initial SSID and password,
> so i assume that, to configure, one normally downloads d-link's
> configuration app (https://www.mydlink.com/apps) and connects to the
> camera's wi-fi network for that initial configuration, but there is no
> obvious linux client to do that. therefore, i'm assuming that one
> *needs* some mobile device (iPhone, android) for that initial
> configuration. am i understanding this properly?

Can you just connect to it using wifi to that SSID and password as if it were
an AP and if you really need your laptop connected to the internet at the same
time, use wired ethernet.  Then use a browser to configure it?

Notice that hand-wave there in the last step?  Maybe it acts like those
annoying hotspots with security layer violations and then once you try *any*
DNS lookup with your browser, your web session gets redirected to the cam
network configuration page?

>   in short, at least for this camera, i absolutely require an android
> or iphone with the d-link app for the initial configuration, which is
> kind of a pain, unless i have this completely wrong.

This would surprise me and I'd take it back if that were the case, but it is
possible that there is no other way to configure it.

>   am i at least understanding all this correctly?

o_O

> rday

slainte mhath, RGB

--
Richard Guy Briggs   --  ~\-- ~\ 
 --  \___   o \@  @Ride yer bike!
Ottawa, ON, CANADA  --  Lo_>__M__\\/\%__\\/\%
Vote! -- _GTVS6#790__(*)__(*)(*)(*)_
___
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux


Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Alex Pilon
On Wed, Sep 20, 2017 at 08:19:15AM -0400, Richard Guy Briggs wrote:
> These wired network cameras default to DHCP and failing that fall back
> to either 192.168.122.1 (or something like that IIRC...) or use an
> IPv4 link local address (169.?) which pretends to be random
> with OUI or something like that to bootstrap.

@rgb: 169.254.0.0/16; see RFC 3927 or the Bonjour protocol

@rpjday: Run avahi-browse -alt if on the same layer 2 to detect the
device's advertised services.
___
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux


Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Richard Guy Briggs
On 2017-09-20 09:05, Robert P. J. Day wrote:
> On Wed, 20 Sep 2017, Richard Guy Briggs wrote:
> 
> > On 2017-09-20 07:17, Robert P. J. Day wrote:
> > > On Wed, 20 Sep 2017, Robert P. J. Day wrote:
> > > > On Wed, 20 Sep 2017, Richard Guy Briggs wrote:
> > > > > On 2017-09-20 04:09, Robert P. J. Day wrote:
> > > > > >   in short, at least for this camera, i absolutely require an
> > > > > > android or iphone with the d-link app for the initial
> > > > > > configuration, which is kind of a pain, unless i have this
> > > > > > completely wrong.
> > > > >
> > > > > This would surprise me and I'd take it back if that were the case,
> > > > > but it is possible that there is no other way to configure it.
> > > >
> > > >   given that you mentioned the lumenera cameras, how would those be
> > > > any different? i looked at one here:
> > > >
> > > > http://www.ebay.ca/itm/Lumenera-Le165CP-1-4-MP-Progressive-Scan-HAD-CCD-Network-Surveillance-Camera-/201696592058?hash=item2ef60dc0ba:g:tc8AAOSw8w1X4bCe
> > > >
> > > > and noticed right away the photo of the back, which shows an
> > > > ethernet port, so i'm assuming that would allow me to
> > > > (temporarily) connect to my in-house router and configure the
> > > > camera, at which point i would want to move it elsewhere and
> > > > access it via wi-fi -- is that how a camera like that would
> > > > work?
> >
> > These wired network cameras default to DHCP and failing that fall
> > back to either 192.168.122.1 (or something like that IIRC...) or use
> > an IPv4 link local address (169.?) which pretends to be
> > random with OUI or something like that to bootstrap.  It is harder
> > to expose a new device to a trusted open wifi network than to a
> > trusted wired network for initial bootstrapping.
> 
>   not being an expert on security cameras, i am now simply assuming
> the really inexpensive, small form factor units simply don't have the
> real estate to support an ethernet port, so have to resort to
> something else, as we are now discovering.

Well, it is a vector for moisture too, so wireless is attractive that way
too...  Consumer demand has been going more and more wireless anyways.

> > So, there's a bit of a chicken and egg problem here.  Most wifi networks
> > require authentication now (or should!).  If your camera doesn't have a 
> > wired
> > ethernet port that you can connect to a trusted network to do the initial
> > configuration, how do you do that bootstrapping?  It looks like they've 
> > turned
> > it around so that you authenticate to it first so it is acting as a server 
> > for
> > you to connect to it, then configure it to switch from AP mode to managed 
> > mode
> > whereupon it can now connect to your secured wifi network with credentials 
> > you
> > provide.
> 
>   that's the only scenario that makes sense at this point. upon
> further examination, i did notice a tiny "WPS" button on the back of
> the camera, which supports something called "zero configuration",
> which involves:

Yes, I've heard of WPS which I understand is full of security holes.

Bluetooth has similar issues.  Convenience trumps security...

> Step 1: Attach the power supply to the power input on the DCS-936L and
> connect it to a wall outlet or power strip. Power is confirmed when
> the Status LED is lit.
> 
> Step 2: Press and hold the WPS button on the camera for five seconds.
> The Status LED will start to blink green. Then, press the WPS button
> on your router within two minutes. Your router will automatically
> assign your network settings to your camera.
> 
> Step 3: From any computer, open a web browser, go to
> http://www.mydlink.com and log into your account. Once mydlink detects
> your camera, a New Device Found! notice will appear in the bottom
> right corner. Click on the camera from the New Devices list and then
> click Yes to add your camera. Your setup is complete.
> 
>   however, the user manual is adamant that this only works with a
> registered d-link cloud router and an active "mydlink" account, so it
> doesn't really solve the problem.

Ugh.  :-P

>   one suspects i should restrict my search to cameras that have an
> ethernet port for initial configuration.

The days of the Lumenera ethernet cameras are gone.  It is now commodity
hardware.

> rday
> 
> -- 
> 
> 
> Robert P. J. Day Ottawa, Ontario, CANADA
> http://crashcourse.ca
> 
> Twitter:   http://twitter.com/rpjday
> LinkedIn:   http://ca.linkedin.com/in/rpjday
> 

slainte mhath, RGB

--
Richard Guy Briggs   --  ~\-- ~\ 
 --  \___   o \@  @Ride yer bike!
Ottawa, ON, CANADA  --  Lo_>__M__\\/\%__\\/\%
Vote! -- 

Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Richard Guy Briggs
On 2017-09-20 14:55, Alex Pilon wrote:
> On Wed, Sep 20, 2017 at 08:19:15AM -0400, Richard Guy Briggs wrote:
> > These wired network cameras default to DHCP and failing that fall back
> > to either 192.168.122.1 (or something like that IIRC...) or use an
> > IPv4 link local address (169.?) which pretends to be random
> > with OUI or something like that to bootstrap.
> 
> @rgb: 169.254.0.0/16; see RFC 3927 or the Bonjour protocol

Yup, that's the one.  16 bits is a tad small to condense a 48-bit MAC, but it
is better than nothing...

> @rpjday: Run avahi-browse -alt if on the same layer 2 to detect the
> device's advertised services.

slainte mhath, RGB

--
Richard Guy Briggs   --  ~\-- ~\ 
 --  \___   o \@  @Ride yer bike!
Ottawa, ON, CANADA  --  Lo_>__M__\\/\%__\\/\%
Vote! -- _GTVS6#790__(*)__(*)(*)(*)_
___
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux


Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Richard Guy Briggs
On 2017-09-20 07:17, Robert P. J. Day wrote:
> On Wed, 20 Sep 2017, Robert P. J. Day wrote:
> > On Wed, 20 Sep 2017, Richard Guy Briggs wrote:
> > > On 2017-09-20 04:09, Robert P. J. Day wrote:
> > > >   in short, at least for this camera, i absolutely require an
> > > > android or iphone with the d-link app for the initial
> > > > configuration, which is kind of a pain, unless i have this
> > > > completely wrong.
> > >
> > > This would surprise me and I'd take it back if that were the case,
> > > but it is possible that there is no other way to configure it.
> >
> >   given that you mentioned the lumenera cameras, how would those be
> > any different? i looked at one here:
> >
> > http://www.ebay.ca/itm/Lumenera-Le165CP-1-4-MP-Progressive-Scan-HAD-CCD-Network-Surveillance-Camera-/201696592058?hash=item2ef60dc0ba:g:tc8AAOSw8w1X4bCe
> >
> > and noticed right away the photo of the back, which shows an ethernet
> > port, so i'm assuming that would allow me to (temporarily) connect to
> > my in-house router and configure the camera, at which point i would
> > want to move it elsewhere and access it via wi-fi -- is that how a
> > router like that would work?
>   ^^ "camera"

These wired network cameras default to DHCP and failing that fall back to
either 192.168.122.1 (or something like that IIRC...) or use an IPv4 link local
address (169.?) which pretends to be random with OUI or something like
that to bootstrap.  It is harder to expose a new device to a trusted open wifi
network than to a trusted wired network for initial bootstrapping.

So, there's a bit of a chicken and egg problem here.  Most wifi networks
require authentication now (or should!).  If your camera doesn't have a wired
ethernet port that you can connect to a trusted network to do the initial
configuration, how do you do that bootstrapping?  It looks like they've turned
it around so that you authenticate to it first so it is acting as a server for
you to connect to it, then configure it to switch from AP mode to managed mode
whereupon it can now connect to your secured wifi network with credentials you
provide.

Does that make sense and answer your question, or have I completely
misunderstood the problem?

>   sorry.

No need to be sorry!  I can be a lot more dense than this sometimes until I
finally understand a simple concept and this one isn't so simple.

/me goes back to trying to come up with an audit kernel containerID proposal
that won't get torpedoed on LKML...

> rday

slainte mhath, RGB

--
Richard Guy Briggs   --  ~\-- ~\ 
 --  \___   o \@  @Ride yer bike!
Ottawa, ON, CANADA  --  Lo_>__M__\\/\%__\\/\%
Vote! -- _GTVS6#790__(*)__(*)(*)(*)_
___
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux


Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Robert P. J. Day
On Wed, 20 Sep 2017, Richard Guy Briggs wrote:

> On 2017-09-20 07:17, Robert P. J. Day wrote:
> > On Wed, 20 Sep 2017, Robert P. J. Day wrote:
> > > On Wed, 20 Sep 2017, Richard Guy Briggs wrote:
> > > > On 2017-09-20 04:09, Robert P. J. Day wrote:
> > > > >   in short, at least for this camera, i absolutely require an
> > > > > android or iphone with the d-link app for the initial
> > > > > configuration, which is kind of a pain, unless i have this
> > > > > completely wrong.
> > > >
> > > > This would surprise me and I'd take it back if that were the case,
> > > > but it is possible that there is no other way to configure it.
> > >
> > >   given that you mentioned the lumenera cameras, how would those be
> > > any different? i looked at one here:
> > >
> > > http://www.ebay.ca/itm/Lumenera-Le165CP-1-4-MP-Progressive-Scan-HAD-CCD-Network-Surveillance-Camera-/201696592058?hash=item2ef60dc0ba:g:tc8AAOSw8w1X4bCe
> > >
> > > and noticed right away the photo of the back, which shows an
> > > ethernet port, so i'm assuming that would allow me to
> > > (temporarily) connect to my in-house router and configure the
> > > camera, at which point i would want to move it elsewhere and
> > > access it via wi-fi -- is that how a camera like that would
> > > work?
>
> These wired network cameras default to DHCP and failing that fall
> back to either 192.168.122.1 (or something like that IIRC...) or use
> an IPv4 link local address (169.?) which pretends to be
> random with OUI or something like that to bootstrap.  It is harder
> to expose a new device to a trusted open wifi network than to a
> trusted wired network for initial bootstrapping.

  not being an expert on security cameras, i am now simply assuming
the really inexpensive, small form factor units simply don't have the
real estate to support an ethernet port, so have to resort to
something else, as we are now discovering.

> So, there's a bit of a chicken and egg problem here.  Most wifi networks
> require authentication now (or should!).  If your camera doesn't have a wired
> ethernet port that you can connect to a trusted network to do the initial
> configuration, how do you do that bootstrapping?  It looks like they've turned
> it around so that you authenticate to it first so it is acting as a server for
> you to connect to it, then configure it to switch from AP mode to managed mode
> whereupon it can now connect to your secured wifi network with credentials you
> provide.

  that's the only scenario that makes sense at this point. upon
further examination, i did notice a tiny "WPS" button on the back of
the camera, which supports something called "zero configuration",
which involves:

Step 1: Attach the power supply to the power input on the DCS-936L and
connect it to a wall outlet or power strip. Power is confirmed when
the Status LED is lit.

Step 2: Press and hold the WPS button on the camera for five seconds.
The Status LED will start to blink green. Then, press the WPS button
on your router within two minutes. Your router will automatically
assign your network settings to your camera.

Step 3: From any computer, open a web browser, go to
http://www.mydlink.com and log into your account. Once mydlink detects
your camera, a New Device Found! notice will appear in the bottom
right corner. Click on the camera from the New Devices list and then
click Yes to add your camera. Your setup is complete.

  however, the user manual is adamant that this only works with a
registered d-link cloud router and an active "mydlink" account, so it
doesn't really solve the problem.

  one suspects i should restrict my search to cameras that have an
ethernet port for initial configuration.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday

___
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux


Re: [OCLUG-Tech] can i set up a d-link DCS-936L network camera to view via linux?

2017-09-20 Thread Robert P. J. Day
On Wed, 20 Sep 2017, Robert P. J. Day wrote:

> On Wed, 20 Sep 2017, Richard Guy Briggs wrote:
>
> > On 2017-09-20 04:09, Robert P. J. Day wrote:
>
> > >   in short, at least for this camera, i absolutely require an
> > > android or iphone with the d-link app for the initial
> > > configuration, which is kind of a pain, unless i have this
> > > completely wrong.
> >
> > This would surprise me and I'd take it back if that were the case,
> > but it is possible that there is no other way to configure it.
>
>   given that you mentioned the lumenera cameras, how would those be
> any different? i looked at one here:
>
> http://www.ebay.ca/itm/Lumenera-Le165CP-1-4-MP-Progressive-Scan-HAD-CCD-Network-Surveillance-Camera-/201696592058?hash=item2ef60dc0ba:g:tc8AAOSw8w1X4bCe
>
> and noticed right away the photo of the back, which shows an ethernet
> port, so i'm assuming that would allow me to (temporarily) connect to
> my in-house router and configure the camera, at which point i would
> want to move it elsewhere and access it via wi-fi -- is that how a
> router like that would work?
  ^^ "camera"

  sorry.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday

___
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux