maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Accessories (https://talk.maemo.org/forumdisplay.php?f=17)
-   -   [Announce]N900 Intergrated Qi Wireless Charging, No Soldering Required. (https://talk.maemo.org/showthread.php?t=93412)

biketool 2014-07-03 07:05

[Announce]N900 Integrated Qi Wireless Charging, No Soldering Required.
 
If you find an add-on Qi charger which fits the N900 and has shorted data pins please post your source to this thread!!
A description of how to modify an inexpensive Qi universal microUSB type B plug equipped wireless inductive charge receiver's data pins to interface with N900 charging circuitry(and also how to install Pali's new BME to avoid the hardware mod, additionally a pair of script based module driver swap and return to normal as a software work around the need for shorted pins or the need to install KernelPower or CSSU) and installation of the receiver into or onto a Mugen cover/double-Scud battery equipped N900, this should also work with stock N900 battery cover.
This is a comprehensive way to safely charge without worrying that you phone will fall and snap off the fragile N900 USB port.
Read warning at bottom and whole post before proceeding, this could destroy your phone, Qi charger, or burn down your house, may contain peanuts and gluten.
see also:
http://talk.maemo.org/showthread.php?t=72753
http://talk.maemo.org/showthread.php?p=1253353
http://talk.maemo.org/showthread.php?t=93289

I ordered one of the very inexpensive ($6US) universal Qi chargers from ebay, they are also available from most of the Asian import web stores. This is an example with several fits available the correct one seems to be "Middle/Narrow Interface Up" with a micro-B-USB or microUSB type B plug http://www.amazon.com/Universal-Wire.../dp/B00I1D4DWO
When the charger arrived the USB plug was the wrong direction, upside down, this could have been my error in ordering the first time. It was actually not important to me because I ended up rebuilding the plug, it will be very important to you if use the no-solder methods, non-BME charging module, or the BME replacement upgrade.


Best solution: 100% compatible USB data pin-short mod and external install!
The main problem with all of the Qi add on adapters we have reviewed so far, is that they lack the shorted data pins required for the stock N900 to start the charging cycle, in this charger though there are empty spaces which we can use to add the missing data pins. I had to find some compatible pins and short them in the space available. In my opinion finding a source for a Qi charger with shorted pins or doing the add-pins mod is the best solution as it communicates the presence of a high draw charger to the system that is ready to deliver over standard 500mA vs say having a data cable inserted.

I bent the tiny metal tabs on the ribbon side to remove the metal back cap from the USB plug and carefully removed the two power pins from slots number one(+5v) and five(ground) by the microUSB pinout. I desoldered both of the existing pins from the ribbon cable as they were upside down for use with the N900. Next I went into my parts box where I had some DIY microUSB plugs, removing the metal outside I was able to remove the internal pins out the back of the port by grasping the solder tabs with a small forceps. To make the shorted pins I measured the length of the two power pins and the gap between. I bent one of the pins to the right the .5mm distance between the pin spaces and then straight again. I used a locking forceps with smooth jaws to clamp another pin I had removed to the pre-bent one; I then made a sloder joint at the point where the two pins came together at the bends I had made. Once cool I clipped the extra leaving about .5mm of joint and inserted them into slots two and three of the microUSB pinout.

I reattached the power pins to the ribbon cable turned for the correct direction, I tested the ribbon cable connection which soldered to the number one pin to be sure it was not shorted to the data pins. To be sure assembly was correct I inserted the plug into a small bluetooth keyboard, fit was good.

I had seperated the plastic charger cover which is covered on the inside with 'sticky' adhesive and removed the coil and PCB to work on them. I had desoldered the ribbon cable from the charging pad PCB so I put the receiver pad onto the transmitter pad until the blue charging light on the transmitter pad came on, I tested the power output solder pads and soldered down the ribbon cable to the appropriate pads.
The Qi charger has a black pad which blocks the signal and makes the receiver only work from one direction, this is required as assembly without somehow made my receiver pad not work when installed internally against the battery, some reports also have it heating the N900 to rather high temperatures through inductive heating.

As a final test I put the reassembled Mugen battery door onto the charge sender pad, then I connected to the microUSB port on the BT keyboard, red charge light and no smoke. I added a bit of tape on the inside of the metal back side USB plug cap, then replaced the cap and bent down the tabs, tested again on the BT keyboard with good charging, the plug also inserted cleanly and flush into my N900 for the first time offering a charging solution that protected the vulnerable USB port. I had already cut away the unneeded plastic charger cover tabs meant to protect the ribbon cable(the extra plastic tabs block the camera opening) and re-folded the ribbon cable so it makes a 90 degree turn to correctly pass the camera window and then on to the phone's USB port without slack.

I used several parallel strips of good electrical tape terminating under the battery cover, another trimmed strip looping through the Mugen battery cover camera window to secure the ribbon cable, the tape doesn't snag on my pocket or phone pouch. Some people have successfully installed under the battery cover with a stock N900 battery cover and standard single battery. Since I broke one of the tiny metal tabs on my USB plug cap I potted my Qi chargers USB plug with (boiling water softening) Polymorph plastic, including for about 3mm around the ribbon cable as a stress relief to the solder joints. http://www.amazon.com/InstaMorph-Mol...dp/B004MFLU4Y/

Finally we have industry standard integrated N900 Qi wireless inductive charging that works correctly with Maemo and internal charging circuitry, though Pali's BME replacement make all of this hardware work mostly unnecessary. It is too bad they couldn't add shorted data pins at the factory where it would be easy, post if you find a universal Qi that has the shorted pins. Ribbon cable and plug are flush with just enough slack to remove when I need the port for host mode. I much prefer this system with a ribbon cable and flush fit protective USB plug to my previous Touchstone wireless charger which required bypassing the internal charging circuitry and stuffing a Li-ion charge regulator to directly charge the battery which confused the Maemo charge monitoring circuitry and software. Read below for a hacked way to charge without installing data pins.

No solder software hack, BME stays active!
Warning, might result in an unbootable system or worse, though most likely problem is you could be stuck with a non-working BME and charge meter. I recommend using backup manager app to have a restore ready if you mess up. Failure to switch back to normal charge mode might cause permanent damage to a computer or other USB port if you plug in your N900 in Qi no-short charge mode. If you use this method and leave the Qi charger in as a semi-permanent protection for your USB port comment out the sleep and return to normal mode lines, then you only need to click the Qi charge button once after reboot, using USB host mode or the required switching back to 'auto' or normal for using USB mass storage require switching back to Qi or 'dedicated' BME mode to Qi charge again.
The downside is that you must callibrate your battery using a full discharge cycle, this could take a few long and tricky tries.
These scripted buttons can also be used by people wishing to hard wire install an charger to their USB 5V+ pad and ground for either an inductive charger which leaves the USB port free and open or for cases where the USB port has been destroyed and the data pin pads can't be repaired.

1-install(or have) up to date Kernel Power and CSSU testing
2-add Pali's BME replacement repo
web address - http://maemo.merlin1991.at/cssu/bme-replacement/
distribution - fremantle
Components - free
3-apt-get update and upgrade(this will install the new upgraded BME)
4.run this command in command line

Code:

gconftool-2 -s -t int /apps/osso/status-area-applet-battery/use_design_capacity 0
Above saves lot of frustration with getting completely BS values posing as correct, when battery gauge is not calibrated (at all 0 like, lost calibration data due to battery out of device for too long and dead bupbat).

5. Reboot
6. charge to green light
7. let run until battery dies(battery is now calibrated, dont rush or you will end up having to redo, last few hundred mA should be spent with backlight , CPU, and things like WiFi off)
8. enter command to BME for unshorted charging
Code:

echo dedicated > cat /sys/class/power_supply/bq24150a-0/mode
9. if you need to plug into your computer rather than Qi charge enter command to BME for normal mode charging
Code:

echo auto > cat /sys/class/power_supply/bq24150a-0/mode
Once you have done the above then you can enter the below to create two toggle buttons which can be placed in your desktop apps to switch between a timed charging via your unmodded Qi charger and quick return to normal charge button so you can plug into normal computers

Make a file named qi_charge and keep it in /usr/local/bin
Code:

#! /bin/sh
sudo echo dedicated > cat /sys/class/power_supply/bq24150a-0/mode
# edit unshorted charge mode time below in seconds 21600=6 hours
sleep 21600
sudo echo auto > cat /sys/class/power_supply/bq24150a-0/mode
exit

make a file in /usr/local/bin called normal_charge to kill the timed charge early
Code:

#! /bin/sh
#Does not kill Qi charge script which will continue to run, only reverts BME state to auto mode early
sudo echo auto > cat /sys/class/power_supply/bq24150a-0/mode

make them executable
Code:

sudo chmod +x /usr/local/bin/qi_charge
Code:

sudo chmod +x /usr/local/bin/normal_charge
.desktop file to get app buttons to start and stop qi_charge
create /usr/share/applications/hildon/qi_charge.desktop
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=Exec=/usr/local/bin/qi_charge
Icon=make a PNG and put the path here

create /usr/share/applications/hildon/normal_charge.desktop
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=early reload BME to get battery meter back(does not kill first Qi script)
Exec=Exec=/usr/local/bin/normal_charge
Icon=make a PNG and put the path here

The timed Qi charge scripts will continue to run even after the revert button is clicked returning the system to standard charging, this can be a problem requiring you to kill the instances of scripts found by running ps -e if you toggle charge modes back and forth a few times.

Easy no calibration - no solder software hack.
Not as seamless an integration into Maemo as the shorted data pins but is allows the common unshorted Qi charge adapter and N900 to be used 'out of the box'
This keeps the old BME which requires no long and sometimes repeated battery calibration steps, this is perfect for the average user who charges overnight.
Tested and enters desired mode from these toggle scripts. This is less invasive and more stable than Pali's new BME replacement above but lacks a fully functional battery manager.
make a file in /usr/local/bin called qi_charge
Code:

#!/bin/sh
sudo stop bme
sudo modprobe bq2415x_charger
# edit dumb mode charge mode time below in seconds
sleep 21600
sudo rmmod bq2415x_charger
sudo start bme
exit

make a file in /usr/local/bin called bme_charge to turn off Qi charging mode early
Code:

#! /bin/sh
sudo rmmod bq2415x_charger
sudo start bme

make them executable
Code:

sudo chmod +x /usr/local/bin/qi_charge
Code:

sudo chmod +x /usr/local/bin/bme_charge
.desktop file to get app buttons to start and stop qi_charge
create /usr/share/applications/hildon/qi_charge.desktop
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=/usr/local/bin/qi_charge
Icon=make a PNG and put the path here

create /usr/share/applications/hildon/bme_charge.desktop
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=/usr/local/bin/bme_charge
Icon=make a PNG and put the path here

In order for these buttons to show up among your other apps place qi_charge.desktop and bme.charge.desktop files in /usr/share/applications/hildon/ you can stick the app toggle buttons on your desktop for convenience.

On a non-CSSU system you will need to edit as sudo or root /etc/sudoers.d/qicharger1.sudoers with these files so the scripts will work.
Code:

cat <<ETX >/etc/sudoers.d/qicharger1.sudoers:
user ALL = NOPASSWD: /sbin/stop bme
user ALL = NOPASSWD: /sbin/modprobe bq2415x_charger
user ALL = NOPASSWD: /sbin/rmmod bq2415x_charger
user ALL = NOPASSWD: /sbin/start bme
ETX

then do this as root or sudo
Code:

update-sudoers
The timed Qi charge script will continue to run even when the revert button is clicked returning the system to standard charging, this can be a problem requiring you to kill the scripts found by running ps -e if you toggle back and forth a few times.

Always remove data and power pins from the plug for soldering so you do not melt the plastic plug housing. Once you have everything assembled use a cheap USB charged device to give a final test of your work, you do not want to fry your N900's USB port. Test polarity constantly and refer back to the microUSB pinout so you are 100% sure you have installed everything correctly and in the right direction and power polarity, also be sure to check for shorting.

biketool 2014-07-23 10:26

Re: N900 internal Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Update
The tape on solution is ugly but seems to work so far.
The plug is weak and prone to damage if you remove the cover to change SD cards or doing host mode. After repairing my Qi plug I potted the whole thing including a bit of the ribbon cable with Polymorph low temp plastic(amazing stuff) which is similar in strength to nylon plastic. I am hoping this will toughen the system, prevent unwanted hyperflexation, and extend it to a long life.

http://www.instructables.com/id/DIY-...c--a-thermal-/

biketool 2014-07-25 15:16

Re: N900 internal Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
I just finished my wife's N900, I did much nicer job since I knew exactly what to do without experimentation. I decided to add shorting pins even though there is the BME command to bypass this. I didn't need to resolder the power pins as I had ordered the correct adapter this time.
The second try at an improved tape down external method does require trimming off the adapter's cover sheet tabs and moving the ribbon cable about 1cm to the right and refolding it.
I secured the receiver pad with three stripes of electrical tape which terminate under the cover, a fourth strip is cut to fit the camera hole and secures the ribbon cable.
I am less concerned with unplugging, wife doesn't use host mode or other USB now that she has inductive charging, so I don't feel the need to use Polymorph plastic to reinforce the plug and cable.
It still is a tape job but more professional, unless someone documents a system that fits really well under a Mugen cover double-Scud equipped N900 I think this is where I will stay.

aramburuyy 2014-08-10 14:25

Re: N900 internal Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Quote:

Originally Posted by biketool (Post 1433882)
I just finished my wife's N900, I did much nicer job since I knew exactly what to do without experimentation. I decided to add shorting pins even though there is the BME command to bypass this. I didn't need to resolder the power pins as I had ordered the correct adapter this time...

Thank you very much for all your effords, Biketool. I'm very interested in your achievements since I also want to adapt my n900 to the Qi charging standard (I have already done so with a Note II mobile and a Lg G Pad 8.3 tablet). I've got one of this Qi universal adapters (the X02 that is shaped to fit nicely in n900 profile), but as it's already known, the n900 does NOT detect it as a proper charging current due to the data +/- pins issue.

Would it be possible to post some pictures of your recent wife's n900 layout (sorry, but my english is quite lacking and I didn't get well from your ample explanations).

Also, you've mentioned something about a "BME command" in order to avoid fiddling with the data pins (shorting them or whatever), could you point out the app (if any), program or script in order to achieve this?

Having my three devices charging in the same single Qi charger would be great.

sixwheeledbeast 2014-08-10 16:46

Re: N900 internal Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Has anyone found a Qi receiver with the data pins shorted yet?
While biketool has done a great job explaining his hack, I think we need to find source of a compatible receiver for N900.
It is a standard to have the data pins shorted, so seems silly that no one produces them.

biketool 2014-08-10 17:26

Re: N900 internal Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Quote:

Originally Posted by sixwheeledbeast (Post 1435426)
Has anyone found a Qi receiver with the data pins shorted yet?
While biketool has done a great job explaining his hack, I think we need to find source of a compatible receiver for N900.
It is a standard to have the data pins shorted, so seems silly that no one produces them.

If you have KP and maybe CSSU too this is the software hack said to work without bothering with adding shorting pins, added this to the first post. Others confirm this working.
Code:

stop bme
modprobe bq2415x_charger

This would be a great thing to add to settings or just become part of CSSU so that we can all be free of the shorted data pins problem, even now this needs to be done at every startup. I don't remember the right way to change the kernel module load settings in /etc/modprobe.d/blacklist or something?
I did a nicer job taping down my receiver to my Mugen/double-Scud cover, it looks pretty good for parallel tape, still looking for a vacuum form plastic machine.

After a few weeks I just can't imagine going back, unlike the Touchstone mod this works AND it protects my precious USB port both by covering and plugging it and also by moving to a world where I only ever need to plug-unplug if I want to play with USB host mode. See the current and rising pinacle of that insane awesomeness here thanks mostly to Xes http://talk.maemo.org/showthread.php?t=91182

biketool 2014-08-10 19:08

Re: N900 Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
aramburuyy, that sticky pedestal charger might not totally stick to the N900 with stuck down Qi. Instead make one like this http://www.amazon.com/TYLT-Wireless-.../dp/B00DG8NUC8 though obviously not at that price would be good if you want to watch movies or monitor music playback.
You can get a cheaper Qi stand, or DIY charge pad parts on dx.com and aliexpress.com and add it to a 3D printed, wood, or plastic desktop photograph or plaque stand, even Legos would work to build the frame and would look cool.
I used one shaped like the X01, cut the extended bit of cover off and then refolded the wire to bypass the camera, it is pretty easy after you un-stick the protective cover, the X02 would require a similar mod back towards center.

aramburuyy 2014-08-13 11:16

Re: N900 Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Thank you very much for your advise, Biketool. The Nokia N900 sits perfectly in the tilted (and not very well designed, I admit) charger that I got. Despite it's quite slippery (specially when a dusty layer builds up in the rubber ring that it's supposed to hold devices in place), the N900 manages itself to be in good position held by the protuberance that surrounds the camera part.

I applied the software solution you pointed:
(I´ve got "CSSU testing" an "Kernel Power 52" installed, I think... not sure).

Code:

sudo gainroot
stop bme
modprobe bq2415x_charger

After that, both battery indicators (the 'system one' in the top left area, and another one battery widget I put in the main desktop) go off.

Then I put the N900 in the Qi charging station and its supposed to start charging. There is not sign showing that it's doing so, since the battery indicator doesn't monitor the process any more. Neither the usual yellow bar signal indicating that the process has started (or ended) shows in the screen. The N900's notification LED lights up in orange colour, but does not blink as expected, it just keeps steady on. This the only sign that indicates that 'something' is happening.

The phone looks really neat because the Qi coil charger stays behind the original n900 cover stuck to the Nokia battery. Only a small part (7mm or so) of the ribbon is visible as it reaches the black and very flat micro USB conector, so this mod is barely noticeable. Since the Qi receiver (I've got the X02 variety) has the ribbon protruding from the side of the coil pad, it easily clears the camera area as it reachs the MicroUSB plug. No folding of the ribbon was necessary, only a small cut was made in the plastic protector sheet in order to not been shown through the camera opening hatch, but this was made purely in aesthetics.

Definitively, it charges wirelessly. I've checked twice... and it seems that it does at a good speed. The trade off is I can't tell the actual level of charging due to batt monitors not working unless I reboot the phone. So rebooting is the only way I have figured out to check the level of charge achieved. Annoyingly, It will require to run that script again prior to another wireless charging process. Also, since I didn´t dare to leave the N900 charging wiressly for more than hour, I don´t know if the N900 does stop charging when it gets at the proper level or if it keeps overcharging and eventually damaging the battery or even worse the device itself. Thats a possibility because nothing seems to me to be controlling the charging process. I want to point out than when charging, the N900 gets quite warm, but this is expected since my LG Pad 8.3 tablet behaves in the same way when charging with the same charging solution, and I've been using this method for months with no problems at all. On the other hand, my Galaxy Note 2 does not get so warm when being in the same station. But Note 2 was designed with Qi wireless charge in mind with proper Qi accessories. Note 2 software even detects wireless charging and prompts a message on the screen indicating if the alignment with the wireless charger is correct.

So my questions are: if I follow your method of shortening somehow the data (+/-) pins in a modded microUSB connector, will I be able to monitor the charging process (yellow bar, standard battery monitors and widgets) as if it was charged with the standard way?
Will it stop charging when reached the required level?
Will the notification LED work as usual (blinking orange colour while charging that turns into steady green when the process has ended)?

Although I know the is still room for improvement, I really like the idea of Qi Wireless Charging. My desk is now much more tiddy than the usual mess of chargers and cables it used to be.

aramburuyy 2014-08-13 11:59

Re: N900 internal Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Quote:

Originally Posted by sixwheeledbeast (Post 1435426)
Has anyone found a Qi receiver with the data pins shorted yet?
While biketool has done a great job explaining his hack, I think we need to find source of a compatible receiver for N900.
It is a standard to have the data pins shorted, so seems silly that no one produces them.

You are so right!

The Universal Qi Wireless than I trying to use in my N900 is flat and black, sitting beautifully in place in compact appearance. The short ribbon rapidly disappears beneath the N900s lid. Almost seems a part of the original device as it does not alter much its original appearance.

But what is driving me crazy, is the difficulty I'm finding in order to short the data pins in the connector itself. I´m trying for now to avoid tinkering with the data pads in the N900s main board.

The Qi receiver I've got even does not have data pins at all in the micro USB connector. There are only pins in the sides (5v & Ground) leaving the three central ones completely empty in the small plastic mould. Therefore, I do not see an easy way to bridge Data (+) and Data (-) because there is nothing there to connect. That's why Biketool went through the 'transplant' process he posted which seemed no easy for my skills, I´m afraid.

I've googled for "Universal Qi receivers" with "shorted data pins" with no success. That's quite surprising because I agree it should be a standard, as you say. I'm completely novice but I don´t believe that next century technology is needed for developing such a thing.
All what I´ve got were charging cables with such a big connectors that do not appear to be a neat solution for modding them in the N900.

Now, I´ll try to find a connector with the central pins somehow accessible in order to bridge the data (+/-) and connect the ones in the extremes (5v & GND) to the ribbon of my Qi charging receiver. But I´m afraid that finding a unit that is at the same time workable, small, flat, black and nice... well, that's is asking to much ...Maybe should I quit the black and nice part!

I´ll post back in case something is found.

Just if were possible for CSSU/ Kernel Power people to provide with a reliable software solution equal the Android devices support...

biketool 2014-08-13 16:51

Re: N900 Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
WIth the shorted pins you would never know that you were not using the Nokia high power mains charger, the battery meter works the same, orange light pulses the same, everything is running as stock so responds as expected. In my mind a shorted USB is superior unless we can fix the BME issues. I have no idea how to google search for shorted pins because 99.(% of people have no idea how a charger, a phone, or a microwave works and advertising shorted pins probably makes the average person think they are selling a broken charger. I would post pics of my setup but I cant get TMO to take the upload, it really likes to link to instagram or some other website.
Maybe write a script to kill the BME, load the new charge driver, rmmod it and restart BME after so much time.
try this but dont cry if your phone catches fire or it unleashes zombies on us all, it should give you six hours of charging.
Put this in MyDocs so it is easy to use leafpad edit the wait time for how long you thing charging should last.
Code:

#!/bin/sh
sudo gainroot
stop bme
modprobe bq2415x_charger
# edit dumb mode charge mode time below in seconds
wait 21600
rmmod bq2415x_charger
start bme
exit

save the script name as qi_charge
make it executable
Code:

sudo chmod +x qi_charge
Make this to get a button in your app list to run qi_charge(works)
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=/bin/sh /home/user/MyDocs/qi_charge
Icon=make a PNG and put the path here

This is how to get Maemo to find the qi_charge.desktop file in order for it to show up among your other apps, by placing it in /usr/share/applications/hildon/ you can stick the app button on your desktop for convenience if you like.

biketool 2014-08-14 09:57

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/software and hardware mod)
 
Need some help, the permissions for this are a little messed up I think, hand entered after sudo su they go into dumb charge mode, but when I run them as a script from the .desktop button or in console nothing happens.

biketool 2014-08-14 10:55

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Ideally there is probably a way to reload BME and grep from something similar to the old linux apm several times every hour of charging. So the script could exit when the battery state reads 80-90% rather than just doing a time based charge.

biketool 2014-08-14 13:34

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
I gave up, seems that wait 21600 gets ignored by busybox, I don't know how to get past that. First post has two scripts and .desktop files so you can turn dumb charge on and off for the cheap Qi chargers, other dumb chargers, or even some broken/repaired USB ports, that actually works.

This was the final script before I broke up the scripts into on and off toggles, it executed without error but without the wait lasting six hours(21600 sec) it was useless.
Code:

#!/bin/sh
stop bme
modprobe bq2415x_charger
# edit dumb mode charge mode time below in seconds
wait 21600
rmmod bq2415x_charger
start bme
exit

save the script name as qi_charge
make it executable
Code:

sudo chmod +x qi_charge
make your .desktop file so you get a charge button among your apps
Code:

sudo vi /usr/share/applications/hildon/qi_charge.desktop
now cut/paste this in after typing i for insert
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=sudo /bin/sh /home/user/MyDocs/qi_charge
Icon=make a PNG and put the path here

now hit [Esc] and [shift] ZZ
This is how to get Maemo to find the file in order for it to show up among your other apps, by placing it in /usr/share/applications/hildon/ you can stick the app button on your desktop for convenience if you like.

Estel 2014-08-14 16:17

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
As said earlier, using BME replacement instead of vanilla BME should fix all your problem, + more.

biketool 2014-08-14 18:12

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Estel, for now my only issue seems to be with busybox and the wait command, I solved that by splitting up into two scripts so we are now at 100%.
What does BME replacement actually do, or do better in this application?
BME replacement is widely talked about but unclear what it does or how to get it to install. I tried Palis BME repo and ended up having to reinstall all of my BME stuff from the normal repos to get a working BME, very little documentation that I know about.
I suspect not all of the BME chips are 100% standard because for a long doing an upgrade to the BME from dev left me with no working BME on about 50% of my then current N900s.

aramburuyy 2014-08-15 08:17

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Quote:

Originally Posted by biketool (Post 1435731)
I gave up, seems that wait 21600 gets ignored by busybox, I don't know how to get past that...

First of all, thanks for your help and all your efforts with this, Biketool. I experienced the timing issue not working from the beginning. First I tried specified time in hours or minutes as detailed the first version of the script, but neither "h" or "m" units were recognized. Then I converted into seconds (without specifying the unit) as in your example code once edited, but was totally ignored. I did run them from xTerm, didn't build the executable.

Starting and ending BME (with 'CSSU testing' and KP52) definitively works. As soon as I lay my N900 on the Qi unit starts charging (with no clear evidence of it, as already commented). But there is something that worries me quite a lot. It went from almost 0% to about 70% in roughly half an hour. That's too much and too fast. It seems to me that something is wrong as Qi charging is supposed to be slower than standard charging due to current loss inherent to the wireless technology itself.

Apart of this, there are inconsistent readings of batteries levels whenever I apply the stop/start BME process, so I cannot assure which level my battery actually is in. When I refresh readings, figures jumps up and down by a considerable amount. Maybe it has to do with the Qi receiver I'm using, maybe with the Nokia battery (in fact it is four years old, although seem to keep surprising well for its age).

The fact is that I don´t dare to leave the device in Qi charger in a timed controller because I'm risking a fried device. I would prefer (as you already pointed out) something based in a periodic checks of charge levels, with automatic final cut off, once a reasonable and secure level is achieved.

My coding skills are null (don't ask me why I own a N900, which I swear I love and want to keep alive despite it's no my main device any more). Therefore, maybe I´ll try take your original approach: that`s shortening data pins in the MicroUSB connector itself. Yesterday I bought an standard connector in an electronics shop. But, even when it seems workable, it appears too large and clumsy for keeping it permanently plugged in the phone. Nothing to do with the nice appearance of my first try. I´m currently searching the eBay and other Internet sites for a compact alternative. As you suggested in one of your posts: "once you get used to wireless charging, it's very hard to go back to the cable mess".

If I find something, I will post back.

biketool 2014-08-15 09:10

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
aramburuyy,
The secondary, or non pulsing non-BME charge mode is fine to use, the phone will charge to full and then stop the charge. I don't remember if the orange light turns off or turns green at full charge. Your BL-5J battery also has over-volt and overcharge protection circuitry in addition to the N900. The reading after your restart BME will read all over the place for a bit, much like after using USB host mode, but it will settle down after a while.
I am waiting to get Pali's BME replacement correctly installed, that might work better than this solution in that the data pin shorting wouldn't be required but the N900 (pali)BME would stay on allowing normal charge monitoring.

aramburuyy 2014-08-15 09:44

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Ok then, thanks for clarifying the 'overcharge' issue.

I shall wait for a while now, I´m going to be busy during next days, anyway, and I would try any of the new codes that might appear in this thread.

Also, bearing in mind what you told me, I´ll try to monitor the charging rate in a proper way just to check whether is just reasonable or too fast as previously afraid.

As for the MicroUsb connector modding alternative, I have found a Qi receiver that seems to have the full FIVE pins in the MicroUSB head itself, but your never know with photos featured in those Chinese e-Shops. It seems that shortening pins 2 an three could be done somehow. Although the ribbon is placed in the center of the unit, it seems long enough to be folded in a sort of "Z" shape in order to clear the N900's camera area.
Another advantage of this unit, it's the fact that it provides an output current of 1000 mAh, which doubles the 500 mAh of my current Qi receiver. Should be that useful for a quicker charger process? (which I'm not sure of being diying for...)

Anyway, I'll leave by now, And I´ll wait in order to see whether you and Pali comes here with a nice code that allows me to keep what I've got.

Thanks again for your all your kind help.

biketool 2014-08-15 10:28

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Aramburuyy,
Nice find, I suspect the data pins if assembled unshorted could be shorted at the other end of the cable with a bit of scraped insulation and twisting the wires if you don't want to solder. This charger is also a great source for conformal USB cable to be used in a sleeve for host mode gadgets or hidden under the battery cover, like this http://talk.maemo.org/showthread.php?t=91182 with the plastic cover and connectors removed.

aramburuyy 2014-08-15 12:37

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Quote:

Originally Posted by biketool (Post 1435866)
Aramburuyy,
...I suspect the data pins if assembled unshorted could be shorted at the other end of the cable with a bit of scraped insulation and twisting the wires...

I'm afraid that although the five pins might be there (and I insist that with a Chinese sites you not always get all what you see...), no all of them are wired inside the flat ribbon.
If you look into the last two big pictures of the item at the end of the webpage, you'll observe the black sleeve somehow divided in two. My present Qi charger looks more or less the same. In fact, I suspect that inside that black ribbon runs underneath two flat copper tapes instead of the common rounded wires. Flat styled wires provides the flexibility required to fold them without breaking them easily. Those tapes works for VCC 5v and GND pins, the other three, including Data (+/-), are left orphan going nowhere. So maybe "not other end of the cable", I am afraid.

There should be a way to let drop a tiny, very tiny indeed, bubble of soldering between data pins 2 and 3 at the connector's head to bridge them... eeer... without melting the plastic housing!
That should requiere to work looking through a magnifying glass like those used in clockworks shops... or, in my case, to hire a lilliputian gnome expert willing to do the job.

biketool 2014-08-23 18:33

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Ok coming down the pipe is a better way to do BME, using this method you can charge without worrying about shorted USB data leads, this is both for internal soldered chargers and Qi port-plug/protector chargers like the cheap Qi add on ones we are working with.

1-install(or have) up to date Kernel Power and CSSU testing
2-add repo
web address - http://maemo.merlin1991.at/cssu/bme-replacement/
distribution - fremantle
Components - free
3-apt-get update and upgrade(this will install the new upgraded BME)
4.run this command in command line
Code:

gconftool-2 -s -t int /apps/osso/status-area-applet-battery/use_design_capacity 0
Above saves lot of frustration with getting completely BS values posing as correct, when battery gauge is not calibrated (at all 0 like, lost calibration data due to battery out of device for too long and dead bupbat).

5. Reboot
6. charge to green light
7. let run until battery dies(battery is now calibrated)
8-enter command to BME for unshorted charging(coming soon)

thanks to Pali and Estel

Estel 2014-08-23 21:38

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Glad you've got it working :) As for:

Quote:

Originally Posted by biketool (Post 1436678)
8-enter command to BME for unshorted charging(coming soon)

...I'm pretty sure what you want is:

Code:

echo dedicated > cat /sys/class/power_supply/bq24150a-0/mode
...as a root. Don't forget to switch back to "auto" before connecting to PC, or your may get warnings about overcurrent and port being disabled on your PC (in best case), or blown fuse on PC's motherboard (worst case... I think that nothing worse can actually happen, until you've replaced fuse on your PC's mobo with a wire, already).

/Estel

biketool 2014-08-24 04:24

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
How do we get back to auto?
Will switching USB mode from USB host and back to client do the job?
(edit) oh, yea...
Code:

echo auto > cat /sys/class/power_supply/bq24150a-0/mode

biketool 2014-08-24 05:55

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
See first post for updated Pali's BME replacement mode toggle scripts.

joerg_rw 2014-08-28 18:48

Re: N900 Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Quote:

Originally Posted by biketool (Post 1435654)
[...]
Put this in MyDocs so it is easy to use leafpad edit the wait time for how long you thing charging should last.
Code:

#!/bin/sh
sudo gainroot
stop bme
modprobe bq2415x_charger
# edit dumb mode charge mode time below in seconds
wait 21600
rmmod bq2415x_charger
start bme
exit

save the script name as qi_charge
make it executable
Code:

sudo chmod +x qi_charge

This is regularly going to fail, you cannot chmod +x any file on MyDocs since MyDocs is a FAT fs.
I alternatively suggest to create a folder /usr/local/bin in /-fs and place the files there.

You also need to take care about /etc/sudoers.d/*, you should create entires/files there that allow exactly the commands you do via "sudo xxxxx" in your scripts. Afaik "sudo gainroot" doesn't work in a script, and generally shouldn't get used. You should use "sudo stop bme" and "sudo modprobe bq2415x_charger" etc in script, and enable exactly those commands via files you add there in /etc/sudoers.d/, like

cat <<ETX >/etc/sudoers.d/qicharger1.sudoers;
Code:

user ALL = NOPASSWD: /sbin/stop bme
user ALL = NOPASSWD: /sbin/modprobe bq2415x_charger
user ALL = NOPASSWD: /sbin/rmmod bq2415x_charger
user ALL = NOPASSWD: /sbin/start bme

ETX

[edit]
the command is "sleep <seconds>", NOT "wait <seconds>"
Quote:

jr@saturn:~> help wait
wait: wait [id]
Wait for process completion and return exit status.

Waits for the specified process and reports its termination status. If
PID is not given, all currently active child processes are waited for,
and the return code is zero. PID must be a process ID.

Exit Status:
Returns the status of ID; fails if ID is invalid or an invalid option is
given.
versus
Quote:

jr@saturn:~> LANG=C sleep --help
Usage: sleep NUMBER[SUFFIX]...
or: sleep OPTION
Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default),
'm' for minutes, 'h' for hours or 'd' for days. Unlike most implementations
that require NUMBER be an integer, here NUMBER may be an arbitrary floating
point number. Given two or more arguments, pause for the amount of time
specified by the sum of their values.

--help display this help and exit
--version output version information and exit

Report sleep bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
(this is gnu sleep which is more versatile than busybox sleep, on busybox only SECONDS is allowed as parameter, and only integer)


[edit2]
Quote:

Originally Posted by biketool (Post 1435731)
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=sudo /bin/sh /home/user/MyDocs/qi_charge
Icon=make a PNG and put the path here


you also shouldn't do this (use sudo in .desktop), better style is what I suggested above. So the whole line in .desktop simply looks like:
Code:

Exec=/usr/local/bin/qi_charge
hth
jOERG

biketool 2014-08-28 19:35

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Joerg, thanks;
can you review my posted update to first post?

joerg_rw 2014-08-28 20:18

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
sorry, I was a bit terse on what I suggested:

Either you follow your scheme of
Quote:

make a file /etc/sudoers.d/qicharger1.sudoers
Code:

user ALL = NOPASSWD: /sbin/stop bme
user ALL = NOPASSWD: /sbin/modprobe bq2415x_charger
user ALL = NOPASSWD: /sbin/rmmod bq2415x_charger
user ALL = NOPASSWD: /sbin/start bme


or you use my pseudo-install-script, then it's like
Quote:

execute the following in a shell with root permissions (you can copy&paste):
Code:

cat <<ETX >/etc/sudoers.d/qicharger1.sudoers
user ALL = NOPASSWD: /sbin/stop bme
user ALL = NOPASSWD: /sbin/modprobe bq2415x_charger
user ALL = NOPASSWD: /sbin/rmmod bq2415x_charger
user ALL = NOPASSWD: /sbin/start bme
ETX

it creates a file /etc/sudoers.d/qicharger1.sudoers for you.
In any case run
Code:

update-sudoers
after creating the file!


the rest looks good as far as I can tell
/j

pichlo 2014-08-28 22:04

Re: N900 Qi wireless plug-in universal inductive charger modification and installation(no phone mod)
 
Quote:

Originally Posted by joerg_rw (Post 1437321)
This is regularly going to fail, you cannot chmod +x any file on MyDocs since MyDocs is a FAT fs.

Really? Not meaning to be facetious at all, I was genuinely intrigued.

Code:

~/MyDocs $ touch bla
~/MyDocs $ ls -l bla
-rwxrwxrwx    1 user    root            0 Aug 28 22:54 bla
~/MyDocs $ chmod +x bla
~/MyDocs $ ls -l bla
-rwxrwxrwx    1 user    root            0 Aug 28 22:54 bla
~/MyDocs $ chmod -x bla
~/MyDocs $ ls -l bla
-rwxrwxrwx    1 user    root            0 Aug 28 22:54 bla
~/MyDocs $

I was expecting the 777 permissions and chmod +x being pointless. What surprised me a bit was that chmod -x had no effect either. And yes, I also tried as root with the same result.

Estel 2014-08-28 22:12

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
CSSU changed MyDocs permissions, removing the noexec parameter from it. Personally, I reverted those changes - not that exec on fat32 under Maemo should be any security risk that I'm aware of, but I don't see a point, either. When asked about rationale for the change, answer was equally as inconclusive, so it's your guess ;)

as for the opening post, I disagree that the the 1st listed solution is "best". IMO, the variant with BME Replacement is more convenient, less prone to wear and user mistakes, and, most of all, 1st solution gives no advantages over BME Repl. way. BTW, for people that want things "integrated" without plugging anything in or out, BME Replacement is fully compatible with such mods.

/Estel

biketool 2014-08-29 07:14

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Thanks, updates made to first post.

biketool 2014-08-29 07:48

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Quote:

Originally Posted by Estel (Post 1437352)
I disagree that the the 1st listed solution is "best"

While I like that this thread gives good install instructions for Pali's new BME this is still a thread about modding the Qi universal add-on thing and then installing it into/onto the phone. Ideally we will just find a charger manufactured as compatible with standards compliant shorted pins and post that as best. I do strongly recommend installing the BME replacement in the best/100% option since it is already right here on the page. The other two are work around options because not everyone can or wants to solder.

biketool 2014-08-31 18:18

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
A bit of science.
I had a Qi charge pad on top of an aluminum case stereo amplifier sitting on my desk. Set my N900 on the pad to charge, after five hours it had only taken 5% more charge, the amp was pretty hot.
Set the pad onto the desk and left the N900 on the charger, I think it went from 57% to 100% in about two hours.
It seems that some cheap Qi base pads don't have magnetic isolation on the bottom so will leak off energy to metal objects like an inductive stove top.

pichlo 2014-08-31 20:38

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Thanks biketool, that's pretty consistent with my "less than 10% efficiency" estimated here. A (slightly) different setup, but the same mechanism. It's nice to have my estimate confirmed by a real life experiment :)

I think the Al backcover thread should take notice.

biketool 2014-09-01 08:42

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Pichlo, if you do an external install there should be no problem using with the Al cover as the Qi charger on phone side has an induction blocking pad.
I just had a Qi pad fail due to a bad solder joint in the little control PCB, if I cant reflow the loose chip I can divert the induction blocker pad to my desktop charge pad so that it can be set atop that aluminum amp or anything else without inductive loss problems.

biketool 2014-09-01 11:12

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
The quality of these cheap units is telling, I had to do a toaster oven solder reflow/reball on the Qi receiver's PCB as one of the tiny surface mount chips had a bad joint.
It seems to be working now but I am going to order another, who knows how long this will last.
That said at the functionality is worth well more than $6 delivered so you can order a few to have a spare to replace rejects.

To do the reball I put a drop of liquid surface mount flux onto the PCB where the loose joint chip is and ran the oven at 200C for 20 minutes with the PCB sitting on a clean piece of aluminum foil.

I am going to get another reciever myself once I have some free money, hoping someone finds a standards compliant(shorted data pins) receiver in that time so I can give it a try.

Wikiwide 2014-09-08 23:16

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Quick question...
So, should I get receiver A or B, if I want to install Qi charger with minimum hassle and no soldering? And I would prefer to somehow short the data pins of the Qi charger, rather than get BME confused.
Thank you.
~~~~~~~~~~~~~~~~~
Per aspera ad astra...

biketool 2014-09-14 05:45

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Wikiwide,
MicroUSB type A is rectangular, we need a type B with angled sides for the N900.
I have not heard any good news on a factory shorted universal Qi charger. Just upgrade to the Pali BME and use the charge timer script, it beats breaking your USB port using a regular cable.

Wikiwide 2014-09-14 23:17

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Quote:

Originally Posted by biketool (Post 1439157)
Wikiwide,
MicroUSB type A is rectangular, we need a type B with angled sides for the N900.
I have not heard any good news on a factory shorted universal Qi charger. Just upgrade to the Pali BME and use the charge timer script, it beats breaking your USB port using a regular cable.

Quick reply...

Alright, microUSB type B.

I would rather short the data pins of Qi charger once and not worry about it, because it is the 'right' way of doing things. Rather than get confused with custom software (what if I re-flash the N900 some time later, and forget to put the special BME back?). After all, Qi charger is not something valuable, to be afraid of breaking it in process of attempting to short the data pins.

But, it will take time. Currently, microUSB port is ripped off the board, and local repair shops (two of them) just refused to repair it (too old model, they say; unfamiliar, and so on; fair enough, but what will they do when new model, Neo900, comes in?). I may go to a third repair place (most likely, they will refuse, too), or I may buy a new microUSB port, and visit a local soldering place, in hopes they help me to repair it.

And local soldering place is open only once a week. And microUSB needs to get here by post. So, not soon.

Thank you.
~~~~~~~~~~~~~~~~~
Per aspera ad astra...

biketool 2014-09-15 04:09

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Maybe see if the soldering shop can do the Qi mod at the same time.

Estel 2014-09-15 23:15

Re: [Announce]N900 Intergrated Qi Wireless Charging, No Phone Mod(charger pin short mod, Pali's new BME, or old driver script)
 
Quote:

Originally Posted by biketool (Post 1439157)
Wikiwide,
MicroUSB type A is rectangular

Early hostmode adopters used to file microUSB A into microUSB B (creating this angled shape). It should be still quite easy to do, although, of course, I agree with the "proper" way of doing it via either sorting Qi pins, or using BME repl. Or both, in best case.

/Estel


All times are GMT. The time now is 12:50.

vBulletin® Version 3.8.8