Author Topic: [SOLVED] Re-Post "Connecting the Gateway doesn't work"  (Read 1946 times)

mcThings

  • We Connect Things To The Internet... That Can't Be Plugged In.
  • Administrator
  • Jr. Member
  • *****
  • Posts: 68
    • View Profile
    • www.mcthings.com
[SOLVED] Re-Post "Connecting the Gateway doesn't work"
« on: June 06, 2016, 10:55:58 am »
bergadr9din General5a1
Connecting the Gateway doesn't work

So far I did manage to upgrade the modules, also the gateway has been upgraded (both processors). Now the problem I have is to actually connect to the gateway, Lan and Wifi both connect and the amber LED is on when they are connected.
When I check in mcStudio – tools – devices no go, I can only see the virtual ones.
Not sure if I am doing something wrong ?
AdrieLike

veleek
veleek7d
I'm running into this same problem. At one point in time, I did manage to see my mcGateway in the list of gateways, but none of the mcModules were connected to it. I'm not sure if I need to do something to get the mcModules to connect to a specific gateway.Like

bergadr
bergadr7d
I would be happy if the Gateway would connect, but it doesn't (
I tried an other PC just to be sure but same result, no GWLike

mcJohn
mcJohnAdmin7da1
You have first to connect to the gateway and then devices are showing up. It is described better in the new msStudio user guide which will available for download this week. Our gateway guy can give you a better answer but he is not in yet. Still early hereLike

bergadr
bergadr6d
Thx John, just connecting the gateway is the problem as it doesn't showLike
2d
Good news! The latest update did fix my problem, I can see the Gateway and the modules )
« Last Edit: June 23, 2016, 11:03:14 pm by mc-Abe »

Share on Facebook Share on Twitter


Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #1 on: June 07, 2016, 12:34:34 pm »
How is the software finding the gateway on the LAN? Zeroconf? There doesn't seem to be a way to add a gw manually so I'm just left wondering why it doesn't magically show up.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #2 on: June 07, 2016, 12:53:13 pm »
Answer from mcJohn about the connection:

The gateway broadcast a UDP packet to indicate that there is a gateway. This contains its IP address and version information.
mc-Studio receives this UDP message and makes it available in the gateway/device form.
If the user want to connect to the gateway mcStudio will UPD its own IP address to the gateway and the gateway makes a tcp/ip connection to mc-Studio.

Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #3 on: June 07, 2016, 01:01:10 pm »
Thanks for the details. Sounds like I need to fire up Wireshark and see if that packet ever happens. I can see from my DHCP server that it got an ip address and is reachable but other than that it's a bit of a black box to debug.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #4 on: June 07, 2016, 01:09:04 pm »
Could you please provide som information about your gateway. Have you updated it to the latest firmware? How is the LEDs on the mcGateway? Power and Conn is Red and Status in blinking green?
Just to verify so that you don't have a connection issue there.

Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #5 on: June 07, 2016, 01:11:54 pm »
- fw is downloaded and flashed today, file name was mcGwHost110_v0.7-403.bin
- LED's are solid red, solid amber and slow blink green.
- On Wireshark capturing with "ether host d8:80:39:xx:xx:xx" I can see a DHCP Discover and DHCP Request but after that, nothing. It's just not reaching out. 

Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #6 on: June 07, 2016, 01:15:28 pm »
Got confused with the firmware files, that was for the host card. Of course the main fw is just called mcGw110.bin but downloaded just a few moments ago and flashed it via USB, flashing seemed to go exactly as documented.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #7 on: June 07, 2016, 01:16:54 pm »
The file name you mentioned is for the Host Processor on the mcGateway and is flashed  with mcDongle. Have you also downloaded the file for the Application Processor V0.6-355? That has to be flashed with a USB memory stick.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #8 on: June 07, 2016, 01:19:19 pm »
Ahh good, you answered before my question :)

Do you have a "simple" LAN if you know what I mean?

Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Re-Post "Connecting the Gateway doesn't work"
« Reply #9 on: June 07, 2016, 01:22:49 pm »
Simple might not be the word I'd use but it should be fairly standards compliant. Right now the Windows machine and mcGw are on the same switch. The fact that I can see the DHCP traffic for the GW would indicate that I should also see any broadcasts it sends out.

I could just try to reflash it if that could make any difference? I just assumed since it's sane enough to get an address, it should be sane enough to start the application. :-)

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
But how would the world look like if everything and everyone was sane  ;)

I would just try to reflash and when it is done flashing then I would pull the plug and wait a couple of seconds before I would fire it up again.


Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
I re-downloaded the fw, replaced the file on the USB stick, re-flashed and hard rebooted the gw. I again see the DHCP traffic but nothing after that. Would you know the parameters of the "poke" UDP packet so I could hand-craft one and throw it at it? At this point it seems that the main loop isn't doing what it's supposed to so unlikely that it would answer that either though.

Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Damn, I just realized what I did wrong. I pushed the mcModule fw onto the app processor instead of the mcGwHost program. Looks like they're similar enough so that it doesn't raise any errors. This is something I think a lot of people might accidentally do so probably worth it for the OTA updater to check the type of FW being pushed! .. Now if only the dongle would be found again I could re-push. *sigh* .. But that is a different issue.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Ahh okey. Then we could continue this if the error still exists when right firmware is in the right place  :)

Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Aha! Pushed in correct firmware and now there's plenty of UDP traffic and it shows up as expected and even has all 5 mcModules visible. So yeah, all of this pain can be avoided by having the OTA updater check the headers of the bin and at least warn that you probably don't want to push the module fw to the gw. :-)