How-to/tutorial?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
40 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: How-to/tutorial?

homerisback
I checked a few things :
When module isn't connected to car, the audio system is OK in Tech 2 and CDChanger & Telephone are missing, which is logical so far. As soon as the module is connected, CDChanger is OK and audio system starts to appear unstable in Tech 2 (OK, missing, OK and so on...) but functionning correctly unless doesn't "see" the BlueSaab and doesn't allow switching to CDC source.
While module is connected, LEDs seem to have the right behaviour :
Power : ON
CAN1 : very fast blink
CAN2 : rare blink
BT1 & BT2 : flash alternately while waiting for a connection. Only red BT LED flashes when connected : 3 short flashes without music playing ; 1 long flash and 1 short flash when music plays on the phone.

2 of my 3 modules show the same behaviour, the third one won't light any BT LED and isn't discoverable by my phone (RN52 might be uncorrectly soldered or damaged, I presume), while other LEDs have the right behaviour (PWR & CANs).

I noticed that CAN High is connected to green wire and CAN Low to the white wire. Didnt' try to swap them yet or check if colors are the right ones...
I did a little tune on my car that involve VIN number : I swapped my MIU without turbo gauge to one with the turbo needle. To have the turbo needle moving, I had to change my VIN engine letter (from C to G) in DICE. I did divorce then mary again my audio system to keep it working and accept the new VIN. My trionic 7 still have the original VIN in memory, I didn't have to change it to keep the car running... Does the module use VIN to declare itself married to the car and emulate the CDC ?
Apart the Atmega328 which isn't "P" and this tune, I can't find any good resaon for my issue O_o'
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

Re: How-to/tutorial?

Seth
Administrator
CAN H = green.
CAN L = white.

if you're having such intermittent issues...makes me wonder if you have a bad connection somewhere, or maybe one of the crystal resonators isn't soldered (bad solder joint?)...

if you can take pics, feel free to post them or send them to me, i can take a look.

if you have the latest software, 2.1, you should be good there; the timing was adjusted properly.

the software doesn't check the VIN for anything (doesn't need to, doesn't care)...but maybe with you swapping stuff around, there's another issue? dice/twice/ecu having trouble?

the atmega328 and atmega328p are virtually identical, one just has low power mode available, which we're not using, so therefore irrelevant to this project. the only issue that causes is with uploading; the avr upload program likes to match a known chip id, and those 2 chips have different id's. but if you're over that hurdle, then i see no problem there.
NC, USA
Reply | Threaded
Open this post in threaded view
|

Re: How-to/tutorial?

homerisback
Thanks, so CAN wires aren't swapped, good point.
I'll check the resonators solder but they were among the easiest parts to solder, so I'm confident in these through-hole solderings. I'll have a close look at them anyway.

I double checked the software version because it shows "2.0" in Arduino-IDE software, even from the 2.1 zip file.
I only used the Arduino-IDE zip file to flash my 328, is that enough ? Because I saw the other zip file available to download is much bigger. Maybe some code is missing...

No trouble reported in Tech2 with DICE/ECU & friends. I should find a real CDC to lend to check if it works ; maybe the module is OK and the issue is hidden elsewhere !
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

Seth
Administrator

Sounds like it may be an old software issue. Definitely try to get the latest code; it’s posted somewhere here on the (software) forum, and maybe Karlis can chime in when he can; he’s the resident software expert J

 

From: homerisback [via BlueSaab Forum] [mailto:[hidden email]]
Sent: Thursday, March 31, 2016 11:16 AM
To: se4587 <[hidden email]>
Subject: Re: How-to/tutorial?

 

Thanks, so CAN wires aren't swapped, good point.
I'll check the resonators solder but they were among the easiest parts to solder, so I'm confident in these through-hole solderings. I'll have a close look at them anyway.

I double checked the software version because it shows "2.0" in Arduino-IDE software, even from the 2.1 zip file.
I only used the Arduino-IDE zip file to flash my 328, is that enough ? Because I saw the other zip file available to download is much bigger. Maybe some code is missing...

No trouble reported in Tech2 with DICE/ECU & friends. I should find a real CDC to lend to check if it works ; maybe the module is OK and the issue is hidden elsewhere !


If you reply to this email, your message will be added to the discussion below:

http://bluesaab-forum.2349123.n4.nabble.com/How-to-tutorial-tp106p311.html

To start a new topic under BlueSaab Forum, email [hidden email]
To unsubscribe from BlueSaab Forum, click here.
NAML

NC, USA
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
My third module is back to life regarding bluetooth, RN52 chip had a few pins not enough soldered ; solved !
But, I remain stuck at selecting CDC as source in car. I downloaded one again the 2.1 release of Karlis code from Github but, even named 2.1, it displays SAAB-CDC v2.0 Feb 2016 in .ino code. Zip librairies are loaded.
When I do a "verify" in Arduino-IDE, I don't have any error message and the sum up shows "The sketch use 7 234 bytes (22%) of program storage space. Maximum is 32 256 bytes."
By the way, while uploading the code to 328, I got this message "avrdude: warning: cannot set sck period. please check for usbasp firmware update." more as information rather than a blocking message as uploading and verifying the ulpoad goes flawlessly and reports no error.
I tried to get rid of this message by setting (on USBasp) voltage to 5V instead of 3.3V but it's still there. Forums and wikis I read apparently said it doesn't prevent from successful uploads... I'm not enough sharp in chip programming to tell it is true or not, maybe Karlis would confirm or not this info ?

When my phone connects to a module, music over BT volume increases (cannot say if it goes to maximum) but autoplay doesn't start, would that say I'm running 2.0 code ? My Nexus 5 runs Android M latest release 6.0.1.
Didn't have time to revert to original VIN in DICE and try with a kind of virgin setup of CAN comms.

One last thing : today and yesterday morning I connected a module just after a night sleep for my car and CAN leds remained OFF until I started the car. Is there a kind of sleep mode in CAN comms after a time lapse ?
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

Seth
Administrator
No, the can stuff never goes to sleep...must be another problem...

I don't think that code has the timing update...you can dig around in the code and look for a reference to 1000, and make it 950. I think it's in the CDC.cpp file? Karlis would know but I think he was out of town last week.

I'm. It sure that the code is uploading...sounds like it is if it only gives you a warning and not a failure. It should say "uploading", then "reading" or "verifying" after that. And use 5v; I don't think the 3.3 will work...
NC, USA
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

Karlis
Administrator
In reply to this post by homerisback
Ok, there are a couple of issues/checks that I'm seeing.

   - First things first: the code should show "SAAB CDC v2.1 - March 2016" in serial output once it boots up. Just checked up in Github and that's the case.
   - Second thing: please check if you have this line in the startup section of the .ino file: "time.every(CDC_STATUS_TX_TIME, &send_cdc_status_on_time,NULL);". This is the first instance of us sending away status report to IHU.
   - Third thing: check the "Timer definitions" portion of CDC.h file and look for CDC_STATUS_TX_TIME. That value should be set to 950.

Please check this and adjust accordingly and we can take it from here. :)
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
Thanks to both of you for your last answers.
I finally deleted every CDC.zip file I had on my computer to start with a fresh new 2.1 code. That's ok now, it shows 2.1 - March 2016.

I uploaded it in 2 modules but things aren't working till now. I noticed that CAN2 led is much more "active" than under 2.0 code.
As I was pushing CD button frenetically, SID displayed 2 times the expected "CD1" but switched back to radio source within a second and audiosystem didn't have time to play my phone's music. I suspect this audiosystem instability I read on Tech2, as reported previously...

@Karlis, I checked every third things you told me and they are all ok in the 2.1 code I uploaded at last.

I'm going to revert to original VIN and see what's happening... I hope good news !
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
No luck with original VIN and behaviour of audiosystem remains identical : OK without module then erratic (OK/missing) with module connected.
I'm running out of ideas to solve this issue which seems to be a CAN comms problem and have no other car to run tests my 3 unusable modules
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

Seth
Administrator
Maybe you could try changing the can timing from 950 to 900 or even 850...not sure if that will fix it but might be worth trying. Running out of ideas...
NC, USA
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
A few news after deep digging helped by Karlis : my Atmega328 came blank so they were missing the bootloader to work correctly. I eventually succeded in burning the bootloader this evening and then everithing went flawlessly !!
Couldn't believe seeing it worked after so many attempts... To keep me active on this subject, I have a little issue : wheel keys seek+ and seek- don't work with the module...

Many thanks again to Karlis !!
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

Seth
Administrator
have you tried the seek+ & seek- on the IHU and steering wheel? Does the NXT button on steering wheel control the play/pause on your iphone/android? We need to determine if the problem is with the car<->module, or module<->phone. Can you tell us what phone/OS/version you're using?
NC, USA
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
Hi,
I did try the whole keys on both IHU & steering wheel and none of them work with thé module. They however work with audio CD.
I noticed that the only thing my phone does on bluetooth connection is to increase BT audio volume to half of the maximum. When I switch between sources on IHU it never stops playing music and never starts auto-playing on successful connection.

I have a Google Nexus 5 with latest build of Android M (mob30d) installed. No custom or modded build, only basic root access.
I own an old iPhone 4, I will test it tomorrow to see how it works...
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
No more luck with an iPhone 4S under iOS 7 this morning. Music plays properly but no working steering wheel or IHU commands...
SAAB-CDC uploaded into my 328's is version 2.1
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
This post was updated on .
Good news arrived eventually, one module (over 3) work like a charm !
I had to have RN52 & Atmega328 speak @ the same baudrate (i.e. 9600) and since my CDC is fully operational and great pleasure to play with !! Thanks again guys, that's amazing !

My two other modules remain reluctant to give me access to RN52's command mode and as I made lots of attempts with my first module, I can't remember which way worked for it...
I tried via
- RN52 programming code loaded in ATmega328
- UART RX & TX connections with an Arduino-Uno board
- FTDI-USB cable hooked
None of them gives me the magic CMD message to change RN52's settings. I keep on trying and I'm confident it will eventually work.

I read in RN52's datasheet that if GPIO7 pin is set to low (grounded) RN52 works at 9600 bauds, would it be an easy way to deal with these communication issues between chips on the module ?
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

Karlis
Administrator
Yeah, it seems the baudrate mismatch is the culprit in this case again. Starting PCB v3.3 there's a hardware control over it introduced. There are two pins on the back of the PCB which shorted, pull down GPIO7 low thus instructing RN52 to accept comms @ 9600bps.
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
Reply | Threaded
Open this post in threaded view
|

RE: How-to/tutorial?

homerisback
It had a look at PCBs v3.3a and improvements are nice. I'm going to short GPIO7 & GND on one module and see if it solves my problem faster.
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

Re: How-to/tutorial?

Mistah Crowley
In reply to this post by Seth
Hi All,

New to this forum and I wanted to say how excited I was to find it! You all have done some really great work.  I am the proud owner of a 2001 Saab 95 wagon and I've been scheming about a way to add bluetooth functionality. I was about to purchase a kit from SaabAux when I found your site and I would much rather do it myself.

I have an engineering background but with very limited soldering/electronics experience (Chemical Engineering). Any initial advice?  I'll be ordering all of the components soon and I can't wait to get working on it.

Also, are there any tools/equipment you would imagine I'll need besides:

-Basic hand tools
-soldering iron
-multimeter
-Computer with Arduino IDE
Reply | Threaded
Open this post in threaded view
|

Re: How-to/tutorial?

Karlis
Administrator
Hi and welcome to the club! :)

My advice - take your time when soldering the module. Especially the first one. You will need some flux. Be generous with it as it's going to help you a lot. Use a good soldering iron running @ ~350C.

Good luck!
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
sbt
Reply | Threaded
Open this post in threaded view
|

Re: How-to/tutorial?

sbt
Karlis,

While there's a wealth of great info and support in the forum here, I found I missed a few critical steps when building the BlueSaab and installing the code. I've taken the liberty of cloning your SAAB-CDC repo and adding a guide to the wiki.

It's at: https://github.com/sambthompson/SAAB-CDC/wiki

It's still pretty raw, and I have some large gaps still where it comes to alternative tools and versions I didn't use when making my only unit, particularly around versions before 5.0, Xcode and AVR-ISPs.

I'd welcome any feedback from yourself, Seth or anyone here; either here or via github issues. It'd be particularly good to hear from anyone just setting out to build their own BlueSaab, and whether there are gaps in the guide.

I'd hope when it's mature enough you can pull it to your repo as a long term home, and it might be worthy of a link from the "getting started" topic.

Cheers,
Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
12