Menu

bluetooth serial communication / mobile phone

Help
Mammon
2009-04-27
2013-04-29
  • Mammon

    Mammon - 2009-04-27

    Hello,

    I am trying to write a nxtOSEK program controlled from my mobile phone (windows mobile-based).

    I started by developping a phone side application that will open a serial communication, and I use game pad sample as nxtOSEK program to connect to.
    I launch the sample on the NXT, connect to the brick from the mobile phone via bluetooth, and create a COM port, then run my program.
    But when my program opens the correct COM port, I got a failure ("COM2:" does not exist). I tried using .NET API System.IO.Ports.SerialPort class, then win32 API CreateFile. In the first case, Open() throws an exception, in the other case CreateFile fails.

    I think something is missing on nxtOSEK side and/or windows mobile side because the same application that fails to open the serial port when running the game pad sample :
    - successfully opens a serial port created on my PC,
    - successfully opens the NXT serial port when in "standard" firmware

    In both situations, the Open or CreateFile calls succeed, and the "<>" symbol is displayed on the NXT.
    I should add that when running same code compiled for PC, everything is working in all situations.

    I also tried to run NxtNet sample application, it certainly uses SerialPort class because I get the same error message when trying to connect to the brick.

    Has anyone encountered the same problem or knows a workaround ?

    nxtOSEK is great great work !

    -- Best regards --

     
  • Krzysztof

    Krzysztof - 2013-02-27

    Hi,
    I have problem with communication between my analog game pad with nxt brick when I use NxtGamePad sample.
    Maybe someone can help me, please!!!Maybe @m4mmon ??

     

Log in to post a comment.