me-no-dev / RasPiArduino

Arduino Framework for RaspberryPI
333 stars 75 forks source link

Serial on PI2B using PIXEL version of Raspian #54

Open thebreadboard opened 7 years ago

thebreadboard commented 7 years ago

Tried the RasPiArduino on a Pixel version of Raspbian and it fails every time I try to use the ttl serial (Pins 8,10). I2C and Digital IO still seems to be ok.

I reverted back to Raspbian from about may 2016 and everything worked great so it looks like the RPI folks have changed something.

thebreadboard commented 7 years ago

I tried to reproduce a working serial on the May "Raspbian" and also did further tests on a PIXEL version. If I use Node-red and access the serial on pins 8/10 everything works ok. (Using Node-Red serial module) The second I run a sketch that tries to use the serial.println.... it stops working, even if i kill the arduino sketch and try the node-red again, it still does not work. The sketch does not write to the serial ttl pins. If i look in the run/sketch log it shows the text that was supposed to go out the serial.

If I run the resulting bin file directly from a command prompt on the PI it outputs the serial to the console, not the ttyAMA... port.

I have to reboot to get the node-red tty access working again, simply stopping the sketch is not enough

I also tried this on the earlier version of Raspbian again, I must have done something off the first time around and made it work, but following the instructions on a new PI2 and New imaged SD card, it does the same thing as with the PIXEL version of raspbian. I do not recall what I did the first time but the raspbian image had other installs tried to get an arduino sketch to run prior to using this version so it is possible one of them had changed something. Using a brand new SD image this process fails with the serial, and as Pete Scargill has reported, there are other stability issues needing to be addressed.

I hope you can fix this as I was hoping to use this version of RasPiArduino in my training videos on my youtube channel.

me-no-dev commented 7 years ago

All you explain is really really strange. This lib talks to the Serial directly, bypassing any kernel or other code. Thera must be a race somewhere with the drivers or something, but even then there should be garbage on the serial rather than the failures you explain. I have been so preoccupied with work that I didn't even know there is a PIXEL version of raspbian?

I'll grab pi3 these days and run through the setups again. Which PI do you use by the way?

thebreadboard commented 7 years ago

I am using a Raspberry PI 2, model B V1.1

I get same issue with Pixel version and with May 2016 version of the OS. Also once the app finishes it does not restore the serial chip back to operation from the serial0 or ttyAMA0 unless I reboot the OS.

Thanks for the help, this looks like a great implementation, I would just love for the serial to work.

Peter

From: Me No Dev [mailto:notifications@github.com] Sent: November 23, 2016 4:32 AM To: me-no-dev/RasPiArduino RasPiArduino@noreply.github.com Cc: Peter peter@thebreadboard.ca; Author author@noreply.github.com Subject: Re: [me-no-dev/RasPiArduino] Serial on PI2B using PIXEL version of Raspian (#54)

All you explain is really really strange. This lib talks to the Serial directly, bypassing any kernel or other code. Thera must be a race somewhere with the drivers or something, but even then there should be garbage on the serial rather than the failures you explain. I have been so preoccupied with work that I didn't even know there is a PIXEL version of raspbian?

I'll grab pi3 these days and run through the setups again. Which PI do you use by the way?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/me-no-dev/RasPiArduino/issues/54#issuecomment-262467443 , or mute the thread https://github.com/notifications/unsubscribe-auth/AHlxOl_f99XsvH1oSxDmw2pVD19UvE_Iks5rBAgbgaJpZM4K6LrX . https://github.com/notifications/beacon/AHlxOpS89O5kpl2r3WUk3JKD3a6oaQEQks5rBAgbgaJpZM4K6LrX.gif

thebreadboard commented 7 years ago

PI 2 and PI 3, same issue

me-no-dev commented 7 years ago

So I got some PIXEL goodness on pi Zero and in raspi-config -> advanced there was an option to disable the serial console, which made the rest work fine. Can you try that?

thebreadboard commented 4 years ago

What adapter are you trying to use. I have used some in the past with no issues.

Regards

Peter

From: someMEXICANz [mailto:notifications@github.com] Sent: April 8, 2020 5:55 AM To: me-no-dev/RasPiArduino RasPiArduino@noreply.github.com Cc: Peter peter@thebreadboard.ca; Author author@noreply.github.com Subject: Re: [me-no-dev/RasPiArduino] Serial on PI2B using PIXEL version of Raspian (#54)

I could use some help, I'm working with a RPI4 with the latest raspbian and I'm been trying to get serial to run properly when using a serial to USB adapter. Everything seems to work fine up until I try to monitor it via Arduino serial monitor or putty, it will output backwards question marks and random characters. I've made sure baud rates are set properly and tried different speeds. If I send data from the monitor nothing shows and serial.read() spits out a -1, so no data. Maybe I'm missing a step, but the issue seemed similar to this thread any help would be much appreciated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/me-no-dev/RasPiArduino/issues/54#issuecomment-610865263 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4XCORVMNYXT5BLIBBWJDDRLRCXZANCNFSM4CXIXLLQ . https://github.com/notifications/beacon/AB4XCOTSAV2FR2CVOT4GC5DRLRCXZA5CNFSM4CXIXLL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOERURA3Y.gif

thebreadboard commented 4 years ago

So here are some questions

The USB to serial adapter is plugged in the PC or the PI ??

The Serial end is going to the PI RX/TX pins on the GPIO header of the PI or to the TX/RX of the Arduino ??

Your connecting the Arduino to the PI ?

I guess what im asking is how is this all connected, a quick diagram with pins used would help

Some things to note

When you connect one serial to the other, you need to cross the TX and RX, so TX of one goes to RX of the other

The Arduino is a 5V device, the PI is a 3V3, what is the voltages coming out of the USB adapter TX pin ?

Regards

Peter

From: someMEXICANz [mailto:notifications@github.com] Sent: April 12, 2020 2:20 PM To: me-no-dev/RasPiArduino RasPiArduino@noreply.github.com Cc: Peter peter@thebreadboard.ca; Author author@noreply.github.com Subject: Re: [me-no-dev/RasPiArduino] Serial on PI2B using PIXEL version of Raspian (#54)

This is the one

http://www.dsdtech-global.com/2017/07/dsd-tech-usb-to-ttl-serial-converter.html?m=1

Thanks,

On Sun, Apr 12, 2020, 10:57 AM Peter <notifications@github.com mailto:notifications@github.com > wrote:

What adapter are you trying to use. I have used some in the past with no issues.

Regards

Peter

From: someMEXICANz [mailto:notifications@github.com] Sent: April 8, 2020 5:55 AM To: me-no-dev/RasPiArduino <RasPiArduino@noreply.github.com mailto:RasPiArduino@noreply.github.com > Cc: Peter <peter@thebreadboard.ca mailto:peter@thebreadboard.ca >; Author <author@noreply.github.com mailto:author@noreply.github.com > Subject: Re: [me-no-dev/RasPiArduino] Serial on PI2B using PIXEL version of Raspian (#54)

I could use some help, I'm working with a RPI4 with the latest raspbian and I'm been trying to get serial to run properly when using a serial to USB adapter. Everything seems to work fine up until I try to monitor it via Arduino serial monitor or putty, it will output backwards question marks and random characters. I've made sure baud rates are set properly and tried different speeds. If I send data from the monitor nothing shows and serial.read() spits out a -1, so no data. Maybe I'm missing a step, but the issue seemed similar to this thread any help would be much appreciated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/me-no-dev/RasPiArduino/issues/54#issuecomment-610865263> , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4XCORVMNYXT5BLIBBWJDDRLRCXZANCNFSM4CXIXLLQ> . < https://github.com/notifications/beacon/AB4XCOTSAV2FR2CVOT4GC5DRLRCXZA5CNFSM4CXIXLL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOERURA3Y.gif>

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/me-no-dev/RasPiArduino/issues/54#issuecomment-612653257, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDI3WQQAQ7ABT55ZLBUY6LRMH6HXANCNFSM4CXIXLLQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/me-no-dev/RasPiArduino/issues/54#issuecomment-612656129 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4XCOSMVNMQKUA3EEUAK2DRMIA5PANCNFSM4CXIXLLQ . https://github.com/notifications/beacon/AB4XCOQ34WY5N6TOS4536BTRMIA5PA5CNFSM4CXIXLL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOESCGIAI.gif