WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Ser2net  (Read 13694 times)

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Ser2net
« on: January 25, 2022, 07:11:37 AM »
Hello all

Is it possible to add ser2net as an extension ?

1. Which flavor, Tinycore or piCore. > piCore v13
2. Which version. Provide the result of the  version  command. > 13.0
3. Which architecture. Provide the result of the  uname -a  command. > armv7l GNU/Linux
4. A link to the applications web site, if you have one. > http://ser2net.sourceforge.net/

I found a way to build the extension (with this post http://forum.tinycorelinux.net/index.php/topic,16731.msg100399.html#msg100399, and the last version) but at last i cannot connect to my serial device(which work whith ser2net for raspbian). So Ithink there a problem with TC version and/or dependancies.


For information, This extension is needed in order to connect a raspberry pi 2 (picore Player v8) to my DENON AVR with an USB to Serial link (FTDI chipset). The cable link is Ok with lsusb command ans is set to ttyUSB0.

Many thanks.

Olivier

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11587
Re: Ser2net
« Reply #1 on: January 25, 2022, 11:04:15 AM »
Hi olivier.com
Welcome to the forum.

See if these instructions work for you:
http://forum.tinycorelinux.net/index.php/topic,19333.msg143296.html#msg143296

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Re: Ser2net
« Reply #2 on: January 25, 2022, 12:42:43 PM »
Hi Rich,

Thank you for your message.

I made a mistake in my first post. The link you gave me is the one I have followed. Sorry.
So this workaround does not give good result.
I modified the build script in order to match with new version of ser2net. Compiling seems to be ok and the extension is created. I have added the conf file into /etc/, persit this file by addind it in filelist and i do a backup.
I am able to start the ser2net program BUT I cant use it to connect to my serial device, whereas I can connect with the same RPi with raspbian and ser2net. So I think I made some bad thing with compiling and especially with piCore version.
Extension I built is to run with piCore v13, but script I have taken is from v8 repo... As we said in France "ya de la pluie qui a coulĂ© sous les ponts depuis"...   (Since then, much water has flowed under the bridge).

I made some moding in build script but with no change.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11587
Re: Ser2net
« Reply #3 on: January 25, 2022, 12:48:04 PM »
Hi olivier.com
Maybe you need a driver? Possibly something from the  usb-serial  extension.

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Re: Ser2net
« Reply #4 on: January 25, 2022, 01:34:35 PM »
The link I use is a USB to serial cable with FTDI chip.
With usb-util extension and usb-serial extrension installed, a lsusb command give me this :

Code: [Select]
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
...


So i consider my USB device drivers are Ok. Am I wrong ?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11587
Re: Ser2net
« Reply #5 on: January 25, 2022, 01:46:30 PM »
Hi olivier.com
No, that just means  lsusb  found  ID 0403:6001  in its database. Run this command:
Code: [Select]
lsmodThis will list which modules (drivers) are currently loaded. The driver you are looking for id  ftdi_sio.

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Re: Ser2net
« Reply #6 on: January 25, 2022, 01:57:43 PM »
Hum you are right.
lsmod does not gave me the ftdi driver.

Another fact I just discover (with your hint) is that the "dmesg | grep tty" command does not gave me a line like " FTDI ... is attached to /dev/ttyUSB0...".

So you are may be right with this driver issue...

Can you tell me how I can add this driver ? (   ftdi_sio ) . just for infortmation extension "usb-serial-5.10.42" is loaded.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11587
Re: Ser2net
« Reply #7 on: January 25, 2022, 02:05:18 PM »
Hi olivier.com
Try:
Code: [Select]
sudo modprobe ftdi_sio

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Re: Ser2net
« Reply #8 on: January 25, 2022, 04:16:34 PM »
After few moments of insanity...I realise I have forgotten to back up my changes.... so I confirm driver is correctly loaded

Code: [Select]
dmesg | grep tty
[    0.000000] Kernel command line: coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbsw  ap=1 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000  tz=CET-1CEST,M3.5.0,M10.5.0/3 dwc_otg.fiq_fsm_mask=0xF host=pCP dwc_otg.lpm_enable=0 console=tty1 root=/dev/ram0 rootwait quiet nortc lo  glevel=3 noembed smsc95xx.turbo_mode=N noswap consoleblank=0 waitusb=2
[    0.000335] printk: console [tty1] enabled
[    2.549527] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[   19.549312] usb 1-1.5: FTDI USB Serial Device converter now attached to ttyUSB0

and

Code: [Select]
lsmod
Module                  Size  Used by
spidev                 20480  0
snd_soc_bcm2835_i2s    16384  0
snd_soc_core          229376  1 snd_soc_bcm2835_i2s
ftdi_sio               45056  0
usbserial              36864  1 ftdi_sio
snd_compress           20480  1 snd_soc_core
snd_bcm2835            28672  0
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm               114688  5 snd_compress,snd_pcm_dmaengine,snd_soc_bcm2835_i2s,snd_bcm2835,snd_soc_core
snd_timer              36864  1 snd_pcm
snd                    77824  5 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
raspberrypi_hwmon      16384  0
i2c_bcm2835            16384  0
spi_bcm2835            20480  0
fixed                  16384  0
squashfs               40960  72
zram                   28672  1
zsmalloc               28672  1 zram

ser2net is now started but it doesnt connect to my serial device. (this step is OK with raspbian.)

I don't have very good knowledge of TC so does port on TC are all open? (the port I use to connect to ser2net ethernet side is 11111), I guess yes but I can send message to it... but they dont arrive to the serial device..
Status given by ser2net control port command is already not connected.




Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11587
Re: Ser2net
« Reply #9 on: January 25, 2022, 05:22:41 PM »
Hi olivier.com
... I modified the build script in order to match with new version of ser2net. ...
Maybe try building the older version found here with no modifications to the script:
http://tinycorelinux.net/8.x/armv6/tcz/src/ser2net/
and see if that behaves any better.

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Re: Ser2net
« Reply #10 on: January 26, 2022, 03:32:31 AM »
Thanks for your answer.

I forgot to tell that I really try all to make this extension work, including compiling without any change.

The extension I built, seems to be OK (It starts, I can see it with ps command...) but the serial side does not work at all.

ser2 net extension for TC v8 does not appears to have any dependancy. Is this fact already ok for TC v13 ?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14796
Re: Ser2net
« Reply #11 on: January 26, 2022, 03:51:00 AM »
If it works, it is probably OK...

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Re: Ser2net
« Reply #12 on: January 26, 2022, 05:33:50 AM »
If it works, it is probably OK...

As I said before, I cant connect to my serial device, whereas it is working with the same Rpi, with the same cable but under Raspbian. In fact, a thing is missing with TC. But i cant say what.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14796
Re: Ser2net
« Reply #13 on: January 26, 2022, 05:40:43 AM »
I thought you were speaking of the version of ser2net from piCore 8.x, not the version that you'd compiled.

Offline olivier.com

  • Newbie
  • *
  • Posts: 26
Re: Ser2net
« Reply #14 on: January 26, 2022, 05:45:31 AM »
I will try the extension on piCore v 8.x but it is not my goal.
I need ser2net with piCore v13.