How can Tasker communicate with the outside world there to harware? - Tasker Tips & Tricks

Hi, I need to let Tasker communicate with an electronic circuit designed by me through the USB port of my smartphone. The electronic circuit must read the logic status of the D + and D- lines of the USB port and activate relays to control some electrical devices. I would like to know if Taker can directly manage these lines by bringing them up or down. If you could not do it, do you have any idea how to make tasker communicate via hardware with the outside world? In the past I used the audio output by letting out a sequence of beeps from the headphone jack and an electronic circuit that decoded these sequences to operate relays. I must say that it worked very well. But now I would like to use the USB port that I will use to keep the smartphone in charge.

gar.special said:
Hi, I need to let Tasker communicate with an electronic circuit designed by me through the USB port of my smartphone. The electronic circuit must read the logic status of the D + and D- lines of the USB port and activate relays to control some electrical devices. I would like to know if Taker can directly manage these lines by bringing them up or down. If you could not do it, do you have any idea how to make tasker communicate via hardware with the outside world? In the past I used the audio output by letting out a sequence of beeps from the headphone jack and an electronic circuit that decoded these sequences to operate relays. I must say that it worked very well. But now I would like to use the USB port that I will use to keep the smartphone in charge.
Click to expand...
Click to collapse
maybe using Termux?
https://www.reddit.com/r/termux/comments/8qc92m/programming_on_the_phone_using_termux_terminal/
termux and tasker play very well together. python, C, etc are available.

You might look into the AOSP interaction page.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

Related

USB GPS Mouse connection

Hi there,
let me first thank you for this great site you put up here!
And here comes my question:
I want to hook up my USB GPS Mouse (made for the notebook -
meaning it get's it's power via USB) up to my XDA.
And now I wonder if I can simply solder the data +/- cables
from the USB Mouse to the USB data +/- pins on the XDA plug
(so I could still use the same cable for ActiveSync on the PC),
or if I have to solder the data +/- cables from the USB mouse
to the serial RX/TX pins as described on the 'The XDA's connectors'
page of this site...
I was planning to hook both the GPS and the XDA up to my car
power adaptor in a kind of a Y constellation:
::::::::::::::::::::::::::::::::__________ Power
:::::::::::::::::::::::::::::::/
::::::::::::::::::::::::::::::/
::::::::::::::XDA ----------
::::::::::::::::::::::::::::::\
:::::::::::::::::::::::::::::::\___________ GPS
and use Power for both.
Maybe someone can tell me about the data hookup.
Thanks, Lars.
I don't have answers but some things you have to consider.
1) The XDA is a slave device. I presume the GPS receiver is one too. I really wonder if they can communicate with eachother
2) Based on how you describe this you want to power the receiver from the the car. I assume you have checked the right voltage requirements for the receiver and that the powersupply can deliver the currents required for both the XDA and the receiver. My personal experience is that the latter shouldn't be too much of a problem, but it can't hurt to check.
3) Combining USB and Serial the way you describe it is not a good idea. (mark the last character '.' as in PERIOD).
Robert
Power Supply
Hi Robert,
thanks for your suggestions.
Indeed both (the original ActiveSync cable from the XDA and the
USB GPS) get their power off a USB port on the notebook so
this must be the same voltage requirements.
This ActiveSync cable is a combined car charging cable with an
USB 'A' type connector on the end which you can plug either into
the USB port on the notebook (where it also ActiveSync's) or into
the car's power adapter (where it only charges).
So this both same voltage. And the car power adaptor should
nominally supply enough power for both...
But I don't understand what you said about it not beeing a good
idea to hook up the USB data to the SERIAL data.
When plugged into the notebook in WinXP the USB GPS installs
a 'Prolific USB-to-Serial COM5' to emulate to the programms
working with it a com5 (or com1 or com2 depending on your
hardware settings) communications port. So I guess the data
coming from the USB GPS is just the same as if delivered via
serial cable and all the driver does is faking to be a serial port
to any programm asking for data from com5.
And I think a USB device is 'not really' a passive device as it starts
popping out ASCII data strings as soon as it get's power (no matter
if there is a device to read the data or not).
So I figure when you plug it into the XDA and tell the XDA by means
of USB wakeup (USB_VDD pin 13) that there is an active USB
connection, that it will start trying to figure out what the heck the
connected cable is trying to tell it.
And here is the tricky part where I don't know if the XDA might not
believe it is beeing Sync'ed and therefore starts ActiveSync.
Anyone with any experience or suggestions there...??
(Sorry for the rather lenghty post)
Greetings, Lars.
Lars,
seems like you got the power all figures out
regarding the usb/serial discussion.
If I understand you correctly you can plug the USB connector of the GPS receiver into the USB port of the PC.
'somewhere' in the PC this is modified into a virutal serial port in order to enable serialport aware programs to work with the GPS receiver as well.
This is a good concept but at an electrical level that still means that the GPS receiver is connected in an USB fashion. There is nothing Serial Port about that. In a way you already pointed that out in your messages by using the word 'emulate'.
You can hook it up to the USB part of the XDA but still I doubt about the master/slave discussion of USB.
Regards Robert
No cahnce.
Save yourself time/money.
Forget it.
Lars said:
Hi there,
let me first thank you for this great site you put up here!
And here comes my question:
I want to hook up my USB GPS Mouse (made for the notebook -
meaning it get's it's power via USB) up to my XDA.
And now I wonder if I can simply solder the data +/- cables
from the USB Mouse to the USB data +/- pins on the XDA plug
(so I could still use the same cable for ActiveSync on the PC),
or if I have to solder the data +/- cables from the USB mouse
to the serial RX/TX pins as described on the 'The XDA's connectors'
page of this site...
I was planning to hook both the GPS and the XDA up to my car
power adaptor in a kind of a Y constellation:
::::::::::::::::::::::::::::::::__________ Power
:::::::::::::::::::::::::::::::/
::::::::::::::::::::::::::::::/
::::::::::::::XDA ----------
::::::::::::::::::::::::::::::\
:::::::::::::::::::::::::::::::\___________ GPS
and use Power for both.
Maybe someone can tell me about the data hookup.
Thanks, Lars.
Click to expand...
Click to collapse
Guess U R right
Hi Guys thanx for the feedback,
I spent an afternoon researching on this stuff and am very disappointed that I have to admit you are both right.
Now way (other than putting some 'intelligent' converter between the USB GPS and the RX/TX pins of the XDA) to make the USB 'language' sound like 'SERIALean'.
I think there should still be a possibility:
Let everything run via the USB, persuade the XDA it's not ActiveSync talking to it and write a driver that talks to the GPS via the open USB connection and sends the proper commands to recieve the NMEA ASCII.
And then you would still need to tell your route software to take the incoming data from the virtual (or emulated) COM port...
And when I read the above chapter once more :shock: I find this is definitly not a job for me!!
So I will just get a serial GPS an hook it up the nomal way.
Cheers and thanx again, Lars.
Hi,
Just read your post. I am new to pda land. Just bought a xda2
I have a laptop which I use with a gps usb mouse via usb on the laptop. Am I right in thinking that I could have bought a ps2 mouse and used a ps2 changer to usb and it would have worked??
If so can't I buy a usb to ps2 changer in order to plug into a car connection cable which has the ps2 and the xda conection and a ciger lighter plug for power? OR is there a similar cable for a usb connect for gps?
Am I missing something here?
Thanks
P

Microphone n voip

Any workarounds for a voip app and microphone for a rooted book color?
the cool guys that know what they are doing are working on bluetooth, that seems to be the best bet to getting a microphone working with NC, cross your fingers!
what about a wired headset with a built in mic. does the nook have the connections to support this?
I think the two best options right now for voice applications are probably the Bluetooth and the slight possibility that the micro-USB port on the Nook seems to have quite a few extra pins on it, which may have left B&N open to a proprietary connector that would allow for additional device connectivity via the micro-USB port.
I've purchased a number of micro-USB adapters in order to plug various devices into the micro-USB port of the NC, with zero success (keyboards, USB headsets, mice, etc). Clearly that port isn't currently operating in that manner, and I'm sure there's a tech savy person that could drop in and give us a simple answer to why this is.
I was also curious about the headphone port possibly have mic capabilities, and was about to purchase a single post headset to test the theory, but then I took a (very unscientific) look at the headphones jack, and it would appear that there aren't enough ring connectors inside it to support an additional channel. Obviously the guys doing the tear-down would know far more about this than myself.
We'll see what turns up over the coming months.
Found this teardown post with spec list and it says that there is no mic input in the headphone jack. I know I read another teardown post which I cannot find that indicated the same thing. I agree that our best bet may be getting the bluetooth working.
KryptoNyte39 said:
I've purchased a number of micro-USB adapters in order to plug various devices into the micro-USB port of the NC, with zero success (keyboards, USB headsets, mice, etc). Clearly that port isn't currently operating in that manner, and I'm sure there's a tech savy person that could drop in and give us a simple answer to why this is.
Click to expand...
Click to collapse
Can you detail what sort of adapters you tried? Have you tried a gender changer (type a-a female-female) on the end of the nook cord attached to a keyboard?
Someone correct me if I am wrong but, in order for the usb to do something other than just charge and connect to the PC from the usb, you would have to activate USB host, which is not turned on in stock. Hence no of the fancy toys will work. There are a lot of funky pins on the connector so it may have to be some funky adapter, assuming you get usb host running. There are a lot of hackery potential, but until that project is completed, the wait for bluetooth continues.
Go Occip! (the guy hacking the bluetooth.)
Mike
This is what I've been thinking about. I don't have the ability to figure out how to activate the USB Host function, but I read several posts about how it worked on N1, D1, and Hero.
The thing I want to try is using a micro USB to 3.5mm minijack cable like those that came with the G1. It's the only thing I could think of that could logically be supported by the default system since it was necessary in 1.5 on that device.
I don't think anyone is using VOIP yet, but you may be very interested in this thread:
http://forum.xda-developers.com/showthread.php?t=989637
I'm running the CM7 image via SD card from that thread, and the Bluetooth works, and I can connect to my phone and my headset. Several people can connect to their standalone GPS units. Worth watching.
Anyone know if the micro USB port is even powered?
On a lot of phones, the USB connectors aren't powered by the device (like my HD2), so you have to hack together a proper setup that supplies power.

OTG and Charging DIY cable - success

After a lot of research (credit to this thread), I can report back my experience with the N7100 for OTG and Charging at the same time.
My plan is to use the Note II in car, with audio out via USB, into an external DAC and then into my head unit. I will connect to a powered USB hub to access SD card/external storage as well as an EZCap device for Reverse Camera. A simple OTG cable permits this but there is no charging.
I bought these plugs to make my own cable ends. I created a regular USB micro plug - +ve, GND, Data+, Data- and then soldered a resistor across Pin 4 (ID) and GND. 64.9k triggers both Dock Mode and OTG. I only had a 68k and this worked fine as it's within the upper/lower tolerance range. The DIY kits allow for just enough room to fit a single resistor and is a nice clean fit in the car. The Micro USB connects directly to the powered hub and I spliced in a separate USB A male cable (+ve/GND only) for a spare power supply.
When docked, I use Tasker to run in car app (Google AutoMate), set the state/rotation/display etc; audio automatically routes to USB DAC, external storage is detected, EZcap works, and phone charges. Will need to monitor charge rate vs drain time but overall happy for the small outlay of connectors and a resistor...
Thank you for the great post
This is exactly what I'm trying to make but I did not understand how to make it
could you make a simple Schematic please.
Thulfiqar92 said:
Thank you for the great post
This is exactly what I'm trying to make but I did not understand how to make it
could you make a simple Schematic please.
Click to expand...
Click to collapse
sure, unable to paste link/image here but have uploaded a diagram, you may need to add the http before this link
hope that helps, it is quite basic, happy to advise if you need more input thx
bit.ly/1RU6D4x
caseyjay said:
sure, unable to paste link/image here but have uploaded a diagram, you may need to add the http before this link
hope that helps, it is quite basic, happy to advise if you need more input thx
bit.ly/1RU6D4x
Click to expand...
Click to collapse
Thank you very much
Very clear :good:
The link has an error but I saw the picture by visiting your profile "NCASEYJAY" on photobucket
this is the Corrected link
bit.ly/1SKNbnV
Best regards

question on triggering accessory relays

I'm interested in installing a pumpkin audio unit in my jeep for the primary purpose of audio, but secondarily triggering accessory relays for lights and other accessories. So far my search skills have not found anyone who has accomplished this with a head unit. I suspect there aren't any hard wire outs that can be utilized for this purpose, but thought maybe via wifi or bluetooth. Anyone heard of someone pulling this off?
From your post assume you want to supply other accessories when HU is powered on? Use sub output or antenna output to trigger 12v relay for this purpose.
marchnz said:
From your post assume you want to supply other accessories when HU is powered on? Use sub output or antenna output to trigger 12v relay for this purpose.
Click to expand...
Click to collapse
well not looking to actually power the accessories, but just trigger a 12v relay to run high voltage accessories. lightbars, winches, rock lights etc. ideally an app that gets installed on the unit which can communicate to a relay board.. either through wifi or bluetooth or a direct wire or usb cable out the back of the unit.
You would have to find some sort of usb switch that has an android app.
Could be something completely unrelated to what you are doing as long as it triggers a ground or positive. Unfortunately i dont think any of these units have programmable switched outputs
sinnedone said:
You would have to find some sort of usb switch that has an android app.
Could be something completely unrelated to what you are doing as long as it triggers a ground or positive. Unfortunately i dont think any of these units have programmable switched outputs
Click to expand...
Click to collapse
Such a board exists Im a new poster so can't do hot link, But such a bluetooth relay board exists on amazon for about 20 bucks. Its really a question now if the headunit can install this app and communicate correctly with the board

sony xav-ax100 USB questions

Hello
I have been talking to superdave about adding a second USB to my sony xav-ax100. I am very capable of taking unit apart and soldering on the new USB cable to the board. But that is about the extent of my knowledge on doing this. I have no programming back ground. So here are my questions:
1: upon adding the second usb to the board is there any programming that would have to be done for this to work? Does a second USB icon just show up on the main screen.
2: also Dave talked about doing the UART while the head unit is open. I have tried to do a little research on what this is, and from what I can tell it is a way to hook up a computer to the Sony head unit. Why would I need to do this? Keeping in mind I have no programming knowledge.
This unit is going in a bike so once I get it set up to be able to use two USB's. And of course the "caution screen disable" mod. I should be done with modding this unit.
My hopes for this Mod are so I can leave my thumb drive hooked up to the (1) USB port, and be able to hook up my phone for the AA feature for maps and spotify on the (2) USB port.
Thanks for any help on this.
Hub works fine on mine for use with a USB stick and Android auto.

Categories

Resources