This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
serial modem gprs ttys0?
#1
hello;  --jayson again.
This question is concerning /dev/tty* and serial uart 1-4 on the tinker board.
i have gone to:
sudo tinker-config
enabled serial without console on what appears to be uart3
configured ppp and:
as name gprs and as ttys0
pon gprs
sudo ifup gprs 
and it says "gprs was configured with pon"
so
sudo ifconfig
but no gprs interface despite configuring /etc/network/interfaces
so
sudo apt-get install wvdial
and
sudo wvdialconf
and it says
no serial device on 1-4???
please help with my serial uart...
Reply
#2
You should post your configuration files. There might be some oversights. The more reviews the less errors Wink
Reply
#3
hello......here are mynecessary files for a ppp gprs connection named gprs.

######################

cd /etc/ppp/
sudo nano /etc/ppp/peers/gprs

#paste below
Code:
[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]#enter apn ****[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T ****"[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]/dev/ttyS0[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]115200[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]noipdefault[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]usepeerdns[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]defaultroute[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]persist[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]noauth[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]nocrtscts[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]local[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]#Optional, make it always appear as ppp2:[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]#unit 2[/font][/size][/color]
sudo nano /etc/chatscripts/gprs
#paste below
Code:
[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]ABORT BUSY ABORT VOICE ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT "NO DIAL TONE" ABORT "NO ANSWER" ABORT "DELAYED" ABORT "ERROR"[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]ABORT "+CGATT: 0"[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]"" AT TIMEOUT 12 OK ATH OK ATE1[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]#enter pin[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]OK "AT+CPIN=1234"[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]OK AT+CFUN=1[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]OK AT+CGDCONT=1,"IP","\T","",0,0 OK ATD*99# TIMEOUT 22 CONNECT ""[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]

sudo nano /etc/networking/interfaces
#paste below

Code:
#auto lo
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]iface gprs inet ppp[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]provider gprs[/font][/size][/color]
[color=#24292e][size=small][font=-apple-system, BlinkMacSystemFont,]


bring }t up...

sudo pppd call gprs
sudo pon gprs
sudo ifup gprs

here is some interesting info.....
linaro@tinkerboard:~$ cat /var/log/syslog | grep chat


Aug  2 20:04:02 tinkerboard chat[2222]: abort on (BUSY)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (VOICE)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (NO CARRIER)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (NO DIALTONE)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (NO DIAL TONE)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (NO ANSWER)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (DELAYED)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (ERROR)
Aug  2 20:04:02 tinkerboard chat[2222]: abort on (+CGATT: 0)
Aug  2 20:04:02 tinkerboard chat[2222]: send (AT^M)
Aug  2 20:04:02 tinkerboard chat[2222]: warning: write() on stdout returned 0
Aug  2 20:04:02 tinkerboard chat[2222]:  -- write failed: SuccessAug  2 20:04:02 tinkerboard chat[2222]: Failed
Binary file (standard input) matches
linaro@tinkerboard:~$ setserial -g /dev/ttyS[0123]
/dev/ttyS0, UART: 16550A, Port: 0x0000, IRQ: 38
/dev/ttyS1, UART: 16550A, Port: 0x0000, IRQ: 39
/dev/ttyS2, UART: 16550A, Port: 0x0000, IRQ: 40
/dev/ttyS3, UART: 16550A, Port: 0x0000, IRQ: 41
linaro@tinkerboard:~$
linaro@tinkerboard:~$ sudo cat /proc/tty/driver/serial           serinfo:1.0 driver revision:
0: uart:16550A mmio:0xFF180000 irq:38 tx:32283 rx:4378 brk:1 CTS
1: uart:16550A mmio:0xFF190000 irq:39 tx:0 rx:0
2: uart:16550A mmio:0xFF690000 irq:40 tx:0 rx:0
3: uart:16550A mmio:0xFF1B0000 irq:41 tx:0 rx:0
4: uart:16550A mmio:0xFF1C0000 irq:42 tx:0 rx:0
linaro@tinkerboard:~$
linaro@tinkerboard:~$ sudo wvdialconf                            Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 --
....where im at....
Reply
#4
It seems that ttyS0 has worked for some Kbytes.
So you might try to exclude the GPRS module for a while and try to loopback the TX with the RX, then open a terminal (like mincom/picocom) and try if your typing is coming back. If that works. Perhaps it takes to test all ttySx.
Try to connect your module and try some "AT command", to see if it's answering.
Later you might try wvdial, when the module did answer.
Reply
#5
linaro@tinkerboard:~$ sudo socat - /dev/ttyS0                   
ATI
^Z
[4]+  Stopped                 sudo socat - /dev/ttyS0           
linaro@tinkerboard:~$
should have said sim808....well i was hopeful.....

now minicom...

Welcome to minicom 2.7

OPTIONS: I18n                                                    Compiled on Apr 22 2017, 09:14:19.                               Port /dev/ttyS0, 13:17:12                                        Press CTRL-A Z for help on special keys                          




CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7 | VT102 | Off



no at input...,,

and finally..,,a new readout....dmesg
linaro@tinkerboard:~$ dmesg | grep tty
[    0.003751] console [tty0] enabled
[    2.149762] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 38, base_baud = 1500000) is a 16550A
[    2.151070] ff190000.serial: ttyS1 at MMIO 0xff190000 (irq = 39, base_baud = 1500000) is a 16550A
[    2.152244] ff690000.serial: ttyS2 at MMIO 0xff690000 (irq = 40, base_baud = 1500000) is a 16550A
[    2.153458] ff1b0000.serial: ttyS3 at MMIO 0xff1b0000 (irq = 41, base_baud = 1500000) is a 16550A
[    2.154769] ff1c0000.serial: ttyS4 at MMIO 0xff1c0000 (irq = 42, base_baud = 1500000) is a 16550A
[    9.429162] ttyS0 - failed to request DMA
[    9.716398] ttyS1 - failed to request DMA
[    9.736617] ttyS2 - failed to request DMA
[    9.747080] ttyS3 - failed to request DMA
[    9.764309] ttyS4 - failed to request DMA
linaro@tinkerboard:~$

linaro@tinkerboard:~$ sudo socat - /dev/tty0
ATI


=blank...no response,,,,my modem will tick the blue and red leds like a clock.
Reply
#6
btw.....i didnt fizzle with the tx rx again. if you plug them in forwards which is backwards it works.....but in the wrong way uh....it will get loud and be bad for the hardware.
Reply
#7
also, i now have correct wiring: vio to pin 4 ; 5v, gnd to gnd:pin6, key to gnd -pin14 and . rx on the modem to tx on the asus-pin8; and tx onthe modem to rx on asus pin 10.....,right?

my continuation of posts is strange..,and has been surprisingly descriptly differrent throughout ithink..so here is another dmesg.,,,,from earlier. but now with the right wires.  i hope nothing frizzied. it is still blinking blue and red on time.

linaro@tinkerboard:~$
linaro@tinkerboard:~$  dmesg | grep tty
[    0.003785] console [tty0] enabled
[    2.150212] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 38, base_baud = 1500000) is a 16550A
[    2.151511] ff190000.serial: ttyS1 at MMIO 0xff190000 (irq = 39, base_baud = 1500000) is a 16550A
[    2.152679] ff690000.serial: ttyS2 at MMIO 0xff690000 (irq = 40, base_baud = 1500000) is a 16550A
[    2.153900] ff1b0000.serial: ttyS3 at MMIO 0xff1b0000 (irq = 41, base_baud = 1500000) is a 16550A
[    2.155199] ff1c0000.serial: ttyS4 at MMIO 0xff1c0000 (irq = 42, base_baud = 1500000) is a 16550A
[    9.231773] ttyS0 - failed to request DMA
[    9.624619] ttyS1 - failed to request DMA
[    9.634377] ttyS2 - failed to request DMA
[    9.644926] ttyS3 - failed to request DMA
[    9.665100] ttyS4 - failed to request DMA
[   54.167755] [<c05917e8>] (uart_set_termios) from [<c057d934>] (tty_set_termios+0x174/0x1d4)
[   54.167773] [<c057d934>] (tty_set_termios) from [<c057e0bc>] (set_termios+0x354/0x3a8)
[   54.167790] [<c057e0bc>] (set_termios) from [<c057e33c>] (tty_mode_ioctl+0x1d0/0x518)
[   54.167807] [<c057e33c>] (tty_mode_ioctl) from [<c057e788>] (n_tty_ioctl_helper+0x104/0x110)
[   54.167824] [<c057e788>] (n_tty_ioctl_helper) from [<c057a5d0>] (n_tty_ioctl+0x140/0x148)
[   54.167840] [<c057a5d0>] (n_tty_ioctl) from [<c0578874>] (tty_ioctl+0xcc0/0xd14)
[   54.167859] [<c0578874>] (tty_ioctl) from [<c0245414>] (do_vfs_ioctl+0x5b0/0x690)
[   55.918894] [<c05917e8>] (uart_set_termios) from [<c057d934>] (tty_set_termios+0x174/0x1d4)
[   55.918912] [<c057d934>] (tty_set_termios) from [<c057e0bc>] (set_termios+0x354/0x3a8)
[   55.918929] [<c057e0bc>] (set_termios) from [<c057e33c>] (tty_mode_ioctl+0x1d0/0x518)
[   55.918946] [<c057e33c>] (tty_mode_ioctl) from [<c057e788>] (n_tty_ioctl_helper+0x104/0x110)
[   55.918963] [<c057e788>] (n_tty_ioctl_helper) from [<c057a5d0>] (n_tty_ioctl+0x140/0x148)
[   55.918979] [<c057a5d0>] (n_tty_ioctl) from [<c0578874>] (tty_ioctl+0xcc0/0xd14)
[   55.918998] [<c0578874>] (tty_ioctl) from [<c0245414>] (do_vfs_ioctl+0x5b0/0x690)
[   57.662717] [<c05917e8>] (uart_set_termios) from [<c057d934>] (tty_set_termios+0x174/0x1d4)
[   57.662735] [<c057d934>] (tty_set_termios) from [<c057e0bc>] (set_termios+0x354/0x3a8)
[   57.662752] [<c057e0bc>] (set_termios) from [<c057e33c>] (tty_mode_ioctl+0x1d0/0x518)
[   57.662769] [<c057e33c>] (tty_mode_ioctl) from [<c057e788>] (n_tty_ioctl_helper+0x104/0x110)
[   57.662786] [<c057e788>] (n_tty_ioctl_helper) from [<c057a5d0>] (n_tty_ioctl+0x140/0x148)
[   57.662803] [<c057a5d0>] (n_tty_ioctl) from [<c0578874>] (tty_ioctl+0xcc0/0xd14)
[   57.662821] [<c0578874>] (tty_ioctl) from [<c0245414>] (do_vfs_ioctl+0x5b0/0x690)
[   59.400423] [<c05917e8>] (uart_set_termios) from [<c057d934>] (tty_set_termios+0x174/0x1d4)
[   59.400441] [<c057d934>] (tty_set_termios) from [<c057e0bc>] (set_termios+0x354/0x3a8)
[   59.400458] [<c057e0bc>] (set_termios) from [<c057e33c>] (tty_mode_ioctl+0x1d0/0x518)
[   59.400476] [<c057e33c>] (tty_mode_ioctl) from [<c057e788>] (n_tty_ioctl_helper+0x104/0x110)
[   59.400493] [<c057e788>] (n_tty_ioctl_helper) from [<c057a5d0>] (n_tty_ioctl+0x140/0x148)
[   59.400510] [<c057a5d0>] (n_tty_ioctl) from [<c0578874>] (tty_ioctl+0xcc0/0xd14)
[   59.400528] [<c0578874>] (tty_ioctl) from [<c0245414>] (do_vfs_ioctl+0x5b0/0x690)
linaro@tinkerboard:~$
[-] The following 1 user Likes lftr's post:
  • lftr
Reply
#8
after rebooting again,
linaro@tinkerboard:~$ sudo socat - /dev/ttyS0
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������A��������T������I�������������
���������������������������������������������^Z
[2]+ Stopped sudo socat - /dev/ttyS0
and this.
linaro@tinkerboard:~$ sudo cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0xFF180000 irq:38 tx:32320 rx:8201 fe:18 RTS|CTS|DTR
1: uart:16550A mmio:0xFF190000 irq:39 tx:38 rx:0
2: uart:16550A mmio:0xFF690000 irq:40 tx:38 rx:0
3: uart:16550A mmio:0xFF1B0000 irq:41 tx:38 rx:0
4: uart:16550A mmio:0xFF1C0000 irq:42 tx:38 rx:0
linaro@tinkerboard:~$
Reply
#9
For courtesy and readability I invite you to edit your posts. Use [code] for your listing.
I presume that ttyS0 is not accessible from outside. As you may note the GPIO details there's no UART0 Tongue.
ftr Wrote:also, i now have correct wiring: vio to pin 4 ; 5v, gnd to gnd:pin6, key to gnd -pin14 and . rx on the modem to tx on the asus-pin8; and tx onthe modem to rx on asus pin 10
I suppose that is for UART1, so why not trying on /dev/ttyS1 ?


So you might try a hardware test as above mentioned, using a jumper between TX and RX. In case you see a reply in the terminal, then you found a working one.

EDIT
I've tried for myself and I have to agree that I did not find the serial ports.
I'll carry out further investigation, because I'd like to see what is doing during boot time Wink

EDIT2
DietPI, tried ttYS1 with positive result, by using a jumper on TX-RX pins. I suppose that depends on which OS is working on.
[-] The following 1 user Likes Im4Tinker's post:
  • lftr
Reply
#10
ok.., still working for it.

linaro@tinkerboard:~$ sudo nano /boot/extlinux/extlinux.conf
  GNU nano 2.7.4               File: /boot/extlinux/extlinux.conf                         
label kernel-4.4
    kernel /zImage
    fdt /rk3288-miniarm.dtb
    append earlyprintk quiet splash plymouth.ignore-serial-consoles console=ttyS0,115200n$


linaro@tinkerboard:~$ sudo dmesg | grep tty
[    0.000000] Kernel command line: earlyprintk quiet splash plymouth.ignore-serial-consoles console=ttyS0,115200n8 rw init=/sbin/init uboot_version=2017.07-g879646d1d6 root=/dev/mmcblk0p2
[    2.149469] console [ttyS0] disabled
[    2.149547] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 38, base_baud = 1500000) is a 16550A
[    2.161085] console [ttyS0] enabled
[    2.162396] ff190000.serial: ttyS1 at MMIO 0xff190000 (irq = 39, base_baud = 1500000) is a 16550A
[    2.163692] ff690000.serial: ttyS2 at MMIO 0xff690000 (irq = 40, base_baud = 1500000) is a 16550A
[    2.164829] ff1b0000.serial: ttyS3 at MMIO 0xff1b0000 (irq = 41, base_baud = 1500000) is a 16550A
[    2.166112] ff1c0000.serial: ttyS4 at MMIO 0xff1c0000 (irq = 42, base_baud = 1500000) is a 16550A
[    7.786432] ttyS0 - failed to request DMA
[    9.677707] ttyS1 - failed to request DMA
[    9.691364] ttyS2 - failed to request DMA
[    9.702737] ttyS3 - failed to request DMA
[    9.709953] ttyS4 - failed to request DMA
linaro@tinkerboard:~$ setserial -g /dev/ttyS[0123]
/dev/ttyS0: Permission denied
/dev/ttyS1, UART: 16550A, Port: 0x0000, IRQ: 39
/dev/ttyS2, UART: 16550A, Port: 0x0000, IRQ: 40
/dev/ttyS3, UART: 16550A, Port: 0x0000, IRQ: 41
linaro@tinkerboard:~$
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)