Page 5 of 5 FirstFirst ... 345
Results 61 to 74 of 74

Thread: Make an expansion board with a serial port(s) for WL-500b/g

  1. #61
    Hallo there,

    I've built a dinky little thing, with a BFP48 packaged TL16C550CPTG4
    datasheet http://www.farnell.com/datasheets/61904.pdf

    It sends chars fine, as the WL500g responds to commands I type, the echoed chars are however corrupted. I'm putting this down to the fact i'm running it from the 13.5MHz source i tapped from the parallel port Interfaces XTAL and the receiving end is not as tolerant as the the WL500G.

    I cant for the life of me find a 13MHz XTAL at a reasonable price and want to use a standard readily available device.

    This raises the question, can I alter the baud factor used by the IC from 7 to 4 and use a 7.3728MHz Device? I read that the value is set by the boot loader. Are the sources available for this so that i can rebuild and reflash it (JTAG??) or can i do this from the kernel files mentioned ? (would seem likely to me).

    Any comments?

    Thanks

    Dan

  2. #62
    Hmm!

    I rebuilt my firmware and flashed with the console=/dev/tts/0 omitted and confirmed it updated by checking dmesg

    zone(0): 4096 pages.
    zone(1): 0 pages.
    zone(2): 0 pages.
    Kernel command line: root=/dev/mtdblock2 noinitrd init=/linuxrc
    CPU: BCM4710 rev 0 at 125 MHz
    Calibrating delay loop... 82.94 BogoMIPS

    Yet there is still a console running on the serial port, well i can still execute commands from the serial port! How do i omit this? Normally i would look in /etc/inittab, but his is nonexistant. I want to talk to PIC with my serial port which in turn will talk to a lcd display and a some controls for volume level etc.

  3. #63
    Join Date
    Sep 2004
    Location
    Austria
    Posts
    125
    Using the first serial port for peripheral devices isn't so simple.
    The bootloader uses it for the boot-messages, the kernel uses it for its messages and there is also a program running, which provides shell access.
    You have only disabled the kernel output.

  4. #64
    Hi, my laptop is less fussy about baud rate and reveals i do indeed have a fully functioning shell on tts/0. I have found what appears to be where the shell is set up in init.c, im going to try fiddling with this to see if i can shift the shell elsewhere.

    What baud does PMON speak at? I've played with various baud rates and cannot get any output, the first thing i see is the kernel output.
    Last edited by mangodan; 02-03-2006 at 22:02.

  5. #65
    Got distracted by the TV, but I found the fix to be surprisingly easy, simply change th kernel boot params to say console=ttyS1 instead of console=ttyS0, this removes the kernel output and the shell , leaving it free for i/o with my PIC.

  6. #66
    Join Date
    Sep 2004
    Location
    Austria
    Posts
    125
    Quote Originally Posted by mangodan
    What baud does PMON speak at? I've played with various baud rates and cannot get any output, the first thing i see is the kernel output.
    115200 baud. Strange - maybe you have a different PMON version?

  7. #67

    Problem whith serial

    I have a uart/driver with a 1.8432MHZ xtal.
    I can see the linux boot process, but I can't get the PMON boot. Neither if I press reset during power up, in this case I didn't get a byte.

    The PC terminal I configure it with:
    setserial /dev/ttyS0 divisor 7
    setserial /dev/ttyS0 spd_cust
    stty speed 38400 < /dev/ttyS0
    To get the custom 16457 baud rate.

    This is what I get:

    CPU revision is: 00024000
    Loading BCM4710 MMU routines.
    Primary instruction cache 8kb, linesize 16 bytes (2 ways)
    Primary data cache 4kb, linesiôe 16 bytes (2 ways)
    Linux version 2.4.20 (root@localhost.localdomain) (gcc version 3.2.3 with Broadcom m4
    Determined physical RAM map:
    memory: 01000000 @ 00000000 (usable)
    On node 0 totalpages: 4096
    ...

    Any ideas?

  8. Hi everybody!

    I've made this expansion board for my WAP54G v1.1 and it works too. I use a "home made" HF generator in order to have the required frequency for the UM82450 since I can't find a 12.750MHz Xtal.

    The only problem is that I can't see anything else than that:

    Code:
    CPU revision is: 00024000
    Loading BCM4710 MMU routines.
    Primary instruction cache 8kb, linesize 16 bytes (2 ways)
    Primary data cache 4kb, linesize 16 bytes (2 ways)
    Linux version 2.4.20 (root@pcnote) (gcc version 3.3.3) #1 Wed Sep 14 05:26:07 CEST 2005
    Determined physical RAM map:
     memory: 00800000 @ 00000000 (usable)
    On node 0 totalpages: 2048
    zone(0): 2048 pages.
    zone(1): 0 pages.
    zone(2): 0 pages.
    Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit noinitrd console=ttyS0,115200
    CPU: BCM4710 rev 0 at 125 MHz
    Calibrating delay loop... 82.94 BogoMIPS
    Memory: 6280k/8192k available (1399k kernel code, 1912k reserved, 100k data, 64k init, 0k highmem)
    Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
    Inode cache hash table entries: 512 (order: 0, 4096 bytes)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
    Checking for 'wait' instruction...  unavailable.
    POSIX conformance testing by UNIFIX
    PCI: Disabled
    PCI: Fixing up bus 0
    Linux NET4.0 for Linux 2.4
    Based upon Swansea University Computer Society NET3.039
    Initializing RT netlink socket
    Starting kswapd
    devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
    devfs: boot_options: 0x1
    JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
    Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher
    pty: 256 Unix98 ptys configured
    Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
    ttyS00 at 0xbf800008 (irq = 2) is a 16450
    PPP generic driver version 2.4.2
    Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
     Amd/Fujitsu Extended Query Table at 0x0040
    number of CFI chips: 1
    cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
    Flash device: 0x200000 at 0x1fc00000
    Physically mapped flash: squashfs filesystem found at block 739
    Creating 5 MTD partitions on "Physically mapped flash":
    0x00000000-0x00040000 : "pmon"
    0x00040000-0x001f0000 : "linux"
    0x000b8fa0-0x0015c7a0 : "rootfs"
    mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
    0x001f0000-0x00200000 : "nvram"
    0x00160000-0x001f0000 : "OpenWrt"
    sflash: chipcommon not found
    NET4: Linux TCP/IP 1.0 for NET4.0
    IP Protocols: ICMP, UDP, TCP, IGMP
    IP: routing cache hash table of 512 buckets, 4Kbytes
    TCP: Hash tables configured (established 512 bind 1024)
    IPv4 over IPv4 tunneling driver
    Linux IP multicast router 0.06 plus PIM-SM
    ip_conntrack version 2.1 (5953 buckets, 5953 max) - 352 bytes per conntrack
    ip_tables: (C) 2000-2002 Netfilter core team
    NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
    NET4: Ethernet Bridge 008 for NET4.0
    Bridge firewalling registered
    802.1Q VLAN Support v1.7 Ben Greear <greearb@candelatech.com>
    All bugs added by David S. Miller <davem@redhat.com>
    cryptoapi: loaded
    VFS: Mounted root (squashfs filesystem) readonly.
    Mounted devfs on /dev
    Freeing unused kernel memory: 64k freed
    I bricked my AP with a bad firmware and now it reboots itself every minute, and I can't upload anything since I don't know which IP my AP is using (it's not the default IP and I can't reset it by pressing the RESET button).

    What can I do to read it's IP from the RS232 terminal?
    Last edited by todd_terry; 14-04-2006 at 19:39.

  9. #69
    According to OpenWRT wiki, this works on any device with the 20pin connector

    Has anyone tried this on the WL-HDD?

  10. #70

    Question

    Quote Originally Posted by futaris View Post
    Has anyone tried this on the WL-HDD?
    Not yet - I would like to, but I've got a question left beforehand: in the
    schematic from Technik, why is CS0 on the UART connected to VCC
    and CS1 to A3? I somehow expected it to be the other way round..

    Floe

  11. #71

    Exclamation

    As a follow-up, I built a circuit based on Technik's schematic, attached it to my WL-HDD and it works

    More details can be found here: OpenWRT Forum

    Florian

  12. #72

    debugging init processes

    If I understood it clearly, there is some option during kernel recompiling. User can choose where the stdout during boot process will be send, right? Can you tell me some hints how is it called? I can try it and write some notes about. It sounds more friendly than building hw UART2RS232 convertor [but it is also a option how to solve this problem].

    Quote Originally Posted by Oleg View Post
    Antiloop: pmon sources are available in wap54g sources (except ASUS modifications).
    Technik: Be patient. The cheaper solution for the modem is the USB modem or USB/COM converter. Also, firmware by default will use first COM port for console, so you need at least another one or recompile the kernel with init string of your choice.

  13. #73
    Hi all

    We're building this thing, using the same chips (16c450) and on the same version of the wl500g. Some questions:

    We read the crystal can also be one of 1.8432 mhz, we're trying it with that one. Does this also operate with the two 39uF condensators?
    And the special baud rate of 16xxx should be used. Is there any Windows tool that can do that? (xp or vista)
    Or do I have to use Linux?

    And do we need to flash it with different firmware (OpenWRT or others) to make it work? I mean, we are gonna put OpenWRT on it eventually but we're trying to make this UART work with the standard firmware.
    I was thinking maybe we should put OpenWRT on it and executing the multiplier/divider rule, on page 3 in this topic to make it easier?

    Oh and the white corner on the WL500g board, with J10 next to it I believe, marks pin 1 right?

    thanks in advance.

  14. #74
    It's working now! With a 1.8432 Mhz crystal!

    And because of the standaard divisor of 7 (which comes to standaard baud rates with a 13 Mhz crystal, not with our 1.8432 mhz one), we are stuck to the baud rate of 16457, just like Artie stated before.
    This is not a problem thanks to Realterm (Windows app) and minicom (Linux app). Apps like Hyperterminal will not work because of the nonstandard baud rate.

    We used different condensators around the crystal, 1 between 10 en 30 pF, and 1 between 40 and 60 pF. See the right datasheet for this, not Technik's drawing.
    We also used different condensators around the max232, not 10mF's but 1mF's like the max232 datasheet mentioned. The circuit was a bit different there, then on Technik's drawing.

    Setserial was nice for debugging (it was included in de package list of OpenWRT, except for the latest version of 7.09, we had to go back to 7.06 to get it)
    It also helped setting the baud rate to a standard one, but this is useless. After a reboot this is gone. And we wanted to see it boot up over the serial cable, so we have to work with the 16457 baud rate.

    Thanks Technik and Artie!
    Last edited by Swing; 07-02-2008 at 22:28.

Page 5 of 5 FirstFirst ... 345

Similar Threads

  1. Howto add serial port to WL-500gx/gp
    By Josephus in forum WL-500g/WL-500gx Tutorials
    Replies: 50
    Last Post: 05-11-2012, 12:32
  2. Use an USB-serial port converter
    By Technik in forum WL-500g/WL-500gx Tutorials
    Replies: 39
    Last Post: 24-04-2012, 11:54
  3. Serial port for WL-500g
    By sveasoft in forum WL-500g Pics & Specs
    Replies: 6
    Last Post: 08-03-2005, 22:39

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •