Hi
I am not sure if i have done something wrong with the installation, but I have only managed to get RTmac/TDMA working once which I informed Jan quite few weeks ago. Somehow it never worked since, and I didn't have the time to go into the codes and find out the reason until now.
I increased the TDMA_DEFAULT_DEBUG_LEVEL variable for detailed debugging.
Behavior 1 --------- I seem to be having a problem with task change.
tdma_task_change_con() not successful
and found that everytime there is a tdma_task_change(.. ) tdma_task_shutdown(.. ) function is called first, which i assume is suppose to delete the existing running task. Somehow i do not see that line so i added ...
rt_task_wakeup_sleeping (&tdma->tx_task); rt_tas_delete(&tdma->tx_task);
Now it seems that task change from tdma_task_notify to tdma_task_config is working... but it doesn't solve the task change for tdma_task_config to tdma_task_master. This is because in the function tdma_task_shutdown(..) it checks only if tdma->flags.task_active == 1 , but tdma_task_config terminates after sending test packets and sets the task_active to 0. so i added and arranged few lines after the while loop
while( ... )
{}
tdma_timer_start_sent_test(tdma, TDMA_MASTER_WAIT_TEST);
tdma_next_state(tdma, TDMA_MASTER_SENT_TEST); while(tdma->flags.shutdown_task == 0)
{
rtos_task_wait_period();
} TDMA_DEBUG(3, "RTmac: tdma: %s() shutdown complete\n",__FUNCTION__);
tdma->flags.task_active = 0;
tdma->flags.shutdown_task = 0;return;
Behavior 2
---------
The second weird thing is in the executable 'rtnet' file. my client seems to be reaceving the 'ready' from server, but stuck when sending its own ready to the server.
So here is what i have done, noted by the sign '*' but i am not sure if this is correct.. please tell me if this is doable.. From looking at the states, RTmac and rtcfg have no relation and each works with their own state machines, so i guess this change is fine..
Master -----
$RTCFG rteth0 server
STAGE_2_OPT=
if [ ! "$STAGE_2_SRC" = "" ]; then
STAGE_2_OPT="-stage2 $STAGE_2_SRC"
fi
for CLIENT in $TDMA_CLIENTS; do
$RTCFG rteth0 add $CLIENT $STAGE_2_OPT
done echo -n "Waiting for all clients..."
$RTCFG rteth0 wait* echo * $RTCFG rteth0 ready
echo
echo -n "Starting TDMA master..."
$RTIFCONFIG rteth0 mac master $TDMA_CYCLE
sleep 1 OFFSET=$TDMA_OFFSET
DELAY=0
for CLIENT in $TDMA_CLIENTS; do
$RTIFCONFIG rteth0 mac add $CLIENT $OFFSET
let OFFSET=$OFFSET+$TDMA_OFFSET
let DELAY=$DELAY+5
sleep 3
done $RTIFCONFIG rteth0 mac up
sleep $DELAY
ifconfig vnic0 up $IPADDR $NETMASK_OPTClient ------
init_rtnet
if [ $TDMA_MODE = "master" ]; then
start_master
else
echo -n "Stage 1: searching for master..."
$RTCFG rteth0 client echo
echo -n "Stage 2: waiting for other clients..."
if [ ! "$STAGE_2_DST" = "" ]; then
$RTCFG rteth0 announce -f $STAGE_2_DST
echo
/bin/sh -c "$STAGE_2_CMDS"
else
$RTCFG rteth0 announce
echo
fi* echo -n "Stage 3: waiting for common setup completion..." * $RTCFG rteth0 ready * echo
$RTIFCONFIG rteth0 mac client
ifconfig vnic0 up $IPADDR $NETMASK_OPTfi
I have still got to do more testings to see if i still get some weird behaviors e.g. for rtnet-0.7.0 it seems that i can not do "rtnet start" the second time else system halt. Do I need to close down the server first before closing down the client? because it seems like where the fault is.
Another major fault which I have absolutely no idea of is.. everytime i have loaded rtnet, my system always hangs if i try to unload rtai_lxrt.o
Can I use RTmac/TDMA in LXRT ?
Is there any test examples available for testing tdma ? In the example/rtmac/rtt directory, i tried testing it with the bellow commands but the client side 'showtime' doesn't print anything.. it is stuck in the line
if (ioctl_rt(tdma, RTMAC_RTIOC_WAITONCYCLE, &wait_on) != 0) {
rt_printk("tdma_wait_sof() failed!");
return;
}
master ----- ./run server 129.94.172.3
client ----- ./run client 129.94.172.190 cycle=100000 sof_sync=rteth0
but if i try running the client with normal rt_task_wait it works fine (of course with quite large jitter)
client ------ ./run client 129.94.172.190 cycle=100000
Is this behavior anything got to do with the change in the 'rtnet' executable ?
Sorry to drop so many problems, but i really need TDMA working for my project
Thanks Bret
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ RTnet-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/rtnet-users

