-1

I have wifi module at home. I would want use it like access point. I have some documents to this module, but i don't understand them very well. I tried to connect over minicom to module - successfully. I could assign AT commands - successfully. But I cannot to find any way how to send the following commands to module from Command Catalogue, for example (from document Wireless LAN SLIP User Guide):

  • UARTMODIFY(115200, 8, 0, 1, 0) - Sets the UART to 115.2kbaud, 8 bit characters, no parity, 1 stop bit and no retention over power on.
  • AUTHENTICATE (1) - switches authentication on.
  • ATTACH(“Ezurio_Network”) – searches for and, if present, attaches to the Ezurio_Network.

Actually I am absolute beginner in this instance :/ Can anybody help me? Thank you very much and sorry for my English.

Here is the link to guide Wireless LAN SLIP User Guide.


EDIT: I send the command over: s.write('SEARCH()'). The error message is following:

Traceback (most recent call last):

File "myserial.py", line 3, in <module>
    s = serial.Serial('/dev/ttyUSB0', baudrate=11520) 
  File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 260, in __init__
    self.open()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 280, in open
    self._reconfigurePort()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 413, in _reconfigurePort
    set_special_baudrate(self, custom_baud)
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 47, in set_special_baudrate
    FCNTL.ioctl(port.fd, TERMIOS.TIOCGSERIAL, buf)
IOError: [Errno 25] Inappropriate ioctl for device
Luke
  • 1,163
  • 2
  • 11
  • 19

1 Answers1

0

I recommend you to use a serial interface. I already used Python serial interface and it is pretty simple if you can use python in your case.

Here is an example:

import serial

s = serial.Serial('/Your/Device/File', baudrate=11520) #something like /dev/ttyUSB0
s.bytesize = serial.EIGHTBITS
s.parity = serial.PARITY_NONE
s.stopbits = serial.STOPBITS_ONE

And after doing this you simple have access to it like file descriptors. You can do write or read.

s.write('your command')
s.read('your result')
muradin
  • 1,249
  • 2
  • 14
  • 34
  • Thank you very much for your help :) I tried your solution, but it doesn't help me :( When I run the script it return me some errors. Any other ideas? Thanks. – Luke Nov 17 '14 at 07:41
  • The error message is placed above in question. Thanks :) @muradin – Luke Nov 17 '14 at 11:20
  • I gave you an example and i do not know what your device exactly is. Ensure that you have installed related driver and then you should change `/dev/ttyUSB0` with interface file created in `/dev/YOURFILE` – muradin Nov 17 '14 at 11:31
  • Could I send any commands over minicom? I try all but without result :( for example: 'AT+DIR' - list of all files on module. 'SEARCH()' - command that not work. I don't know what I'm doing bad. – Luke Nov 17 '14 at 11:32
  • The interface /dev/ttyUSB0 work right. When I run minicom all is all right. I can write AT commands but I don't know how to send another commands for settings of module (UARTMODIFY(). SEARCH(), ATTACH(), ...). – Luke Nov 17 '14 at 11:37
  • I do not have knowledge of your device but if you need more aid you can change your question tags. – muradin Nov 17 '14 at 11:41