This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352: Ethernet switch usage

Part Number: AM3352


Dear Sitara champs,

Consider the following diagram of a use case using the dual port switch on the AM3352.

There's an AM3352 Sitara board with a WLAN/BT module on it. There's another board we'll call the other module which has a microprocessor on it running an Ethernet stack. The question is, can we do the following?

Can the other module access both the WLAN on the Sitara board *and* access the network camera? If so, how would we go about setting this up from the Linux side of things running on Sitara? Does the AM3352 assign IP addresses to the other module and the camera?

Thanks

  • Brad,

    Our expert on this is out on vacation through next week and we won't be able to respond until then. I'm sorry for the delay.

  • Hi Brad,

    One clarifying question is if the CPSW will be run in switch mode or dual mac mode. The difference is that in switch mode there will be one Ethernet port that shows up for the CPSW where as dual mac mode will have two. Why that is important is because in dual mac mode you will need to add iptable rules to allow access from the other module to the network camera. If switch mode then the other module can talk directly to the network camera through the switch and not bother the ARM or need iptables rules defined.

    Best Regards,

    Schuyler

  • That's a good question, I don't think there's a preference one way or another, it sounds like switch mode is better.

    I apologize if these are rudimentary but I have a couple more questions.

    The way I would envision this working is we configure the AM335x in switch mode and run a DHCP server on the AM335x. We plug in the other module and it gets an IP address from the AM335x. We then plug in the camera and it too gets an IP address. Or would we be better off configuring static IP addresses?

    Once IP addresses are assigned, can the other module simply access the camera using its IP address? The AM335x switch would see this IP address and forward it on to the camera? If so, that sounds pretty simple.

    The other, and maybe more complex question is, how would the other module access the WLAN and internet assuming it's connected to an AP? Would this be automatic in the sense I could simply make references to internet addresses and the AM335x would resolve this accordingly? From 10,000ft, it seems there's more involved, as if the AM335x is acting as a gateway and/or router. Can this be done?

    Thanks

  • I would recommend switch mode on the AM335x, a little bit easier setup but also way better in terms of traffic on what the ARM will have to handle. In switch mode the "other module" would go through the switch to talk directly with the IP camera module without impacting ARM processing bandwidth.

    Your suggestion of running an DHCP server on the AM335x would be the way to go, camera and "other module" would get their IP addresses from the AM335x. Linux running on the AM335x would be able to act as the gateway between the IP camera and the "other module". The gateway would require configuration but once configured the AM335x would be able to send the traffic between devices connected the AM335x and the WLAN network.

    Part of this configuration would be deciding how visible you want the IP camera and "other module" to be. Your comment is correct in that it can be involved but is possible and done quite a bit. As an example a home network uses a NAT ( network address translation) technique to shield the connected devices from the network, the connected devices can get out but the network can't get it, hopefully that makes sense. The permutations on how to set this are many and usually the responsibility of the user to develop. There are lots of examples that can be searched for setting up gateways and NAT type applications.

    Best Regards,

    Schuyler