Uart/promiscuous mode

sdk 2.6.6. Our hilink 7688a w/ silex sx-sdmah board. We’re using uart0 as a serial debug port and uart1 as another serial port. We use a usb dongle to connect to uart0 gnd, tx, rx, making it a com port to the laptop. Socat is used with ser2net for comms through uart1. The ap runs a socat listener, the station runs socat for comms to the ap to connect when sta/ap are connected halow. After bootup, the ap launches its socat listener, then halow will connect, then the station runs socat. Through halow, there will be comms over uart1 ports, such that running teraterm on each of the uart1 ports will allow comms between the boards ports. Here’s the problem: although socat is executed in a script on the station with ‘&’ to run in background, there are no comms between the 2 devices. This is when I don’t have the usb dongle on the station’s debug port uart0. As soon as I connect the usb dongle to station uart0, I’ll get something like this in the debug output and the uart1 comms magically starts working:

[ 1940.236818] device br-ahwlan entered promiscuous mode
[ 1948.777756] device br-ahwlan left promiscuous mode

Or, if I leave the usb dongle on uart0 and power cycle the station, the uart1 comms thru socat will work basically every time. I have various questions as I’m trying to figure out: is there something with openwrt causing this behavior that it does something when it detects the usb dongle being added to uart0? Is it something in hardware, maybe some inductance thing or uart lines that should be pulled up or down to not be floating? What in openwrt sdk is causing those debug lines to appear as soon as I put the usb dongle on uart0? Here’s the kicker: this seems to only happen when the station is BRIDGE. When I set the station to ‘none’ or ‘extender’ traffic mode, even without the uart0 usb dongle attached, I can reboot the sta and ap, the blue led on each lights up when halow is connected and shortly after, when socat has a chance to run, uart1 can comm between the devices. What is that promiscuous mode that comes up? Why does it come up? What’s special about bridge mode that it needs that to happen before uart1 comms work? I will say, those message above appear after power up when the usb dongle is connected when in bridge mode, so it seems somehow that’s needed to get the uart1 comms to work? Was I able to explain this to give you a clear picture? I’d appreciate any thoughts.

Interesting configuration!

Just to confirm, the USB dongle is not being plugged into your hilink device? But rather connected to the laptop and to TX/RX lines

Answering in reverse order:

Promiscuous mode is entered when the device accepts all packets on the interface, rather than just those addressed to it. For OpenWrt, this will happen when the bridge is reconfigured (eg adding or removing a port). When it leaves this mode, and enters a functional state you get the “left promiscuous mode” message as shown.

Is the USB dongle also plugged into the laptop at this time?

If you’re connected to the physical TX/RX lines on the board, there shouldn’t be any “hotplug” notification when attaching the USB to your laptop - so I’m inclined to say it’s something hardware related. Maybe ser2net isn’t seeing the network interface as “up” until there is some activity on the lines, which connecting could trigger?