# TDMA up but does not transmit data



## cloud69 (Nov 17, 2011)

TDMA up but no data transmit


```
Source: svn.freebsd.org/base/head
Revision: 227494

Card use:
Ubiquiti XR2 (AR5413 chipset) are cabled together (minimize intereference)

Setting
-------
1. Master setting

# ifconfig wlan0 create wlandev ath0 wlanmode tdma
# ifconfig wlan0 ssid freebsd-tdma tdmaslotcnt 2 tdmaslotlen 2500 tdmaslot 0 ucastrate 24 up
# ifconfig bridge0 create
# ifconfig bridge0 addm wlan0
# ifconfig bridge0 inet 192.168.10.5 up

# ifconfig bridge0
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 02:2c:6f:5e:4d:00
        inet 192.168.10.5 netmask 0xffffff00 broadcast 192.168.10.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: wlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 7 priority 128 path cost 76923

# ifconfig wlan0
wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:02:6f:4a:c2:04
        media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g <flag0,adhoc>
        status: running
        ssid freebsd-tdma channel 10 (2457 MHz 11g) bssid 00:02:6f:4a:c2:04
        country US ecm authmode OPEN privacy OFF txpower 19 ucastrate 24
        mcastrate 24 scanvalid 60 protmode CTS wme burst tdmaslot 0
        tdmaslotcnt 2 tdmaslotlen 2500 tdmabintval 5
# 


2. Slave
--------

# ifconfig wlan create wlandev ath0 wlanmode tdma
# ifconfig create bridge0
# ifconfig bridge0 inet 192.168.10.10
# ifconfig bridge0 create
# ifconfig bridge0 addm wlan0
# ifconfig wlan0 ssid freebsd-tdma up
# ifconfig bridge0 up

# ifconfig wlan0
wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:02:6f:4a:c2:10
        media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g <flag0,adhoc>
        status: running
        ssid freebsd-tdma channel 10 (2457 MHz 11g) bssid 00:02:6f:4a:c2:04
        country US ecm authmode OPEN privacy OFF txpower 20 ucastrate 24
        mcastrate 24 scanvalid 60 protmode CTS wme burst tdmaslot 1
        tdmaslotcnt 2 tdmaslotlen 2500 tdmabintval 5
# 
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 02:2c:6f:5e:4d:00
        inet 192.168.10.10 netmask 0xffffff00 broadcast 192.168.10.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: wlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
-------

3. At Master
-----------
# ifconfig wlan0 list sta
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG
00:02:6f:4a:c2:04    0   10   0M  9.0    0   3421  48736      A
00:02:6f:4a:c2:10    0   10  24M 50.0    0      0   9536 S    AQE     WME TDMA

4. At Slave
------------
# ifconfig wlan0 list ap
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
freebsd-tdma    00:02:6f:4a:c2:04   10   54M -45:-96  100 S    WME TDMA

5. Ping slave to master or master to slave, packets do not get throught.
-------
# ping 192.168.10.5
PING 192.168.10.5 (192.168.10.5): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
```

After that I sometimes get the following message:

```
ath0: device timeout
```

If I do not use bridge, still cannot Rx/Tx data accross the WiFi link.

Any help and recommendation are appreciated.

Thanks in advance.
Cloud


----------



## SirDice (Nov 17, 2011)

Try posting your issue to the freebsd-net@ mailinglist.


----------



## cloud69 (Nov 22, 2011)

Thanks for the recommendation; I will post to the mailing list.


----------



## adrian@ (Nov 29, 2011)

Try posting to freebsd-wireless@freebsd.org

Also, please try -9. I've merged in the 802.11n work into the ath driver in -HEAD and it's _ABSOLUTELY_ possible I've broken TDMA.

So please just test on -9 for now and verify that it works there. Then repeat it with -HEAD and get back to me.

Thanks!


Adrian

(defacto net80211 maintainer; ath(4) developer)


----------



## cloud69 (Nov 30, 2011)

Thanks Adrian,
I will try it next week and let you know as I am travelling this week.

Best Regards,
Cloud


----------



## cloud69 (Dec 8, 2011)

Hi Adrian,

I tested with FreeBSD 9 and I found out that the bridge do_es_ not seem to work. Basically, I bridged ethernet interface and then connect one end to laptop. Then I ping the interface but I cannot see any packets get through (using `tcpdump`). Anyway, I configure TDMA without  using bridge and I can ping both end (from Master to slave and vice versa). However, I found that the lantency is quite high and lot of packet lost as shown below. At least, I can get the packets through.


```
--- 192.168.10.6 ping statistics ---
718 packets transmitted, 182 packets received, 74.7% packet loss
round-trip min/avg/max/stddev = 2.194/6.598/27.073/2.892 ms
```

Interestingly, when I capture the packets using `wireshark`, I notice that the station does rec_ei_ve all the ICMP request and sent all the ICMP replies back to the master; however, the master does not seem to rec_ei_ve the packets. Any idea why?

I have re-run the same test again FreeBSD 10 but still no packets get into air except beacons (using wireshark).

Best Regards,
Clous


----------



## AndyMatos (Mar 25, 2014)

I start to use TDMA on FreeBSD just from last two mouths and I hope my answer is not too late  . I follow the steps on following link: https://wiki.freebsd.org/WifiTDMA. At first I also got the bad result like yours, the TDMA setup but not transmit data. I think maybe the TDMA signals are interfered by the WIFI signals from other APs which are use CSMA/CA
So I try not to use the antenna and  connect two NICs directly through the coaxial, but still failed. Later my tutor ask me try to add some attenuator between two NICs. After I add two attenuators between them, it works!!! No packet is loss! About the time delay, I think maybe your time slot is too big. If you use the small time slot, the time delay is fine! So I think the reason why TDMA do not transmit data is that maybe two nodes are too close and the RSSI is too high which cause the receiver think it does not receive any reply?


----------



## Qing Y (Dec 19, 2016)

Hi,

Anybody gets the TDMA stuff to work with 802.11n data rate?

I've tried TDMA with FreeBSD 10.3 and the latest (12.0), using my Atheros 9160 chipset which support 11n 3x3 MIMO. However, I can only get ~40Mbps with conventional CSMA/CA and ~20Mbps with TDMA, under iperf test. Does FreeBSD WiFi module really support 11n MCS?

Looking forward to your update


----------

