Skip to main content

[Ubuntu/Windows] nxtOSEK / ticking block of NXT

In Windows 7:

http://www.reddit.com/r/FTC/comments/1vvwq9/for_those_who_have_or_have_had_a_clicking_nxt/

I strongly recommend you to read this article, which really saves my life / 300 Euro!
The critical point is that Windows 7 will automatically recognize the usb plug-in as bossa program, which is not available to excess as a NXT.

All you have to do is to break down your internet and follow the steps in the article.
[Quote]
  1. Plug in clicking nxt to computer
  2. Disable internet connection(very important)
  3. Open Device manager
  4. Under ports you should see Bossa program port, right click on it
  5. uninstall driver, on popup make sure to select delete from system (Don't forget to check the box that deleting all the installed driver)
  6. after uninstalling driver plug nxt into another port
  7. Because bossa driver is missing it should register as nxt brick
  8. Now you can reload Robotc firmware (with offical NXT software or NxTTool whatever)
  9. After firware installed reconnect internet

    Option B:
    1. Make sure the NXT brick is still connected to the computer.
    2. Open an elevated CMD.
    3. Type "cd c:\Windows\inf"
    4. Type "findstr Bossa *.inf"
    5. Note the INF file name in the form of oemxx.inf
    6. Type "rename oemxx.inf oemxx.inf.bak" (Note: please substitute xx with the actual number reported by findstr)
    7. Open Control Panel/Device Manager.
    8. Find the Bossa Program Port device.
    9. Right click the device and select "Uninstall".
    10. Disconnect the NXT brick from the computer, wait a few seconds.
    11. Reconnect the NXT brick to the computer and wait a minute or two for the system to find and install the correct NXT firmware update driver for it.
    12. Open RobotC and proceed with the firmware update.
    13. After the firmware update is done, go back to the CMD and type "rename oemxx.inf.bak oemxx.inf" (Again please substitute xx correspondingly).
In Ubuntu 64bits:

If you follow the nxtOSEK page accordingly, i.e., http://lejos-osek.sourceforge.net/installation_linux.htm, I think you will feel that everything is designed for Windows essentially...
However, if you are a geek as me, you probably suffer yourself with the honor.
That's why I write this quest.
Let's follow the tutorial to upgrade the firmware on NXT with Linux:
-> Install the Enhanced NXT firmware on NXT
The part b will have some issue on libnxt-0.3 as I mention later on.
In part a you will notice that NeXTTool can do everything!!
(Then, why not use it in Linux?)
The way to build up is already mentioned in part 4:
Setup nxtOSEK program upload software with enhanced firmware


In fact, I stuck here whole the day. And finally I figure out how to get rid of it.
(At the meantime, I rage and adopt Windows to handle it, but now I come back)
I have two different path to start: 
  1. libnxt-0.3 to handle the Firmware update (X)
    You may have some issues on the library of usb currently. gcc -o fwflash main_fwflash.o -L. -lusb-1.0 -lnxt ./libnxt.a(lowlevel.o): In function `nxt_init': /home/khchen/development/nxtOSEK/libnxt-0.3/lowlevel.c:49: undefined reference to `usb_init' ...
  2. NeXTTool to handle everything for NxT connection.
    At first I cannot connect to NXT by NeXTTool, I thought there must be some driver issues...
    To test this, please use "lsusb" commend to find a line like:
    Bus 003 Device 064: ID 0694:0002 Lego Group Mindstorms NXT
    If you are stuck in ticking mode so called Samba mode, you will also notice that.

I take the reference from a Japanese blog: (Unfortunately, I find this page very end...)
http://sat0yu.hatenablog.jp/entry/20130318/1363507031
Nowadays, there is no more information about the upgrading of nxtOSEK or even ev3OSEK...
If you are also trying this dirty work, here is some advices:  
  1. Checkout the latest versions of bricxcc from here: (You may notice that most of tutorial are not suitable any more.)
    svn co https://bricxcc.svn.sourceforge.net/svnroot/bricxcc/ bricxcc_new
  2. Please use i386 libusb-dev to pass the compilation of "make -f ./nexttool.mak"
    sudo apt-get install libusb-dev:i386 libusb-0.1-4 subversion fpc
  3. The easiest way to test whether you are able to access NXT. sudo nextool /COM=usb -getname
    NXT01
  4. If you like, you can generate an alias for the built nexttool.
    sudo ln -s ~/development/nxtOSEK/bricxcc-code/nexttool nextool
  5. Don't forget to use "sudo" to get rid of the permission problem, as NeXTTool allows the silent faults which is really fatal.
After resolving all the above issues, now you are able to touch nxtOSEK itself.
Don't forget to extract this http://www.toppers.jp/download.cgi/osek_os-1.1.lzh to the OSEK source tree http://sourceforge.net/projects/lejos-osek/files/nxtOSEK/nxtOSEK_v218.zip/download.

After all, you can compile a specific OSEK example and execute:
sudo nextool /COM=usb -download=RMS.rxe Then you can use NxT standard operations to open the file and see the LOGO and example.

I hope this quest is useful to the one who also concerns the same issues...

Reference:
http://www.legomindstormsrobots.com/lego-minstorms/bricxcc-running-linux-2/
http://lejos-osek.sourceforge.net/installation_linux.htm
http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/GettingStartedLinux.htm


Comments

Popular posts from this blog

RSB+RTEMS 5/6 with QEMU-SMP (ARM realview_pbx_a9_qemu as example)

Since I got a request regarding this blog  written in 2016, summarizing again the complete flow with the latest version of RTEMS could be a good idea. Prepare a suitable workspace according to the adopted operating system on your host ( https://docs.rtems.org/branches/master/user/hosts/index.html ):  sudo apt-get build-dep build-essential gcc-defaults g++ gdb git unzip pax bison flex texinfo unzip python3-dev libpython-dev libncurses5-dev zlib1g-dev Checkout RSB and build: git clone git://git.rtems.org/rtems-source-builder.git rsb change directory to rsb/rtems/ and type ../source-builder/sb-set-builder --prefix=<the path you like to store the built toolchains> <the name of bsp> For example, to use QEMU, I need toolchains for ARM, so: ../source-builder/sb-set-builder --prefix=/home/kh.chen/respository/build/. 6/rtems-arm This will take a while. Please ensure your connection is reliable. Add the built folder into your PATH. For example, you can add one line in ~/.bas...

[ubuntu] Removing the instance/package which is not fully installed from apt-get

When I'm installing g77-3.4 for pgplot, I trivially use dkpg to install it. However, g77-3.4-doc is not able to fully installed. And I stuck for this kind of error due to the broken packages (refer to here ): dpkg: error processing realplayer (--configure/--purge/--remove): (Whatever messages) Errors were encountered while processing: g77-3.4-doc cd /var/lib/dpkg/info sudo rm g77-3.4-doc* sudo dpkg --remove --force-remove-reinstreq g77-3.4-doc Hmm, now apt-get works well again. https://www.youtube.com/watch?v=S9HJ-iAzf3k

[RASP] VirtualBox Raspberry Pi debuging

This article is for the perspective that planning to debug Raspberry Pi connected to (Guest) Ubuntu Virtualbox with USBtoUART and Screen/terminal. There are two important issues that you may face: You cannot detect USB devices: You probably have a permission issue on your Virtual box. Add your user ID to group vboxusers with this command: sudo usermod -a -G vboxusers $USER , log off, log on and try again. http://askubuntu.com/questions/481693/virtualbox-usb-add-device-filter-does-not-work-under-14-04 You cannot listen the ttyUSB0: Your permission of (guest) account should be feasible to the ttyUSB0: sudo gedit /etc/group goto line... dialout:x:20: add your "username" dialout:x:20:username http://askubuntu.com/questions/40959/how-do-i-connect-to-tty-com-dev-ttyusb0 After that, then you can detect the plug-in usb on-the-fly or before open the virtual machine. Then, screen /dev/ttyUSB0 115200 (DON"T FORGET TO INSTALL VIRTUALBOX GUEST ADDITION PAC...