November 23, 2024, 05:37:03 AM

Can I use MOD-WIFI with OLIMEXINO-328?

Started by jacob, January 07, 2013, 11:23:33 PM

Previous topic - Next topic

jacob

I bought a OLIMEXINO-328 and a MOD-WIFI (https://www.olimex.com/Products/Modules/Ethernet/MOD-WIFI/) without checking if there was a TCP/IP software stack available. With the UEXT interface I assume that the products can be used together, am I right?

The example code for the MOD-WIFI is for a PIC microcontroller. Is it possible to port this code to the ATMEGA328, and if so has anyone already done it? (Or is there another TCP/IP stack for use with the ATMEGA328 that can be adopted to use with the MOD-WIFI?)

Thanks,
Jacob

LubOlimex

Hey Jacob,

OLIMEXINO-328 and MOD-WIFI are compatible on hardware level. MOD-WIFI uses SPI communication and there is such interface on the UEXT.

I'd suggest to one of our developers to make a working example. I can't promise you anything, though.

Make sure to check this blog (of course the board is Uno which uses different processor so this libraries would need adjusting too): http://theiopage.blogspot.com/2011/10/connecting-mrf24wb0ma-to-arduino.html.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

veseo

In these days I'm using the MOD-WIFI and I've yet a working code that will be released next week, somenthing more here http://www.souliss.net/search/label/MOD-WIFI

If you can't wait, you need just to google a bit. The MRF24WB0MA module is used in several WiFi shields and there are many libraries to use with it. Mostly of the code is based on libraries released for AsyncLabs Wifi shiled and use uIP as software stack.

A working solution is the following one, you need just to adjust the SPI pins into the spi.h file, basically you should care only about ChipSelect/SlaveSelect.

http://code.google.com/p/wifi-shield-oe/downloads/list

Regards,
Dario.

Have a look at Souliss [url="//www.souliss.net"]www.souliss.net[/url] for Internet of Things and Home Automation, working to be compatible with Olimex modules.

jacob

#3
Dario,

Thanks for your great posts on the souliss.net site.

Could you be more specific on how to configure the spi.h file so it works with the Olimexino-328?
(My WIFI-MOD has production code 1129U8S)

Regards,
Jacob

veseo

According to latest Olimexino-328 schematics, D7 is used as CS for the SPI communication at the UEXT connector.
Into SPI.h file you should look for ARDUINO1 definitions of SS and CS, then move them to BIT7, PORTD.

Use the Wifi code from Open Electronics "WIFI-Arduino-TiDiGino.zip"

Once done, consider that the connection to your router may take some minutes, you should be able to ping your board once connected.

If you have the admin password of your router, you can see in the Wireless details which are the devices connected, there are listed by MAC address (printed on your module).

I've use the same module (same production code), some friend tell me that newer may have problem with this library.

If you don't feel ok with this modification, include your modified SPI code on the forum, then we will look at it togheter.

Regards,
Dario.
Have a look at Souliss [url="//www.souliss.net"]www.souliss.net[/url] for Internet of Things and Home Automation, working to be compatible with Olimex modules.

veseo

Don't forget the 3.3V switch, your Wifi module works at that voltage!

Dario.
Have a look at Souliss [url="//www.souliss.net"]www.souliss.net[/url] for Internet of Things and Home Automation, working to be compatible with Olimex modules.

jacob

I got the MOD-WIFI working with Olimexino-328 using the Arduiono/Tidigino code at: http://code.google.com/p/wifi-shield-oe/downloads/list combined with this spi.h file: https://gist.github.com/nephics/4753630

Fiberspace

Quote from: jacob on February 11, 2013, 12:07:20 PM
I got the MOD-WIFI working with Olimexino-328 using the Arduiono/Tidigino code at: http://code.google.com/p/wifi-shield-oe/downloads/list combined with this spi.h file: https://gist.github.com/nephics/4753630


Hallo Jacob,

I'm trying to get a working sketch for my Olimexino-328 and Mod_Wifi with the Microchip MRF24WBOMA.

In a forum post I saw that you had it working.

Sadly I did not succeed.

I tried all I could find, but without luck.

Could it be that my MOD_Wifi is defect? (put it on 5V at first connect)
No messages are print at all in the serial monitor.

I am not sure about:
- my spi.h file {used same as you posted}
- chipset compatibility
- How do I know if mod_wifi is not defect?

Kind regards?



Fiberspace

Hello,

I have recently bought an Olimexino 328 board and an Mod_Wifi with the MRF24WB0MA microchip.

I thought it would be a breeze to connect these things together to make it work.

I have a sketch (with measuring temperature and humidity with RHT03, works fine.
I have these sketch running with Arduino Ethernet board, also runs fine, data posts to webserver etc.
These sketches runs also fine on your Olimexino board.

After several hours researching and trying, I do not get any results by replacing the Ethernet with Mod_Wifi

I tried everything on the page:
https://www.olimex.com/forum/index.php?topic=636.0

But with no results either.

I can compile and upload a sketch (webclient e.g.) without a problem.

Then I shut the board down, connect the Mod_Wifi to the UEXT (I have only 1 connection on it) and powers the board (via the USB cable).


In the setup
   Serial.begin(9600);
  Serial.println("Start wifi init");
  WiFi.init();
  Serial.println("End wifi init");

WiFi.init() always hangs.

I have modified the spi.h files in the library but I am not sure about the settings and the combatibilty with the version of de MRF24WB0MA.


On the soullis pages I can see that it will be working, but again, I am unsure about the compatibilitye of the chipset....

Please give me any links to the right direction.



Fiberspace

After an answer from Lub/Olimex, I tried again the Souliss framework.
I have it working and can ping my board.

First I tried to add the network settings in the Sketch.
Afterwards I changed the network settings in the QuickCfg.h file. That worked!

Be aware of the fact that the Souliss default setting is to work with an offset of the IP numbers.

I looked in the DCHP table of my router, but there was no DHCP enabled. The default offset was used on my network, with IP adres .17  (on your network).

kind regards,
Fiberspace