Direct Connect IP Camera to PC

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
xuraax
Level 1
Level 1
Posts: 4
Joined: Thu Aug 15, 2019 10:59 am

Direct Connect IP Camera to PC

Post by xuraax » Thu Aug 15, 2019 1:55 pm

Hi,

I would like to connect my IP camera directly via ethernet to my linux mint 19.2 PC (i.e. bypassing the router) while at the same time I would like the PC to still connect to the internet via WiFi.

My attempts to set up both resulted in the PC trying to connect to the internet via the Ethernet which obviously did not work.

Can anyone suggest a way of doing this please?

User avatar
phd21
Level 19
Level 19
Posts: 9169
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Direct Connect IP Camera to PC

Post by phd21 » Thu Aug 15, 2019 2:09 pm

Hi xuraax,

Welcome to the wonderful world of Linux Mint and its excellent forum!

It would help to know more about your system setup. If you run "inxi -Fxzd" and "lsusb" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

What is the exact make and model of the IP camera?

In Linux Mint, in the Network Manager in your system tray (edit / configure connections) you can specify which network connection you want to be the default network connection under the General Tab, "connect automatically with priority" and give a higher priority number even "1" to your wireless ISP connection, keeping in mind, that you may also have to check other network connections (ie: wired Ethernet) and or other wireless connections in the Network Manager (NM) to turn off (uncheck) "connect automatically" settings and or reduce their priority value (mouse over to see help).

5 Methods on How to Connect a Security IP Camera to PC/Mac - Reolink Blog
https://reolink.com/connect-security-ip-camera-to-pc/

networking - Connect IP Camera to PC directly using Ethernet cable - Stack Overflow
https://stackoverflow.com/questions/474 ... rnet-cable

How to connect IP camera to the computer without a router - Learn CCTV.com
https://learncctv.com/ip-camera-to-computer/

Hope this helps ...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

xuraax
Level 1
Level 1
Posts: 4
Joined: Thu Aug 15, 2019 10:59 am

Re: Direct Connect IP Camera to PC

Post by xuraax » Fri Aug 16, 2019 8:24 am

Thank you very much for your fast reply.

To start of, here is some info about the netbook on which I am conducting these trials:

=========
System:
Host: xuraax-U90-U100 Kernel: 4.15.0-20-generic i686 bits: 32
compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.8
Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic
Machine:
Type: Desktop System: MICRO-STAR product: U90/U100 v: Ver.001
serial: <filter>
Mobo: MICRO-STAR model: U90/U100 v: Ver.001 serial: <filter>
BIOS: American Megatrends v: 4.6.3 date: 05/21/2009
Battery:
ID-1: BAT1 charge: 48.0 Wh condition: 49.1/57.7 Wh (85%) model: N/A
status: Unknown
CPU:
Topology: Single Core model: Intel Atom N280 bits: 32 type: MT
arch: Bonnell rev: 2 L2 cache: 512 KiB
flags: nx pae sse sse2 sse3 ssse3 bogomips: 6666
Speed: 1650 MHz min/max: 800/1333 MHz Core speeds (MHz): 1: 1262 2: 1307
Graphics:
Device-1: Intel Mobile 945GSE Express Integrated Graphics
vendor: Micro-Star MSI driver: i915 v: kernel bus ID: 00:02.0
Display: x11 server: X.Org 1.19.6 driver: intel
unloaded: fbdev,modesetting,vesa resolution: 1024x600~60Hz
OpenGL: renderer: Mesa DRI Intel 945GME x86/MMX/SSE2 v: 1.4 Mesa 18.0.5
direct render: Yes
Audio:
Device-1: Intel NM10/ICH7 Family High Definition Audio
vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 00:1b.0
Sound Server: ALSA v: k4.15.0-20-generic
Network:
Device-1: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet
vendor: Micro-Star MSI RTL810xE driver: r8169 v: 2.3LK-NAPI port: d000
bus ID: 01:00.0
IF: enp1s0 state: down mac: <filter>
Device-2: Ralink RT2790 Wireless 802.11n 1T/2R PCIe vendor: Micro-Star MSI
driver: rt2800pci v: 2.3.0 port: d000 bus ID: 02:00.0
IF: wlp2s0 state: up mac: <filter>
Drives:
Local Storage: total: 596.17 GiB used: 10.55 GiB (1.8%)
ID-1: /dev/sda vendor: Samsung model: HM641JI size: 596.17 GiB
Message: No Optical or Floppy data was found.
Partition:
ID-1: / size: 585.81 GiB used: 10.55 GiB (1.8%) fs: ext4 dev: /dev/sda1
Sensors:
System Temperatures: cpu: 64.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 168 Uptime: 27m Memory: 1.95 GiB used: 698.8 MiB (34.9%)
Init: systemd runlevel: 5 Compilers: gcc: 7.3.0 Shell: bash v: 4.4.19
inxi: 3.0.27

=============

Re info about the camera, I am afraid I do not have much details about it as this is a camera which was donated to me by a friend and probably bought off Ebay.

However you should note that I have been able to use this camera fully when connected to the same PC through the router and the Motioneye software. Its URL is 192.168.1.12.

I have also experimented with the priority options you had proposed in the general tab with no success. I noted that initially the priory for wired was set at -999 and that for wireless was set at 0.

I set the priority for wired at 0. For wireless I tried -999 or 1 or 10 with practically the same results. Note that after each and every change I am rebooting the system to ensure that the changes are implemented.

With these setups, when I ping 192.168.1.254 ( router home page ) it tries pinging this url for 3 or 4 times with no success after which it reverts to pinging 192.168.1.12 successfully.

Another thing I noted is, that despite my attempt to leave the gateway parameter empty as suggested by the last link you proposed, ifconfig always reports that the broadcast parameter is always 192.168.1.255 both for the wired and for the wireless connection.

Regards

joe

User avatar
phd21
Level 19
Level 19
Posts: 9169
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Direct Connect IP Camera to PC

Post by phd21 » Fri Aug 16, 2019 1:04 pm

Hi Joe - xuraax,

You are welcome...

Well, you only have a single-core 32-bit Intel Atom CPU running at a slow 1.6ghz with only 2gb of system memory (ram), so that's an older not very powerful computer, but it does have a wired Ethernet port, so you should be able to use the IP camera unless there is some incompatibility with Linux or some proprietary software the camera requires that only runs on MS Window which is very rare.

I do not see anything wrong with the results of the "inxi -Fxzd" console terminal command, so that is a good thing.
You might be better using a different edition of Linux Mint rather than Cinnamon which requires more resources than "Xfce" or "Mate" editions. "Xfce" is what I would recommend for your netbook. Also, in case you did not know, 32-bit software is being phased out quickly. So, if you can get a 64-bit computer, even a good used computer, that would be better.
xuraax wrote:Re info about the camera, I am afraid I do not have much details about it as this is a camera which was donated to me by a friend and probably bought off Ebay.
Does the camera have any identification labels or writing on it? If yes, what is that information.
xuraax wrote:However you should note that I have been able to use this camera fully when connected to the same PC through the router and the Motioneye software. Its URL is 192.168.1.12.
That is a very good thing that the camera is seen when connected directly to your hardware router.

IP cameras require a power source, and that can be POE (Power Over Ethernet - provided by a POE Ethernet cable) or the camera has a separate power cord or perhaps even batteries. Which type of camera is yours? Since I do not have an IP camera at the moment, so I cannot verify and or try the instructions from the links. And, I did not know that it was possible to connect an IP camera directly to a computer's wired Ethernet port until I researched your post although I suspected it could be done.

Also, some IP cameras have their own built-in web server and others do not, do you know if yours has a built-in web server with login and password?
xuraax wrote:I have also experimented with the priority options you had proposed in the general tab with no success. I noted that initially the priory for wired was set at -999 and that for wireless was set at 0.

I set the priority for wired at 0. For wireless I tried -999 or 1 or 10 with practically the same results. Note that after each and every change I am rebooting the system to ensure that the changes are implemented.

With these setups, when I ping 192.168.1.254 ( router home page ) it tries pinging this url for 3 or 4 times with no success after which it reverts to pinging 192.168.1.12 successfully.
"0" is a higher priority number over "-999" negative value, so that means the wireless adapter with priority of "0" should be connected first over the wired Ethernet connection with a priority of "-999". I would recommend changing the wireless priority to "1". FYI: anytime you change network settings, you probably you should logout and back in or reboot the computer for those changes to take affect.
xuraax wrote:Another thing I noted is, that despite my attempt to leave the gateway parameter empty as suggested by the last link you proposed, ifconfig always reports that the broadcast parameter is always 192.168.1.255 both for the wired and for the wireless connection.
It would have helped if you could provide the details of the IP camera's settings when it was working and connected to the router from the router's configuration settings menu, like IP address, gateway, etc... Even though they may claim to leave the gateway and subnet entries blank, you may need to put them in.


Hope this helps ...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

xuraax
Level 1
Level 1
Posts: 4
Joined: Thu Aug 15, 2019 10:59 am

Re: Direct Connect IP Camera to PC

Post by xuraax » Sat Aug 17, 2019 1:15 am

Hi,

I know this is a slow PC but the intention is to create a simple one camera security system and I figured if people can do this with a Raspberry PI why not this PC.

Anyway, after a lot of fiddling I believe I have reached most of my targets with the following setup, all carried out from Network Manager:

Wired Connection:

In the General Tab, keep Autoconnect ticked and Set Priority to 0.
In the IPv4 Tab, set Method to "shared with other computers" ; Add Address = 192.168.1.174, Netmask = 255.255.255.0, Gateway = "".
I also have the "Require IPv4 addressing...." ticked but I am not sure this is needed.

Wireless Connection:

In the General Tab, keep Autoconnect ticked and Set Priority to 1.
In the IPv4 Tab, set Method to "manual" ; Add Address = 192.168.1.173, Netmask = 255.255.255.0, Gateway = 192.168.1.254.
I also have the "Require IPv4 addressing...." ticked but I am not sure this is needed.

With this setup, my Netbook is able to see the camera and record pictures on the directly wired connection. I am also able to access the internet on the wireless connection.

I can ping all the above addresses including the camera itself but strangely I cannot ping the router on x.x.x.254 even though I know I am connected.

More important,from another PC connected to the network, even though I can see that the Netbook is connected to the router properly, I am unable to access Motioneye using 192.168.1.173:8765.

Any insight or help on this will be appreciated.

User avatar
phd21
Level 19
Level 19
Posts: 9169
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Direct Connect IP Camera to PC

Post by phd21 » Sat Aug 17, 2019 11:51 am

Hi xuraax,

You are welcome...

That is good you can now access the IP camera when it is locally attached to your computer.

Out of curiosity, if it worked on your router then why do you want it attached to your computer instead? Better location?
xuraax wrote:I can ping all the above addresses including the camera itself but strangely I cannot ping the router on x.x.x.254 even though I know I am connected.
Can you access the router's menu using its IP address? That seems like an unusual IP address (.254) for a router, did you change that?
xuraax wrote:More important,from another PC connected to the network, even though I can see that the Netbook is connected to the router properly, I am unable to access Motioneye using 192.168.1.173:8765. Any insight or help on this will be appreciated.
In order for any other computer or device that is not the computer with the IP camera to see the IP camera attached to the other computer, you may have to add a firewall rule(s) for the IP addresses of the camera and the computer it is attached to on the remote computer(s) and or devices IP address(s) and if any of those devices are not on the Local Area Network (LAN), and or you want to view them from anywhere else, you may have to setup "port forwarding" in the router's setup configuration menu to the computer's local (LAN) IP address with the attached IP camera and the camera's local (LAN) IP address or at least the camera's IP address. Turning off the firewalls temporarily may help you to identify if a firewall is causing any issues requiring adding firewall rule(s).

I am assuming the computer and the now attached IP camera have different local IP addresses?

Hope this helps ...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

xuraax
Level 1
Level 1
Posts: 4
Joined: Thu Aug 15, 2019 10:59 am

Re: Direct Connect IP Camera to PC

Post by xuraax » Sun Aug 18, 2019 5:07 am

@phd21

thanks again for your continued interest.
phd21 wrote:
Out of curiosity, if it worked on your router then why do you want it attached to your computer instead? Better location?
The reason why I need to be independent of a router is very simple. At the location where I want to install this system there is power but no internet or wifi.
phd21 wrote:
Can you access the router's menu using its IP address? That seems like an unusual IP address (.254) for a router, did you change that?
192.168.1.254 is the default address of the router itself. I did not change anything here and yes I can access the router's menu.
phd21 wrote:
I am assuming the computer and the now attached IP camera have different local IP addresses?
They always had a different address but they were all in the same group. I believe it is called a subnet.

In fact I think I have finally solved all issues by switching the IP of the camera onto a different group. Originally its IP was 192.168.1.12 and now I set it to 192.168.2.12.

This of course meant that the computer's ip for the wired network had to be changed likewise to 192.168.2.173.

It appears that keeping the wired ip's in a separate group from those of the wireless avoids conflict.

Regards

User avatar
phd21
Level 19
Level 19
Posts: 9169
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Direct Connect IP Camera to PC

Post by phd21 » Sun Aug 18, 2019 12:50 pm

Hi xuraax,

You are welcome...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

Post Reply

Return to “Other networking topics”