Skip to main content
. 2025 Oct 7;25(19):6213. doi: 10.3390/s25196213
Algorithm 1 Wi-SUN FAN discovery process on JS1
  • 1:

    C: number of available channels

  • 2:

    V[]← channel_function()

  • 3:

    Ic: channel index

  • 4:

    UDI: unicast dwell interval

  • 5:

    Ic← 0

  • 6:

    node = JS1

  • 7:

    start of PAS trickle timer

  • 8:

    CHscanV[Ic]

  • 9:

    while node is in the process of connecting do

  • 10:

        if UDI timer has expired then

  • 11:

            resets the scan time

  • 12:

            Ic(Ic+1)

  • 13:

            CHscanV[Ic]

  • 14:

        end if

  • 15:

        if node = JS1 then

  • 16:

            node is not associated

  • 17:

            transmits PAS when the trickle timer allows

  • 18:

            if PA is received then

  • 19:

               stop of PAS trickle timer

  • 20:

               node ← JS5

  • 21:

            end if

  • 22:

        end if

  • 23:

        if node = JS5 then

  • 24:

            node is associated

  • 25:

            start of PA trickle timer

  • 26:

        end if

  • 27:

    end while