Ankündigung

Einklappen
Keine Ankündigung bisher.

La Fonera with eibd ft 1.2 serial bus access

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    KNX/EIB La Fonera with eibd ft 1.2 serial bus access

    Hello all,

    I set up a La Fonera Wifi router to run eibd. I now want to connect it to the bus through it's serial interface to a (Merten) ft 1.2 RS232 interface. Up till now, this is the missing part - it isn't working - and I was wondering if anyone else ever managed to connect an ex-router to the bus over a serial interface.

    These are the steps I followed:
    - If you open up the La Fonera 2100, you'll discover 10 pins, of which 4 have to be used to establish a serial connection to the device. The physical interfacing is done through a TTL-RS232 level converter with a MAX3232 chip. You can find some cheap ones on Ebay.
    - The console is connected to the serial port. That is an easy way to flash the La Fonera since SSH is turned off by default.
    - Of course I first flashed the La Fonera and put OpenWrt Kamikaze 7.09 on it. You can find plenty of manuals to do that on the internet.
    - You can then reach the device by SSH, so that the serial connection can be detached from your PC.
    - I installed eibd and all other necessary modules.
    - Comment out the last 3 lines of /etc/inittab and reboot to make sure that the serial connection is not used anymore by the console.

    By doing all this, I assume that some things are working:
    - Before I switched off the console, I could connect the device to my PC (Hyper Terminal) - Baud rate 9600 bits/s. I could send and receive since I can type commands etc.
    - The Merten ft 1.2 interface had been tested before with success by another Debian system. That works like a charm.

    Now the device should be ready to connect to over it's serial port...
    I tried to start eibd with the following command:
    Code:
    eibd -i ft12:/dev/ttyS0 -t1023
    But all I see is:

    Code:
    root@OpenWrt:~# eibd -i ft12:/dev/ttyS0 -t1023
    Layer 1(004D4B18,386D449A) Open
    Layer 1(004D4B18,386D449A) Opened
    Layer 2(004E4EA8,386D449A) Open
    Layer 2(004E4EA8,386D449A) Opened
    Layer 3(004F51D8,386D449A) Open
    Layer 2(004E4EA8,386D449A) OpenL2
    Layer 1(004D4B18,386D449A) SendReset
    Layer 1(004D4B18,386D449A) Send(007): A9 1E 12 34 56 78 9A
    Layer 0(004D4B18,386D449A) Send(004): 10 40 40 16
    Layer 1(004D4B18,386D449A) Send(007): A9 00 18 34 56 78 0A
    Layer 0(004D4B18,386D449A) Send(004): 10 40 40 16
    Layer 0(004D4B18,386D449A) Send(004): 10 40 40 16
    Layer 0(004D4B18,386D449A) Send(004): 10 40 40 16
    Layer 0(004D4B18,386D449A) Send(004): 10 40 40 16
    Layer 0(004D4B18,386D449B) Send(004): 10 40 40 16
    Layer 0(004D4B18,386D449B) Send(004): 10 40 40 16
    Layer 0(004D4B18,386D449B) Send(004): 10 40 40 16
    The last line is repeated forever.

    My serial settings are the following:
    Code:
    root@OpenWrt:~# setserial -a /dev/ttyS0
    /dev/ttyS0, Line 0, UART: 16550A, Port: 0x0000, IRQ: 37
            Baud_base: 5750000, close_delay: 50, divisor: 0
            closing_wait: 3000
            Flags: spd_normal skip_test
    I already tried to set the Baud_rate to 9600, but that doesn't solve anything.

    It seems like my La Fonera can send, but doesn't receive any answer from the ft12 interface. Should I use other serial settings?
    Anyone with an idea?
    Anyone with a similar project who wants to share his/her knowledge about it?

    My objective is to extend the device with Linknx (Linknx | Get Linknx at SourceForge.net) to use it as a low-energy-consuming kind of knx server.

    Thanks a lot!

    Best regards,
    Bart


    PS: I am a fan of FON spots and don't want to make abuse of their cheap device offerings. This La Fonera had a defective Wifi sender and has been replaced, so there's not one Fon less ;-)

    #2
    Zitat von Bart Beitrag anzeigen
    By doing all this, I assume that some things are working:
    - Before I switched off the console, I could connect the device to my PC (Hyper Terminal) - Baud rate 9600 bits/s. I could send and receive since I can type commands etc.
    - The Merten ft 1.2 interface had been tested before with success by another Debian system. That works like a charm.

    My serial settings are the following:
    Code:
    root@OpenWrt:~# setserial -a /dev/ttyS0
    /dev/ttyS0, Line 0, UART: 16550A, Port: 0x0000, IRQ: 37
            Baud_base: 5750000, close_delay: 50, divisor: 0
            closing_wait: 3000
            Flags: spd_normal skip_test
    I already tried to set the Baud_rate to 9600, but that doesn't solve anything.

    It seems like my La Fonera can send, but doesn't receive any answer from the ft12 interface. Should I use other serial settings?
    Anyone with an idea?
    Anyone with a similar project who wants to share his/her knowledge about it?

    The parameters of the serial port (eg. baud rate) are set by eibd.

    In my option, your serial port is somehow broken and write(2) is returning an error.

    Can you please, after you turned off the serial console, connect the serial port to your PC and start there minicom.
    Please check, the you can send with:
    echo "ABC" > /dev/ttyS0
    and receive with
    cat /dev/ttyS0

    Port 0 looks strange, irq of 37 seems to me a little bit unusual.

    Is the kernel detached from the serial console?
    You must seperate the getty program started by init on the serial port with the device used by the kernel to print messages.

    Kommentar


      #3
      Hi,

      I don't know if it can help, but I use a linksys WRT54GS router and I had to add the following line in startup script to have the serial port working:
      /usr/sbin/setserial /dev/tts/1 irq 3

      I use the second serial port (the linksys devices have 2 serial ports).
      Another thing you can check to find the problem. Put a jumper between the RX and TX pins of the 10 pin connector on Fonera's mainboard. Then start eibd and look in the log of eibd if you receive back what you send.
      If you receive it, plug in the RS232 converter and do the same on the other side of the converter.
      If you don't receive it, then the problem is probably on the software side.
      I remember I red something about using the first serial port for something else than console, I'll try to find it back.

      Regards,

      Jean-François

      Kommentar


        #4
        I didn't find back the page, but found this:
        https://forum.openwrt.org/viewtopic.php?id=1767

        Regards,

        Jean-François

        Kommentar

        Lädt...
        X