Discussion

[Solved]Can't get ttyS0 working

13 8732
past  
Post Last Edited by tony_zhang at 2014-5-16 12:08

Hi!
I have http://ninjablocks.com/pages/picrust and http://razberry.z-wave.me/
Both are interacting with raspberry over ttyAMA0. I replace AMA0 with S0 in configs.

I have Cubieboard installed on banana, remove getty from boot args, but no sucess
Crust should report
Starting...
Creating LED
{"DEVICE":[{"G":"0","V":0,"D":1000,"DA":"000000"}]}
to uart, but i get only ���������������������� with serialRead  from WiringCB.

How to get it working?
past  
z-way reporting:
[2010-01-01 03:00:08.358] Opened device: /dev/ttyS0
[2010-01-01 03:00:08.359] Worker thread successfully created
[2010-01-01 03:00:08.363] Worker thread entry point
[2010-01-01 03:00:08.370] Adding job: Get controller info and supported function classes
[2010-01-01 03:00:08.379] SENDING (cb 0x07): ( 01 03 00 07 FB )
[2010-01-01 03:00:08.562] Job 0x07 (Get controller info and supported function classes): No ACK received before timeout
[2010-01-01 03:00:08.573] SENDING (cb 0x07): ( 01 03 00 07 FB )
[2010-01-01 03:00:08.760] Job 0x07 (Get controller info and supported function classes): No ACK received before timeout
[2010-01-01 03:00:08.772] SENDING (cb 0x07): ( 01 03 00 07 FB )
[2010-01-01 03:00:08.954] Job 0x07 (Get controller info and supported function classes): No ACK received before timeout
[2010-01-01 03:00:08.955] Job 0x07 (Get controller info and supported function classes) dropped: too many resends
[2010-01-01 03:00:08.955] Job 0x07 (Get controller info and supported function classes): fail
[2010-01-01 03:00:08.955] Get Serial API Capabilities returned zero.
[2010-01-01 03:00:08.955] Removing job: Get controller info and supported function classes
[2010-01-01 03:00:08.965] Worker thread exit point
[2010-01-01 03:00:08.965] Worker thread successfully finished

Reply 2# past

It can be working now???

past  
No, what should i do?

You are using WiringPi???

Do you modify the wiringPi? The wiringPi current can not be used for Banana Pi directly.

past  
Post Last Edited by past at 2014-5-15 11:52

I use serialRead  from  http://forum.lemaker.org/viewthr ... &extra=page%3D1 only to test what coming from tty.
Kernel version is 3.4.61.A20.bananapi.v02

cu experiments:
cu -s 115200 -l /dev/ttyS0
Connected.

and nothing more.

past  
Need I do some magic with script.fex?

past  
Post Last Edited by past at 2014-5-15 23:19

So, to get P08 and P10 on CON3 to tx and rx for ttyS0 i need have in script.fex:
  1. [uart_para0]
  2. uart_used = 1
  3. uart_port = 0
  4. uart_type = 2
  5. uart_tx = port:PH00<2><1><default><default>
  6. uart_rx = port:PH01<2><1><default><default>
Copy the Code
?

past  
gpio readall print
  1. +----------+-Rev2-+------+--------+------+-------+
  2. | wiringPi | GPIO | Phys | Name   | Mode | Value |
  3. +----------+------+------+--------+------+-------+
  4. |      1   |  96  |  12  | GPIO 1 | IN   | Low   |
  5. |      3   |  98  |  15  | GPIO 3 | IN   | Low   |
  6. |      4   |  97  |  16  | GPIO 4 | IN   | Low   |
  7. |      5   | 100  |  18  | GPIO 5 | IN   | Low   |
  8. |      6   |  99  |  22  | GPIO 6 | IN   | Low   |
  9. |      7   | 102  |   7  | GPIO 7 | IN   | Low   |
  10. |      8   | 101  |   3  | SDA    | IN   | Low   |
  11. |     10   | 103  |  24  | CE0    | IN   | Low   |
  12. |     11   | 105  |  26  | CE1    | IN   | Low   |
  13. |     12   | 104  |  19  | MOSI   | IN   | Low   |
  14. |     13   | 107  |  21  | MISO   | IN   | Low   |
  15. |     14   | 106  |  23  | SCLK   | IN   | Low   |
  16. |     15   | 109  |   8  | TxD    | IN   | Low   |
  17. |     16   | 108  |  10  | RxD    | IN   | Low   |
  18. |     17   | 111  |   3  | GPIO 8 | IN   | Low   |
  19. |     18   | 110  |   4  | GPIO 9 | IN   | Low   |
  20. |     19   | 112  |   5  | GPIO10 | IN   | Low   |
  21. |     21   | 114  |   0  | IN   | IN   | Low   |
  22. |     22   | 113  |   0  | OUT  | IN   | Low   |
  23. |     23   | 116  |   0  | ALT5 | IN   | Low   |
  24. |     24   | 115  |   0  | ALT4 | IN   | Low   |
  25. |     25   | 118  |   0  | ALT0 | IN   | Low   |
  26. |     26   | 117  |   0  | ALT1 | IN   | Low   |
  27. |     27   | 123  |   0  | ALT2 | IN   | Low   |
  28. |     28   | 119  |   0  | ALT3 | IN   | Low   |
Copy the Code

You have to log in before you can reply Login | Sign Up

Points Rules