To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 4006
     
   
Subject: 
brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 29 Apr 2008 09:26:37 GMT
Viewed: 
27153 times
  

Hi

I build allready a bluetooth connection  between the pc and the rcx . The
bluetooth module  (BTM-222) supports the spp serial protocoll only for 4800 or
higher baudrates. But it is  cheap in comparsion to other ones. Costs about 14
Euros.

Look here if you are interested:
http://www.roboternetz.de/phpBB2/zeigebeitrag.php?p=364530&highlight=


The connection between the bt module and the rcx is based on the homemade serial
tower curcuit from
http://www.tik.ee.ethz.ch/~beutel/projects/sada/2002ss_erni_reichmuth_presentation.pdf


Now i tried to compile brickos 090 with the

#define CONF_LNP_FAST                  //!< enable 4800 bps LNP

option in
boot/config.h

under cygwin/XP and download the brickOS.srec with the lego usb tower and
BricxCC to the rcx.


If i want to download a program via BricxCC  or in cygwin using the dll downlaod
i have no success.
I get the usual message: error deleting program .


Then i tried to change the dll for programdownload.

in util/dll-src/config.h

i do the same like in boot/config.h
marked out the 2 slashes //#define CONF_LNP_FAST

#define CONF_LNP_FAST        //!< enable 4800 bps LNP

and recompile the whole stuff

but no success too. Same error with download the program with dll

Now i changed the config.h
in /boot
and
util/dll-src/config.h

back to the original configuration ( //#define CONF_LNP_FAST      )
and recompiled once again.

Downlaod brickOS.srec
and
download a program .
Success as it was before the change.

Does anybody knows a reason for that problem that i canot download a program with the CONF_LNP_FAST   option   ?


Bernhard

   
         
   
Subject: 
Re: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 29 Apr 2008 15:18:58 GMT
Viewed: 
26788 times
  

Hello Powolny,


>
>  I build allready a bluetooth connection  between the pc and the rcx . The
>  bluetooth module  (BTM-222) supports the spp serial protocoll only
for 4800 or
>  higher baudrates. But it is  cheap in comparsion to other ones.
Costs about 14
>  Euros.

sounds interesting...


>  Now i tried to compile brickos 090 with the
>
>  #define CONF_LNP_FAST                  //!< enable 4800 bps LNP
>
>  option in
>  boot/config.h
>  [...]

util/dll-src/config.h
>

and recompile the whole stuff
>
>  but no success too. Same error with download the program with dll

You're trying this still with standard hardware and standard dll-src,
right? Otherwise, check that you use the right baud-rate and parity
settings (4800, no parity bit, 1 start, 1 stop bit).

In my experience the IR-communication doesn't work that well,
especially in 4800 baud mode.  It is mainly the PC that does not
understand the RCX correctly.  Try running dll-src with "-v" to get
more information.  Sometimes the PC receives part of the reply but
there are some broken or missing bytes so the reply is just ignored.

I think LNP_FAST mode is not tested very often. There may also be a
stupid bug in brickOS code that prevents communication.

Regards,
  Jochen Hoenicke

--
Jochen Hoenicke, http://hoenicke.ath.cx/rcx/

   
         
   
Subject: 
Re: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 30 Apr 2008 07:39:07 GMT
Viewed: 
27366 times
  

Hello Jochen

At first i was astonished, that somebody is answering
so fast, because in the last 2 years there is not much conversation here.



You're trying this still with standard hardware and standard dll-src,

I am not completly shure about your question concerning standart HW. I use the
USB Tower and the RCX2.0 for this tests because for the 76 Khz IR-modulation at
the tower and the ir receiver in the rcx.

I use standart sw 090 version.

I activate the CONF_LNP_FAST option in boot/config.h


...
// networking services
//
#define CONF_LNP                        //!< link networking protocol
#define CONF_LNP_FAST                  //!< enable 4800 bps LNP
// Can override with compile-time option
#if !defined(CONF_LNP_HOSTADDR)
#define CONF_LNP_HOSTADDR 0             //!< LNP host address
#endif
....

This change the baudrate, parity and bytetimes in include\lnp\sys\lnp-logical.h

....
#ifdef  CONF_LNP_FAST
#define LNP_LOGICAL_BAUD_RATE   B4800             //!< baud rate
#define LNP_LOGICAL_PARITY  SMR_P_NONE        //!< parity
#define LNP_BYTE_TIME           MSECS_TO_TICKS(3) //!< time to transmit a byte
#else
.....

Intersting is, that for the dll program loader there exists a more or less
eaquel config.h file. Interesting is, that i never have heard something about
that config file on the  internet.

util\dll-src\config.h

Here i have made for testing after i hade no sucess for download the program the
same changes.

....
// networking services
//
#define CONF_LNP    //!< link networking protocol
//#define CONF_LNP_VIS    //!< display LNP activity
#define CONF_LNP_FAST        //!< enable 4800 bps LNP
#define CONF_LNP_HOSTADDR 0x8 //!< LNP host address
#define CONF_LNP_HOSTMASK 0xf0  //!< LNP host mask
....




right? Otherwise, check that you use the right baud-rate and parity
settings (4800, no parity bit, 1 start, 1 stop bit).

In my experience the IR-communication doesn't work that well,
especially in 4800 baud mode.  It is mainly the PC that does not
understand the RCX correctly.  Try running dll-src with "-v" to get
more information.  Sometimes the PC receives part of the reply but
there are some broken or missing bytes so the reply is just ignored.


Now i made the tests.
1) download the changed (4800) kernel to the rcx
2) Send a simple hello program to the rcx and get this :


/brickos-0.9.0_pat48/A_test send_hello_usb.sh


Hary Mahesan - LEGO USB IR Tower Mode

opening tty...
KeepAlive Init...
KeepAliveSend: keeping the IR tower alive...
LNP Initialized...
loader hostaddr=0x00 hostmask=0xf0 portmask=0x00

#time 3913531404 try 0: ack:0
try 1: ack:0
try 2: ack:0
try 3: ack:0
try 4: ack:0
error setting IR mode to far

But now i made a crazy try.
1) load down the original kernel (2400) to the rcx.
and tried to send once again the program with the change in
util\dll-src\config.h == set 4800 baud

and
/brickos-0.9.0_pat48/A_test send_hello_usb.sh


Hary Mahesan - LEGO USB IR Tower Mode

opening tty...
KeepAlive Init...
KeepAliveSend: keeping the IR tower alive...
LNP Initialized...
loader hostaddr=0x00 hostmask=0xf0 portmask=0x00

#time 23948733 f1 03 80 00 00 73
deletef1 03 80 00 00 73
create f1 0a 80 00 00 01 be 40 be 7e be 7e f1
data
#time 228000 f1 03 80 00 00 73

SUCCESS

-----------------------------------------------------
Now i made a filediff from


original

C:\cygwin\brickos-0.9.0_pat48\util\dll.exe  RENAMED to dll2400.exe

compiled with the config.h option (2400)
//#define CONF_LNP_FAST        //!< enable 4800 bps LNP


and the  the second compilation option (4800) of dll with
#define CONF_LNP_FAST        //!< enable 4800 bps LNP

dll.exe    RENAMED to dll4800.exe

There is a difference in the files. I used the Ultraedit for that check.
So i am not shure what it is.

Solutions:

1)Try the old serial tower.
2) Use the hard way : Take a 38 khz IR receiver and check the data with a
osciloscope.
3) try to change the kernel that i  can change baudrate/ paritiy in some timings
at runtime of the rcx.
Hard way stop the taskmanagment , change serial parameters and start once again
the whole LNP stuff.

But however there is guarantie that it works.

Maybe there are other option and i am free for all sugestions.

best regard
Bernhard

   
         
   
Subject: 
Re: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 30 Apr 2008 11:13:53 GMT
Viewed: 
27230 times
  

Hello Jochen

Solutions:

1)Try the old serial tower.


Now i have success !

!) i made to directorys


brickos-0.9.0_orig
with    //#ifdef  CONF_LNP_FAST

in /boot/config.h
and
util/dll-src/config.h

and
brickos-0.9.0_pat48
with      #ifdef  CONF_LNP_FAST
in /boot/config.h
and
util/dll-src/config.h


2) compile all

3) download the 2 brickOS.srec  file to 2 rcx's

4) using now the serial tower

download a program with dll 2400 to rcx using the brickOS.srec 2400
sucess
download a program with dll 4800 to rcx using the brickOS.srec 2400
no sucess

download a program with dll 2400 to rcx using the brickOS.srec 4800
no sucess
download a program with dll 4800 to rcx using the brickOS.srec 4800
no sucess

interesting because i thing there must be a option to change the usb tower to
4800 baud but how ?


best regard
Bernhard

   
         
     
Subject: 
RE: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 30 Apr 2008 11:57:02 GMT
Reply-To: 
<dickswan@NOMORESPAMsbcglobal.net>
Viewed: 
26158 times
  

You should scan for some old posts by either John Barnes or Philo concerning
the different "IR transceiver" chips used between RCX 1.0 and 2.0 and
between serial vs USB towers. As I recall:

Serial tower can only transmit 38 KHz carrier. It's IR receiver is optimized
for 38 KHz.

USB tower can be set to either use 38 or 76 KHz transmission. Depending on
the application you use, the setting for this may not be exposed in an
interface. The IR receiver chip is optimized for 76 KHz carrier.

RCX 1.0 (i.e. the one with AC adaptor jack) uses same 38 KHz receiver as
serial tower. RCX 2.0 uses the same one as in the USB tower.

Due to harmonics, a IR receiver for one of the two carriers will generally
receive the other carrier frequency.

For best operation, you want to use a matched set where the transmitted
carrier frequency is the same as the IR receiver chip.

For completeness, I've tried to also use 9600 baud transmission. It simply
didn't work. The USB tower does not allow specification of this baud rate so
you have to use the serial tower. Unfortunately, it's fixed at a 38 KHz
carrier frequency which is not high enough for reliable transmission at 9600
as receiver chips need to get at least six carrier "cycles" per bit
transmitted.

   
         
   
Subject: 
Re: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 30 Apr 2008 12:50:48 GMT
Viewed: 
26904 times
  

Hello Bernhard,


4) using now the serial tower

download a program with dll 2400 to rcx using the brickOS.srec 2400
sucess
download a program with dll 4800 to rcx using the brickOS.srec 2400
no sucess

download a program with dll 2400 to rcx using the brickOS.srec 4800
no sucess
download a program with dll 4800 to rcx using the brickOS.srec 4800
no sucess

interesting because i thing there must be a option to change the usb tower to
4800 baud but how ?

I just checked the source code.  There is no speed setting for usb
tower in the code.  If you look into firmdl3 you also find that fast
mode is disabled for USB, because it doesn't work. I think the USB
tower sends at 2400 baud and there is no known way to change it.
Remember that 4800 baud mode was never used by the official LEGO
firmware or download programs.

I have no idea how you can change baud rate (is this even possible?)
or carrier frequency on the USB tower.  AFAIK the transmit carrier
frequency on the RCX is set by carrier_init in lnp-logical.c to 38
KHz. If I understand Dick Swan's post  right, one should change it to
76 KHz for RCX 2.0.  I think it should be possible by setting T1_CORA
to 0x0D instead of 0x1A.

Best regards,

  Jochen

--
Jochen Hoenicke, http://hoenicke.ath.cx/rcx/

   
         
   
Subject: 
RE: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 30 Apr 2008 22:36:52 GMT
Reply-To: 
<dickswan@sbcglobal.SPAMCAKEnet>
Viewed: 
28728 times
  

Somewhere in the bowels of the header files within the RCX SDK is a list of
"IODEVICE control commands" which does include description of messages
required to change baud rate on the USB tower. I am assuming you're not
using the LEGO Windows DLL which has an easier interface to use.

It's quite a while since I "played" with this code. But I did have 4800
working fine with USB tower as long as you had the complimentary version of
the RCX. Once I started using AC adaptor RCX version almost exclusively, I
pretty much stopped using it.

The other thing you'll find if you using "fast" download mode and avoiding
the "double byte" transmission is that messages with a significant inbalance
of ones or zeroes won't work so well. There's not enough transitions bit
transitions for the serial port hardware to recover / sync to a proper
clock. I "solved" that particular problem by dynamically adjusting the size
of the download packet if it looked like the bits were "unbalanced". The
header bytes (0x55, 0xFF and 0x00) were enough to periodically allow the
clock syncing.

-----Original Message-----
From: news-gateway@lugnet.com [mailto:news-gateway@lugnet.com] On Behalf Of
Jochen Hoenicke
Sent: Wednesday, April 30, 2008 7:51 AM
To: lugnet.robotics.rcx.legos@lugnet.com
Subject: Re: brickos 090 problem no program download with CONF_LNP_FAST

<<snip>>

I just checked the source code.  There is no speed setting for usb
tower in the code.  If you look into firmdl3 you also find that fast
mode is disabled for USB, because it doesn't work. I think the USB
tower sends at 2400 baud and there is no known way to change it.
Remember that 4800 baud mode was never used by the official LEGO
firmware or download programs.

I have no idea how you can change baud rate (is this even possible?)
or carrier frequency on the USB tower.  AFAIK the transmit carrier
frequency on the RCX is set by carrier_init in lnp-logical.c to 38
KHz. If I understand Dick Swan's post  right, one should change it to
76 KHz for RCX 2.0.  I think it should be possible by setting T1_CORA
to 0x0D instead of 0x1A.

Best regards,

  Jochen

--
Jochen Hoenicke, http://hoenicke.ath.cx/rcx/

   
         
   
Subject: 
Re: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 3 May 2008 08:01:33 GMT
Viewed: 
28571 times
  

.Sorry for the delay

Now i am in italy , triest. so i just do a short look in the messages.

Thanks for the answers.

In meantime i recogmised too that there is no serial baud rate change in the dll
for the usb.

I think i have something at home what i have downloaded in the past from a
japanese webside called like joybrick. I dont remember now exactlly the name and
the features, but. there are a lot of sw adjustments for the usbtower dll like
carrier frequency and so on..

However i can use the old serial tower, but usally i use the notebook and that
new one has only usb devices . Ok however there is a possibility to use the usb
to serial adapter ( if it is 100% compatible)

Ok in short i am back next week on monday so i will take a look at usb tower dll
driver.

by Bernhard

   
         
   
Subject: 
Re: brickos 090 problem no program download with CONF_LNP_FAST
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 3 May 2008 17:19:02 GMT
Viewed: 
28220 times
  

by Bernhard

I have found the  thread,

its in http://news.lugnet.com/robotics/rcx/?n=1825&t=i&v=a

There is a also a 2 thread in
http://www.line.to/mac/MindStorms/JoyBricx/index-e.html

concernig the usb tower dll.
and a c program called
joybricxsrc.zip

I looked short in the header files
LEGOUSBTowerioctl.h

and there is a posibility to set the
speed

#define LT_CAPS_SPEED_BPS_300 LT_SPEED_BPS_300
#define LT_CAPS_SPEED_BPS_600 LT_SPEED_BPS_600
#define LT_CAPS_SPEED_BPS_1200 LT_SPEED_BPS_1200
#define LT_CAPS_SPEED_BPS_2400 LT_SPEED_BPS_2400
#define LT_CAPS_SPEED_BPS_4800 LT_SPEED_BPS_4800
#define LT_CAPS_SPEED_BPS_9600 LT_SPEED_BPS_9600
#define LT_CAPS_SPEED_BPS_19200 LT_SPEED_BPS_19200
#define LT_CAPS_SPEED_BPS_38400 LT_SPEED_BPS_38400

I will see what i can do.

 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR