Page 1 of 1
Kogna ethernet connection with DHCP
Posted: Fri Mar 08, 2024 11:35 pm
by geraldft
Hi
I've struck an issue with Kogna on my ethernet. I have been using a manual address on my IPV4 adapter.
Network Adapter IPV4 = 192.168.0.106 Kogna = 192.168.0.100
This allows the Kogna to connect fine. However when I try to connect to the internet over the same network it will not access most web sites. Weirdly some will, but most will not. I am guessing this is because IPV6 is used by some sites?
If I change IPV4 back to DHCP then the websites all work, but then I can't connect the Kogna..
Note - I have tried with and without the firewall enabled. I also excluded the Kmotion program in firewall exclusions list.
The only work around is if I use a laptop with wifi, then i can access internet on that. But most of my pcs do not have wifi.
Is there way to address this? Perhaps a way to let Kogna work with DHCP? Note I am connected to internet and Kogna via a small 5 port router.
Thanks Gerald
Re: Kogna ethernet connection with DHCP
Posted: Fri Mar 08, 2024 11:49 pm
by TomKerekes
Hi Gerald,
It isn't clear what you are doing. Maybe you could post a simple diagram of your network. Where is the modem? Is there a router? Where is the PC Connected? Where is Kogna Connected?
But Kogna can work with DHCP. Set its IP address to 0. See
here.
Re: Kogna ethernet connection with DHCP
Posted: Sat Mar 09, 2024 12:00 am
by geraldft
Hi Edit above.
The PC and Kogna are both connected to a small 5 port router. That is also connected to a modem.
I'll first try setting the Kogna requested address to zero using a terminal program....
Thanks G
Re: Kogna ethernet connection with DHCP
Posted: Sat Mar 09, 2024 12:59 am
by geraldft
Thanks. A bit of fiddling round but Kogna now connects with DHCP.
It does make me appreciate how easy Kflop is with its USB connection... but I suppose the price of progress..
I do find it a bit unclear who is requesting and who is assigning, but for now it works.
In Putty requested is now 0.0.0.0 and assigned is 192.168.1.164 In the PC the IPV4 address is 192.168.1.190
Is it likely one day DHCP will decide to create a different local IPV4 address? And then Kogna won't connect...
Also if I plug the same Kogna into another PC, will this process need to be repeated if that is also using DHCP?
Thanks G
Re: Kogna ethernet connection with DHCP
Posted: Sat Mar 09, 2024 1:47 am
by TomKerekes
Hi Gerald,
It does make me appreciate how easy Kflop is with its USB connection... but I suppose the price of progress..
I agree.
The PC and Kogna are both connected to a small 5 port router. That is also connected to a modem.
I do find it a bit unclear who is requesting and who is assigning, but for now it works.
The router is the DHCP Server providing addresses for the PC and Kogna.
Note that somewhat ironically with a direct connection from the PC to KFLOP (without a router) there isn't any DHCP Server available so IP Addresses need to be fixed and manually assigned.
Is it likely one day DHCP will decide to create a different local IPV4 address?
I think the Router attempts to always assign the same addresses but I think that is a possibility.
And then Kogna won't connect...
That depends on if your App is using a fixed address or not. If your App uses an address of 0 (meaning any KFLOP/Kogna found) then the libraries will attempt to connect to Kogna using a Multicast broadcast. See
here. This only works if the Router/Firewall/etc supports and allows multicast. In that case the assigned address shouldn't matter. You can look at the Terminal to see if multicast is received by Kogna.
Also if I plug the same Kogna into another PC, will this process need to be repeated if that is also using DHCP?
If multicast can get from the PC to Kogna it should just work.
Re: Kogna ethernet connection with DHCP
Posted: Sun Mar 10, 2024 5:08 am
by geraldft
Thank you Tom
That explains everything.
DHCP not working without the router is a bit unfortunate...
I was hoping it might make life simpler to use DHCP universally, but obviously not possible.
I can see connection being an ongoing support question for Mantis.. even at times for myself
Moving on now to more interesting challenges...
Thanks Gerald
Re: Kogna ethernet connection with DHCP
Posted: Wed Mar 20, 2024 1:44 am
by TomKerekes
Hi Gerald,
We created a simplified DHCP Server in Kogna that starts up if Kogna fails locating a DHCP Server.
Its very simple and assigns itself fixed address of 192.168.113.100
Other devices are assigned addresses 192.168.113.101 - 192.168.113.108 based on order of Discover requests.
With a direct connection between the PC and Kogna there should be only the PC requesting so assigned 192.168.113.101
But potentially there might be other devices connected though an Ethernet Switch. Regardless multicast should allow the PC to find Kogna.
Could you test this to see if it works for you?
Copy these files to the KMotion5.3.2\DSP_Kogna folder and flash New Version.
DSPKOGNA.bin
DSPKOGNA.sym
DSPKOGNA.out
Of course you must set the PC and Kogna to use DHCP.
The Virtual COM port diagnostics should show something like:
Primary Boot KOGNA 5.0.5 Build 12:47:26 Nov 9 2022
Recovery Delay before Reading Boot Jumper
Boot Jumper Installed Attempting Secondary Boot
Flash Reading from Block 20...
Jump to Secondary Boot
KOGNA 5.3.2.1 Build 18:04:30 Mar 19 2024
Flash Reading from Block 16...
Board Serial Number/Domain Kogna_SN34
IP Addr 0 request via DHCP
Searching for DHCP Server
DHCP Timed Out
KOGNA IP Address Assigned 192.168.113.100
KOGNA DHCP Server Started
DHCP Request received MAC = C0 7C D1 A3 7F 6B Assigned 192.168.113.101
multicast received from: 192.168.113.101 Kogna: 192.168.113.100
Com Buffer Flushed