|
121
|
Using Arduino / Networking, Protocols, and Devices / Re: Wifi and Android
|
on: October 08, 2012, 11:28:28 am
|
Sure. Everything is possible: http://gkaindl.com/software/arduino-ethernetThe Arduinio will run a DHCP client and will receive it's IP from a DHCP server. That'll be either the router of the existing network you will connect the pocket router to (pocket router in Bridge/Client mode) , or it will be the pocket router itself (in AP mode). Then of course the IP address that will be assiged to your Arduino is subject to change. So you need a method to tell your the application on your Android device. Apples implementationon of ZeroConf technology called Bonjour can do that. Bonjour on your arduino will register a service on the network that you application will be able to pick up. Your network devices (router, Android) need to support Bonjour though. Most Routers do, but I remember that some time back getting Bonjour is not easy on Android devices. But it's been quite a while since I looked at it alst and it may have changed. Naturally that all works flawless if you stick with Apple devices. If you intend to use the pocket router in AP mode anyway the DHCP/Bonjout approach is really overkill. Hard coding an IP address that you only use in the Arduino <-->pocket router <--> Android network is really not an issue.
|
|
|
|
|
122
|
Using Arduino / Networking, Protocols, and Devices / Re: A few questions about connecting arduino to the internet via wifi using router
|
on: October 08, 2012, 11:11:32 am
|
|
There is a point, actually several points to use an Ethernet shield.
If you are using existing libraries that rely on the Ethernet library, e.g, ArdOSC or DHCP/Bonjour you save yourself a lot of time coding things that are already coded. Good luck trying to code that functionality in HTML & javascript ;-)
I understand that the motivations of people for engaging in Arduino projects is different. Perhaps if you consider it a learnig experience and time for coding is not a problem, in that case elimiating the Ethernet card and library and associated functionality a a valid approach.
However, if one intends to get a project on their feet quickly and has a specific functionality in mind, then spending $30 on a little extra hardware is not an issue.
|
|
|
|
|
123
|
Using Arduino / Networking, Protocols, and Devices / Re: A few questions about connecting arduino to the internet via wifi using router
|
on: October 08, 2012, 10:29:47 am
|
|
True, you could eliminate the WiFi and Ethernet shield this way, howevr, you'd obviously loose all compatibility to the Ethernet shiled library.
Depending on yopur projects requirements you may end up having to write a lot of code that otherwise is provided in form of the Ethenet library and a host of other libraries that depend on the Ethenet library.
But, yes, connecting a cheap router that preferably runs on 5V USB power is a safe bet. I use that approah in two projects with more coming up. I use a TP-Link TL-WR703n, TP-Link TL-WR702n and the TP-Link TL-WR703n and the 3020 should also work witout problems.
The 703 uses 100mA in WiFi mode.
|
|
|
|
|
124
|
Using Arduino / Networking, Protocols, and Devices / Re: Wifi and Android
|
on: October 05, 2012, 06:08:16 pm
|
|
From my admittedly brief reading about the Android ADK it seems more aimed at connecting Android accessories per USB. If you want to connect an Arduino to an Android device per WiFi you should not need the ADK. After all you can just collect your data and then send it per UDP. How you format your data is completely up to you as you are going to be the one coding the receiving software the world is open to you, so to speak ;-). You could of course use an already existing protocol that perhaps is based on UDP and would allow you to focus on the core of your application and not on coding a protocol. I personally would probably use OSC, but that has more to do with the fact that I am confotable with it. It may not be the best technical choice!
Yes, you can configure the router as an Access Point (AP) and to assign a static IP to the Arduino. Then you should be able to establish a connection to that AP. I don't have an Androind device but several Apple devices e.g. An iPad and iPad. There you select Settings and WiFi and you will be presented with a selection of available routers. The pocket router shows up there and you should then be able to connect to it. As the next step you may want to use a the Webserver example from the Ethernet library and see if you can get the Arduino to serve the very little web page. If it does then you have verified that your Android can connect to the Android device.
After that its simply a matter of collecting data and sending data per UDP (or any other suitable protocol of the TCP/IP) to an open port of your choice on the Android device.
|
|
|
|
|
125
|
Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wifi Shield problems
|
on: October 05, 2012, 09:23:24 am
|
|
There is more than one way to connect a laptop to a WiFi shield. If Ad-hoc doe not woirk, perhaps the Arduion WiFi shield can work as an Access Point (AP) and you can then connect your Laptop to the Arduino (rather than the Arduino th the Laptop). If that does not work, then you can buy a little pocket router for ~$30 that you run in AP mode and then connect your laptop and the Arduino to.
|
|
|
|
|
126
|
Using Arduino / Networking, Protocols, and Devices / Re: Wifi and Android
|
on: October 05, 2012, 09:18:30 am
|
|
It would help if you could provide some more information as to what software on the Android device is going to receive the data. Is it an application that already exists or areyou going to write/code one ?
From there we can determine in what format and with what protocol to send data. What sensors are you going to connect, and how are you goin to connect the sensors to the analod inputs, digital inputs or through I2C etc.
|
|
|
|
|
127
|
Using Arduino / Networking, Protocols, and Devices / Re: Wifi and Android
|
on: October 03, 2012, 08:37:56 pm
|
|
I initially attempted to make my own project work with a Liksprite CuHead, which is a Clone of the Asynclabs WiShield. I got it to work to some degree nut could not progress beyond a certain point, e.g using certain libraries with the CuHead. Then I tried a Diysandbox.com Hydrogen. Nice and capable product, but in the end I came across the same problem. If you do go the WiFi shield route I'd recommend this one. I have no experience with the Arduino Wifi Shield, which I believe is certainly a very capable piece of hardware nut it will take some time until libraries for it are fully developed and debugged so the maturity of approaches that of the Ethernet Shield.
I finally decided to try using a little WiFi router ( TP-Link WR703n) connected to the Ethernet card and I can assure you that this is dead simple!
The reason is that the WiFi connection is transparent for the Arduino, so you can take advantage of the Full functionality of the Ethernet library and many other libraries that depend on the Ethernet library like DHCP/Bonjour or ArdOSC.
Further more , if someone else less technically inclined wants to reconfigure the network then they can simply reconfigure the little router through its Web interface. No need to hack around in Arduino code, no compilation and upload.
|
|
|
|
|
129
|
Using Arduino / Networking, Protocols, and Devices / Re: Moving from Ethernet to WiFi
|
on: October 03, 2012, 08:10:40 pm
|
|
I second that statement. However, I'd like to point out that the 703 only comes with a Chinese web interface and there is no firmware available with a different language from the manufacturer.
You could install an OpenWrt on it though.
For sake of simplicity I'd suggest a 702 or a 3020 which in the US are sold with a English Web UI. The 3020 is similar in hardware to the 703 and also can be flashed with OpenWrt, the 702 cannot.
However, if you do get a 703 I've managed to translate the menu points necessary to reconfigure it with the help of Google translate. Not something I'd attempt for frequent reconfiguration ;-)
|
|
|
|
|
130
|
Using Arduino / Networking, Protocols, and Devices / Re: What contributes to the overall I2C Bus length?
|
on: October 03, 2012, 11:35:35 am
|
Overall capacitance of the sytem, including the nodes. Each device has it's own capacitance, not only the cable. As Nick already stated it is imortant to dimension the pull-up resistors correctly. the higher the bus speed (Clock Frequency) the more critical these things get. here's a very nice articlke on the importance of the Pull-up resistors: http://www.dsscircuits.com/articles/effects-of-varying-i2c-pull-up-resistors.htmlAlso, you can certainly experiment a lot, however, if you encounter problems, without an oscilloscope you won't really know what your problem is. Search the forum for "I2C lenght" or "I2C distance". There's some good stuff posted.
|
|
|
|
|
131
|
Using Arduino / Networking, Protocols, and Devices / Re: Working DHCP Server Example (WIZnet/EtherMega)
|
on: October 03, 2012, 11:25:10 am
|
|
Same her, please explain better what you want to achive. My suspicion is - given your own statement that you don't have networking experience - you are looking at this a bit backwards ;-)
The devices most commonly runnig DHCP servers are routers that sit somewhat in the middle of everything and route IP packets to their approproate destination. These destinations are usually End-devices (for lack of a better name) like an Arduino. There are libraries the implement DHCP clients on an Arduino.
|
|
|
|
|
133
|
Using Arduino / Networking, Protocols, and Devices / Re: Arduino WiFi Shield UDP Support
|
on: October 02, 2012, 11:29:55 am
|
|
@mamaretti
What OSC library are you going to use, or are you going to write one yourself ? If you intend to use ArdOSC currently no WiFi shield supports this library out-of-the-box.
ArdOSC uses some low level functions of the Ethernet library that "talk" directly to teh Wiznet W5100c chip on the Arduino Ethernet card. You'd have to rewrite that portion and adaptit to the specific hardware your WiFi shield uses.
If you are interested in an alternative solution I'll PM you so we don't hijack this thread ;-)
|
|
|
|
|
135
|
Using Arduino / Networking, Protocols, and Devices / Re: Arduino ethernet shield w 5100 and wifi network
|
on: October 02, 2012, 11:18:42 am
|
|
You could use a little WiFi router that you can cponnect directly to the Ethernet card that you already have. Here in the US you ca get a TP-Link TL WR702n (or 702 or 3020......) viia a short Ethernet cable directly to the Ethenet card. Then you can connect that in client (bridge) mode to the Modem-Router.
this is less expensive than buying a separate WiFi shieled and simple to set up without the need to re-write code.
|
|
|
|
|